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

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

?? yabinst.c

?? basic解釋器源代碼 microsoft visual studio 6.0環(huán)境下通過
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/* 
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 */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产精品自在自线| 日韩一级黄色大片| 日本一区中文字幕| 国产精品美女久久久久aⅴ国产馆| 欧美在线视频日韩| 美女视频一区在线观看| 中文字幕一区二区在线观看| 日韩三级.com| 日本韩国欧美国产| 成人福利电影精品一区二区在线观看 | 国产成人无遮挡在线视频| 亚洲永久精品大片| 国产精品久久久久久亚洲伦| 日韩精品中文字幕一区| 欧美三区在线视频| 97国产一区二区| 国产福利91精品| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲男人的天堂在线观看| 国产欧美一区二区三区鸳鸯浴| 在线成人高清不卡| 精品视频在线免费看| av午夜一区麻豆| 国产精品一区二区在线播放 | 欧美一区二区性放荡片| 一本色道久久综合亚洲精品按摩| 国产毛片精品国产一区二区三区| 免费观看91视频大全| 手机精品视频在线观看| 亚洲成人av中文| 亚洲一线二线三线视频| 伊人色综合久久天天人手人婷| 国产区在线观看成人精品| 久久久高清一区二区三区| 久久婷婷一区二区三区| 91精品国产福利在线观看| 91精品午夜视频| 欧美一区二区三区在线观看视频| 在线观看精品一区| 色婷婷久久综合| 91国产丝袜在线播放| 色综合网色综合| 一本大道久久a久久综合| 91在线无精精品入口| 99v久久综合狠狠综合久久| 91在线国产福利| 99精品视频在线免费观看| 色综合色狠狠综合色| 色婷婷综合久久久| 在线免费观看成人短视频| 欧美性三三影院| 欧美精品v日韩精品v韩国精品v| 欧美视频第二页| 欧美日韩国产色站一区二区三区| 欧美精品三级在线观看| 91精品国产高清一区二区三区| 91精品视频网| 久久影院视频免费| 国产女同互慰高潮91漫画| 日韩美女久久久| 亚洲精品视频免费看| 亚洲一区二区三区四区在线免费观看| 亚洲成va人在线观看| 精品在线免费观看| 国产成人精品免费在线| aaa欧美日韩| 欧美日韩一区二区三区四区 | 亚洲视频一区二区在线观看| 亚洲一区二区中文在线| 美国三级日本三级久久99| 国产很黄免费观看久久| 色综合久久中文综合久久牛| 欧美精品tushy高清| 久久综合色8888| 日韩理论电影院| 美女在线一区二区| jvid福利写真一区二区三区| 欧美人妇做爰xxxⅹ性高电影| 欧美成人乱码一区二区三区| 中文字幕一区二区三区在线播放| 亚洲成人av福利| 国产不卡视频一区二区三区| 在线免费精品视频| 精品精品国产高清a毛片牛牛 | 午夜视频久久久久久| 久99久精品视频免费观看| 99久久精品免费看国产免费软件| 欧美顶级少妇做爰| 国产精品天干天干在观线| 三级不卡在线观看| 成人激情文学综合网| 欧美日韩视频专区在线播放| 欧美激情中文不卡| 青娱乐精品在线视频| 99国内精品久久| 日韩欧美国产一二三区| 18成人在线观看| 精品一区二区成人精品| 在线欧美日韩精品| 中文字幕精品—区二区四季| 日本aⅴ免费视频一区二区三区 | 9191成人精品久久| 国产精品乱码一区二三区小蝌蚪| 秋霞电影网一区二区| 欧洲精品在线观看| 国产婷婷精品av在线| 另类人妖一区二区av| 91国产福利在线| 国产精品第一页第二页第三页| 麻豆国产精品官网| 欧美老人xxxx18| 亚洲男帅同性gay1069| 粉嫩欧美一区二区三区高清影视| 欧美精品黑人性xxxx| 一区二区三区精品在线| 成人爽a毛片一区二区免费| 欧美大片国产精品| 亚洲国产精品久久久久秋霞影院| 成人av在线资源| 国产日韩欧美a| 狠狠色狠狠色合久久伊人| 日韩视频免费观看高清完整版| 亚洲6080在线| 91传媒视频在线播放| 亚洲男人的天堂在线aⅴ视频| 成人国产在线观看| 中文字幕欧美日本乱码一线二线| 免费不卡在线观看| 欧美一级欧美三级| 日本v片在线高清不卡在线观看| 欧美视频一二三区| 亚洲高清免费视频| 精品视频999| 亚洲国产一区视频| 欧美色综合网站| 亚洲午夜免费视频| 欧美午夜精品免费| 亚洲不卡一区二区三区| 99久久精品国产网站| 中文字幕乱码久久午夜不卡| 不卡一卡二卡三乱码免费网站| 久久久久久电影| 国产精品综合二区| 中文成人av在线| aaa亚洲精品一二三区| 一区二区三区日韩精品| 欧美在线制服丝袜| 日本一不卡视频| 精品国产乱码久久久久久1区2区| 久久激五月天综合精品| 久久美女艺术照精彩视频福利播放 | 午夜精品福利一区二区蜜股av| 欧美美女直播网站| 看电影不卡的网站| 久久这里只有精品6| 成人国产精品免费观看视频| 亚洲美女淫视频| 91精品欧美一区二区三区综合在| 久久精品国产99国产| 日本一区二区综合亚洲| 色婷婷国产精品久久包臀| 丝袜美腿高跟呻吟高潮一区| 日韩精品专区在线影院重磅| 懂色av一区二区夜夜嗨| 亚洲精品菠萝久久久久久久| 欧美日韩和欧美的一区二区| 老汉av免费一区二区三区| 欧美国产日韩亚洲一区| 在线观看视频欧美| 麻豆视频一区二区| 中文字幕日韩一区二区| 欧美午夜电影一区| 国产精一区二区三区| 亚洲伦理在线精品| 日韩欧美一二三四区| 成人三级在线视频| 午夜影院久久久| 国产欧美一区二区精品性色| 色噜噜夜夜夜综合网| 久久av老司机精品网站导航| 中文字幕永久在线不卡| 日韩午夜av电影| eeuss国产一区二区三区| 日本不卡一区二区三区 | 一区二区三区在线影院| 91精品蜜臀在线一区尤物| av激情成人网| 麻豆国产一区二区| 尤物在线观看一区| xfplay精品久久| 欧美日韩视频不卡| 国产jizzjizz一区二区| 日产国产高清一区二区三区| 国产精品久久久久影院亚瑟 | 亚洲乱码国产乱码精品精可以看 | 久久www免费人成看片高清| 精品一区二区免费在线观看| 国产精品久久久久久亚洲伦| 欧美一级淫片007| 色八戒一区二区三区|