亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? yabinst.c

?? BASIC語(yǔ)言的編譯器,對(duì)于了解編譯過(guò)程是極大的好處,看看吧,不會(huì)讓你失望的.
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
/* 
Install-Program for yabasic
written by Marc-Oliver Ihm in 1996.

  Date of last change:
*/
#define DOLC                     "February 23, 1999"
/*
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
	You should have received a copy of the GNU General Public License
	along with this program (the file is named "COPYING");
	if not, write to the Free Software
	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
	
*/

/*----------- includes -------------*/

#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <shlobj.h>
#include <shellapi.h>
#include <commctrl.h>
#include <ole2.h>
#include "resource.h"


/*------------ defines -------------------*/

/* names and symbols for basic */
#define BASIC_NAME "Yabasic"
#define BASIC_DOKU "Yabasic"
#define BASIC_EXE "yabasic.exe"
#define BASIC_EXTENSION ".yab"
#define BASIC_VERFILE "yabver.txt"
#define BASIC_DEFVERSION 2.3
#define BASIC_ICON "yabico.ico"
#define BASIC_DEMO "yabdemo"
#define BASIC_README "readme.txt"
#define BASIC_LICENSE "copying.txt"
#define BASIC_SETUP "setup.exe"
#define BASIC_LOG "yabasic.log"

/* headings for messageboxes */
#define INSTALL_HEADING " Install yabasic !"
#define REMOVE_HEADING " Remove yabasic !"

/* basic-defaults */
#define DEFAULTPATH "c:\\yabasic\\"
#define DEFAULTFONT "swiss13"
#define DEFAULTGEOMETRY "+10+10"

/* shortcuts for end-message */
#define INSTALL_CANCELLED 1
#define INSTALL_ABORTED 2
#define INSTALL_SUCCESS 3
#define INSTALL_FAILURE 4
#define REMOVE_SUCCESS 6
#define REMOVE_FAILURE 7
#define REMOVE_CANCELLED 8
#define SILENT 9

/* shortcuts for registry */
#define ROOT HKEY_CLASSES_ROOT
#define LOCAL HKEY_LOCAL_MACHINE
#define SOFT "SOFTWARE\\"
#define UNINSTALL "SOFTWARE\\MICROSOFT\\WINDOWS\\CURRENTVERSION\\UNINSTALL\\"

/* operationmodes for My...() functions */
#define INSTALL 1
#define REMOVE 2

/* defines for files() */
#define RESET 1
#define NEXT 2

/* shortcut for standard Message Box Style */
#define MB_STYLE MB_OK|MB_SYSTEMMODAL|MB_ICONINFORMATION

/* standard string length */
#define SSLEN 300

#if !defined(TRUE)
#define TRUE (1==1)
#endif

#ifndef FALSE
#define FALSE (1!=1)
#endif

/*------------ global types -----------------------*/

typedef struct linkinfo {
	int folder; /* registry key */
	char *link; /* name of link */
	char *file; /* name of file */
	char *desc; /* description of link */
	char *icon; /* name of icon for link */
	int removeonly; /* true, if icon should be removed but not installed */
} LINKINFO;


/*------------ global variables -------------------*/

char *currentpath;       /* current path */
char *installpath;       /* path, where to install */
char *temppath;          /* path to store temporary files */
char logs[10000];        /* string to compose log-message */
int here;                /* install in current path ? */
int install;             /* install or remove ? */
int copied;              /* true if copy in temp-directory */

int total_progress;      /* number of steps to advance progress counter */

HINSTANCE this_instance; /* instance */

float newversion;        /* version to be installed */

/*------------ prototypes -------------------*/

/* My...() functions */
int MyLinks(int); /* add or remove shell links */
int MyFiles(int); /* copy or delete files */
int MyRegs(int); /* add or delete entries to or from registry */

/* dialog callbacks */
BOOL CALLBACK pathdialog(HWND,UINT,WPARAM,LPARAM);/* choose installpath */
BOOL CALLBACK progressdialog(HWND,UINT,WPARAM,LPARAM);/* show progress */
UINT CALLBACK HookProc(HWND,UINT,WPARAM,LPARAM); /* hook for save as */

/* registry manipulation */
int delreg(HKEY,char *,char *); /* delete keys from Registry */
char *getreg(char *); /* get keys from Registry */
int putreg(HKEY,char *,char *,char *); /* put keys into Registry */

/* shell link functions */
/* Create link: */
HRESULT CreateShellLink(LINKINFO *,char *); 
/* delete a shell link */
HRESULT DeleteShellLink(LINKINFO *);

/* functions dealing with progress bar */
void progress(char *); /* show progress */

/* miscellanous functions */
void end(int); /* display message and terminate */
char *app(char *trail); /* append trail to installpath */
int Copy(char *,char *,int); /* copy files */
char *brushup(char *); /* change to upper case, add slash */
char *enumfiles(int); /* give filenames, one after another */
LINKINFO *enumlinks(int); /* give back links, one after the other */
void logit(char *); /* write text to logfile */
int MyMessage(HWND,LPCSTR,LPCSTR,UINT); /* wrapper for MessageBox() */

/*------------ main program --------------*/

int WINAPI WinMain(HINSTANCE _this_instance,   
				   HINSTANCE prev_instance,
				   LPSTR commandline,
				   int win_state)
{
	float oldversion;   /* version already installed */
	FILE *verfile;      /* file with version */
	int cancel;         /* return value of dialog */
	int success;        /* return value of My..() functions */
	char string[SSLEN]; /* multi-purpose string */
	
	/* copy intance information to global variable */
	this_instance=_this_instance;
	
	/* get path for temporary files */
	GetTempPath(SSLEN,string);
	temppath=brushup(string);
	
	/* write to log */
	sprintf(logs,"--Temppath: '%s'\n",temppath);
	logit(logs);
	
	sprintf(logs,"--Commandline='%s'\n",commandline);
	logit(logs);
	
	/* 'parse' commandline */
	install=TRUE;
	if (!strcmp(commandline,"remove")) install=FALSE;
	copied=FALSE;
	if (!strncmp(commandline,"copied",6)) {
		install=FALSE;
		copied=TRUE;
	}
	
	/* get current path */
	GetCurrentDirectory(SSLEN,string);
	currentpath=brushup(string);
	
	/* write to log */
	sprintf(logs,"--Currentpath: '%s'\n",currentpath);
	logit(logs);
	
	if (install) {   /* install yabasic */
		char *ver;     /* string containing installed version */
		
		/* set advance for progresscount */
		total_progress=27;
		
		/* get and check versions ... */
		
		/* get new version from file */
		sprintf(string,"%s%s",currentpath,BASIC_VERFILE);
		verfile=fopen(string,"r");
		if (!verfile || !fscanf(verfile,"%f",&newversion) || 
			newversion<BASIC_DEFVERSION) {
			newversion=(float)BASIC_DEFVERSION;
			sprintf(logs,"--Couldn't retrieve new version,"
				" using %5.2f instead\n",newversion);
			logit(logs);
		}
		else {
			sprintf(logs,"--New version: %5.2f\n",newversion);
			logit(logs);
		}
		if (verfile) fclose(verfile);
		
		/* get old version */
		ver=getreg("version");
		oldversion=0;
		if (ver) sscanf(ver,"%f",&oldversion);
		
		/* get confirmation */
		sprintf(string,"This will install\n   Yabasic, Version %g,\ndo You want to proceed ?",newversion);
		if (MyMessage(NULL,string,INSTALL_HEADING,
			MB_YESNO | MB_ICONQUESTION | MB_SYSTEMMODAL)==IDNO)
			end(INSTALL_CANCELLED);
		
		/* check versions */
		if (oldversion>newversion) {
			sprintf(string,"A newer Version of "BASIC_NAME
				" has already been installed:\n"
				"  \talready installed: \t%5.2f\n"
				"  \tto be installed: \t%5.2f\n"
				"Shall the installation proceed, superseeding the\n"
				"existing version ?",oldversion,newversion);
			if (MyMessage(NULL,string,INSTALL_HEADING,
				MB_YESNO | MB_ICONQUESTION | MB_SYSTEMMODAL)==IDNO)
				end(INSTALL_CANCELLED);
		}
		
		/* get path */
		installpath=getreg("path");
		if (installpath==NULL) installpath=DEFAULTPATH;
		cancel=!DialogBox((HANDLE)this_instance,
			MAKEINTRESOURCE(IDD_PATHDIALOG),
			(HWND)NULL,(DLGPROC)pathdialog);
		
		if (cancel) end(INSTALL_CANCELLED);
		
		/* brush up path */
		installpath=brushup(installpath);
		here=!strcmp(currentpath,installpath);
		
		/* write to log */
		sprintf(logs,"--Installpath: '%s'\n",installpath);
		logit(logs);
		
		/* check for disk-space */
		{
			DWORD spc,bps,frcl,tncl;
			float total;
			int answer;
			
			sprintf(string,"%c:/",*installpath);
			GetDiskFreeSpace(string,&spc,&bps,&frcl,&tncl);
			total=(float)frcl*spc*bps/1024;
			if (total<1024) {
				sprintf(string,"Free disk space is only %g kB!\n"
					"Proceed anyway ?",total);
				answer=MyMessage(NULL,string,INSTALL_HEADING,
					MB_YESNO | MB_SYSTEMMODAL | MB_ICONINFORMATION);
				if (answer==IDNO) end(INSTALL_ABORTED);
			}
		} 
		/* make entry in the registry */
		success=MyRegs(INSTALL);
		if (!success) {
			MyMessage(NULL,"Failed to make entries in the Registry !",
				INSTALL_HEADING,MB_STYLE);
			end(INSTALL_FAILURE);
		}
		
		/* create shell links */
		success=MyLinks(INSTALL);
		if (!success) {
			MyMessage(NULL,"Failed to add entry to the start-Menu !",
				INSTALL_HEADING,MB_STYLE);
			end(INSTALL_FAILURE);
		}
		
		/* create directory */
		progress("Creating directory.");
		CreateDirectory(installpath,NULL);
		
		/* copy files */
		progress("Copying files.");
		success=MyFiles(INSTALL);
		if (!success) {
			MyMessage(NULL,"Couldn't copy files !",
				INSTALL_HEADING,MB_STYLE);
			end(INSTALL_FAILURE);
		}
		
		/* installation successfull ! */
		end(INSTALL_SUCCESS);
  }
  
  else {  /* remove yabasic */
	  
	  if (!copied) 
		  if (MyMessage(NULL,"Really remove yabasic ?",REMOVE_HEADING,
			  MB_YESNO | MB_ICONQUESTION | MB_SYSTEMMODAL)==IDNO)
			  end(REMOVE_CANCELLED);
		  
		  /* get installpath */
		  installpath=getreg("path");
		  installpath=brushup(installpath);
		  if (installpath==NULL) {
			  MyMessage(NULL,"Could not find installation path !",
				  REMOVE_HEADING,MB_STYLE);
			  end(REMOVE_FAILURE);
		  }
		  
		  /* write to log */
		  sprintf(logs,"--Installpath: '%s'\n",installpath);
		  logit(logs);
		  
		  /* set advance for progresscount */
		  total_progress=9;
		  
		  here=!strcmp(currentpath,installpath);
		  
		  {/* remove files */
			  HANDLE from;
			  DWORD pid;
			  STARTUPINFO start;
			  PROCESS_INFORMATION proc;
			  
			  if (!copied) {
				  char to[SSLEN];
				  char *from;
				  char string[SSLEN]; /* multi purpose string */
				  
				  /* change registry, to point to new location */
				  sprintf(string,"%s %s",to,"remove");
				  putreg(LOCAL,UNINSTALL BASIC_NAME,"UninstallString",string);
				  
				  GetTempPath(SSLEN,to);
				  strcat(to,BASIC_SETUP);
				  from=app(BASIC_SETUP);
				  CopyFile(from,to,FALSE);
				  MyFiles(REMOVE);
				  
				  GetStartupInfo(&start);
				  
				  pid=GetCurrentProcessId();
				  sprintf(string,"%s copied %d",to,pid);
				  if (!CreateProcess(NULL,string,NULL,NULL,TRUE,NORMAL_PRIORITY_CLASS,
					  NULL,NULL,&start,&proc)) {
					  MyMessage(NULL,"Couldn't hand over",REMOVE_HEADING,MB_STYLE);
					  end(REMOVE_FAILURE);
				  }
				  end(SILENT);
			  }
			  /* from now on: copied */
			  
			  /* get process id */

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久伊人精品| 久久免费电影网| 久久久www成人免费毛片麻豆 | 国产综合色在线视频区| 日韩中文字幕麻豆| 日韩黄色在线观看| 日韩—二三区免费观看av| 一区二区成人在线| 亚洲一区在线免费观看| 亚洲综合999| 亚洲综合久久久| 亚洲自拍偷拍综合| 亚洲成a人v欧美综合天堂下载| 亚洲一区二区美女| 肉色丝袜一区二区| 久久成人麻豆午夜电影| 国产自产视频一区二区三区| 国产麻豆精品视频| 成人av集中营| 69堂国产成人免费视频| 欧美日韩的一区二区| 日韩亚洲欧美一区二区三区| 精品噜噜噜噜久久久久久久久试看| 欧美成人一区二区三区| 久久精品网站免费观看| 国产精品久久久久久妇女6080| 国产精品素人一区二区| 一区二区三区欧美视频| 日韩电影在线观看网站| 裸体一区二区三区| 国产99一区视频免费| 色婷婷亚洲婷婷| 制服.丝袜.亚洲.中文.综合| 精品久久五月天| 中文字幕在线一区二区三区| 亚洲一区二区三区在线播放| 日本aⅴ精品一区二区三区| 经典三级在线一区| 91理论电影在线观看| 欧美日韩性生活| 久久人人爽爽爽人久久久| 国产视频一区二区在线| 亚洲黄一区二区三区| 日韩av电影免费观看高清完整版 | 日韩欧美一级在线播放| 国产日韩欧美麻豆| 亚洲主播在线播放| 国产乱人伦偷精品视频不卡 | 欧美日韩大陆在线| 久久一二三国产| 一区二区三区丝袜| 精品亚洲成av人在线观看| kk眼镜猥琐国模调教系列一区二区| 色婷婷av一区二区三区软件| 日韩欧美国产小视频| 国产精品国产三级国产aⅴ入口 | 91福利国产精品| 欧美大尺度电影在线| 亚洲青青青在线视频| 麻豆精品在线播放| 色先锋aa成人| 久久久久久久综合日本| 亚洲18影院在线观看| 成人综合婷婷国产精品久久| 制服丝袜国产精品| 久久www免费人成看片高清| www.亚洲免费av| 日韩一区二区精品在线观看| 亚洲欧洲精品成人久久奇米网| 免费国产亚洲视频| 色激情天天射综合网| 国产偷国产偷精品高清尤物| 丝袜亚洲另类欧美| 色婷婷av一区二区三区之一色屋| 久久综合色婷婷| 首页欧美精品中文字幕| caoporen国产精品视频| xnxx国产精品| 午夜成人在线视频| 99久久精品费精品国产一区二区| 日韩一区二区三区在线| 一区二区激情小说| jlzzjlzz欧美大全| 久久先锋影音av鲁色资源网| 日本亚洲视频在线| 欧美在线你懂得| 亚洲天堂免费看| 福利一区二区在线| 精品播放一区二区| 久久国产三级精品| 欧美肥胖老妇做爰| 亚洲综合成人网| 在线看不卡av| 亚洲伦理在线精品| 91亚洲国产成人精品一区二三| 国产日韩欧美一区二区三区综合 | 色哟哟国产精品| 中文字幕一区二区三区精华液| 国产高清精品久久久久| 亚洲精品一区二区三区蜜桃下载| 免费人成在线不卡| 欧美精品成人一区二区三区四区| 亚洲高清视频中文字幕| 欧美性受极品xxxx喷水| 亚洲精选视频免费看| 99re这里只有精品首页| ...av二区三区久久精品| 9l国产精品久久久久麻豆| 国产精品午夜电影| av在线不卡网| 亚洲欧美一区二区三区孕妇| 91视频精品在这里| 亚洲欧美激情在线| 欧美影院一区二区三区| 亚洲午夜私人影院| 欧美日韩免费观看一区三区| 亚洲国产另类av| 7777精品伊人久久久大香线蕉的 | 天天亚洲美女在线视频| 欧美精品少妇一区二区三区| 亚洲电影第三页| 欧美疯狂做受xxxx富婆| 成人自拍视频在线| 中文字幕一区视频| 91久久精品一区二区| 天堂在线一区二区| 精品成人免费观看| av中文一区二区三区| 亚洲一区精品在线| 欧美精品欧美精品系列| 伦理电影国产精品| 欧美激情一区二区在线| 91在线高清观看| 亚洲成人tv网| 欧美大片在线观看| 国产不卡在线播放| 亚洲精品国产a久久久久久| 欧美日韩精品欧美日韩精品| 麻豆精品在线视频| 国产精品久久久久久一区二区三区 | 国产成人在线电影| 国产精品成人免费| 欧美亚洲动漫制服丝袜| 另类的小说在线视频另类成人小视频在线| 精品少妇一区二区三区日产乱码| 老司机精品视频导航| 国产精品进线69影院| 欧美精品vⅰdeose4hd| 国产一区在线精品| 一区二区三区久久| 久久影院午夜论| 91国偷自产一区二区使用方法| 奇米影视在线99精品| 中文字幕制服丝袜成人av | 欧美一区二区视频在线观看2020 | 久久久国产一区二区三区四区小说| 欧美精品久久久久久久多人混战| 日本视频中文字幕一区二区三区| 国产偷国产偷亚洲高清人白洁| 色网站国产精品| 久久国产综合精品| 日韩一区日韩二区| 欧美一区二区视频在线观看2020| 成人午夜私人影院| 日本视频一区二区| 一区二区在线电影| 久久久www成人免费毛片麻豆| 欧美日韩一区二区三区不卡| 高清国产午夜精品久久久久久| 亚洲成av人**亚洲成av**| 欧美国产精品中文字幕| 555www色欧美视频| 色一情一乱一乱一91av| 国产精品一区不卡| 日本不卡视频在线观看| 亚洲男人天堂一区| 中文字幕国产精品一区二区| 欧美欧美欧美欧美首页| av在线这里只有精品| 国产在线播放一区三区四| 亚洲高清免费视频| 亚洲欧洲成人精品av97| 久久综合九色综合97婷婷| 欧美日韩国产高清一区二区三区 | 亚洲人成网站精品片在线观看 | 亚洲丝袜精品丝袜在线| www国产成人免费观看视频 深夜成人网| 日本韩国一区二区三区视频| 成人午夜碰碰视频| 国产九九视频一区二区三区| 日韩av中文在线观看| 一区二区在线免费观看| 中文字幕一区免费在线观看| 久久久www成人免费无遮挡大片| 欧美一级日韩不卡播放免费| 欧美色图天堂网| 91蝌蚪国产九色| gogogo免费视频观看亚洲一| 国产99久久久久| 国产精品88av|