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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? yabinst.c

?? basic解釋器源代碼 microsoft visual studio 6.0環境下通過
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* 
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 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕在线一区| 国产精品毛片大码女人| 欧美日韩精品专区| 色狠狠桃花综合| 色婷婷av久久久久久久| 色久综合一二码| 欧美军同video69gay| 欧美日韩精品免费| 日韩免费福利电影在线观看| 欧美一卡二卡在线| 2024国产精品视频| 国产日韩精品久久久| 国产亚洲一二三区| 国产精品拍天天在线| 自拍偷自拍亚洲精品播放| 国产精品入口麻豆九色| 国产精品人人做人人爽人人添| 国产精品另类一区| 亚洲综合视频网| 精一区二区三区| 波多野结衣一区二区三区 | 欧美久久久久久蜜桃| 欧美久久一二三四区| 欧美成人vps| 国产精品乱码一区二三区小蝌蚪| 一区二区三区欧美视频| 日本麻豆一区二区三区视频| 国产精品一区二区91| 色噜噜狠狠成人中文综合| 日韩一区二区免费视频| 国产精品美女久久久久av爽李琼| 一区二区三区美女视频| 久久精品久久精品| 色猫猫国产区一区二在线视频| 7777精品伊人久久久大香线蕉经典版下载| 欧美成人欧美edvon| 亚洲欧美成aⅴ人在线观看| 秋霞午夜av一区二区三区| 东方欧美亚洲色图在线| 91精品国产综合久久精品| 国产欧美精品日韩区二区麻豆天美| 亚洲精品久久嫩草网站秘色| 九九九久久久精品| 欧美午夜一区二区| 中文字幕亚洲精品在线观看| 久久精品国产成人一区二区三区 | 欧美精选一区二区| 国产精品福利电影一区二区三区四区| 亚洲成av人影院| 岛国一区二区在线观看| 欧美一级国产精品| 一个色综合av| 91蝌蚪国产九色| 日本一区二区三区视频视频| 麻豆精品国产传媒mv男同| 在线精品视频免费播放| 国产精品免费久久久久| 国产福利精品导航| 久久综合九色综合欧美就去吻| 亚洲国产精品一区二区尤物区| 波多野结衣91| 久久久久久久久蜜桃| 极品销魂美女一区二区三区| 欧美一区欧美二区| 舔着乳尖日韩一区| 欧美日韩国产高清一区二区三区| 亚洲天堂网中文字| 9久草视频在线视频精品| 国产亚洲精品中文字幕| 狠狠狠色丁香婷婷综合激情| 欧美巨大另类极品videosbest | 亚洲综合在线视频| 91年精品国产| 一二三区精品福利视频| 色狠狠桃花综合| 一级中文字幕一区二区| 在线日韩一区二区| 亚洲在线视频免费观看| 欧美揉bbbbb揉bbbbb| 一区二区三区中文字幕在线观看| 一本一本久久a久久精品综合麻豆| 最近中文字幕一区二区三区| 972aa.com艺术欧美| 成人欧美一区二区三区白人| 99久久精品国产一区| 一区二区在线观看免费视频播放| 99久久99久久精品免费观看| 一区二区三区精品在线| 久久精品网站免费观看| 国产一区二区精品久久| 中文字幕国产一区| 在线观看亚洲精品视频| 亚洲成av人片在www色猫咪| 欧美老女人在线| 韩国三级电影一区二区| 欧美国产欧美综合| 色综合视频一区二区三区高清| 亚洲午夜视频在线观看| 日韩欧美一区二区久久婷婷| 国产精品系列在线播放| 亚洲天堂av一区| 欧美精品日日鲁夜夜添| 国产在线观看免费一区| 亚洲精品乱码久久久久久久久| 欧美乱妇20p| 国产成人欧美日韩在线电影| 亚洲乱码国产乱码精品精可以看 | 免费成人在线影院| 国产农村妇女毛片精品久久麻豆 | 日本亚洲视频在线| 国产精品全国免费观看高清 | 亚洲.国产.中文慕字在线| 这里只有精品免费| 99久久er热在这里只有精品15 | 亚洲成人动漫在线观看| 精品88久久久久88久久久| 色婷婷综合视频在线观看| 蜜桃av一区二区| 亚洲综合在线视频| 亚洲国产成人porn| 国产午夜精品一区二区三区视频 | 一区二区三区国产| 国产日韩欧美高清| 欧美一级黄色片| 欧美影院午夜播放| 成人黄色片在线观看| 六月丁香婷婷久久| 亚洲一区二区三区国产| 国产精品免费aⅴ片在线观看| 欧美精品久久天天躁| 色综合久久综合网| aaa国产一区| 国产福利一区二区三区在线视频| 免费视频一区二区| 亚洲一区二区不卡免费| 亚洲欧洲av另类| 国产欧美日韩精品一区| 精品国产第一区二区三区观看体验| 欧美在线高清视频| 色天天综合色天天久久| 99久久精品99国产精品 | 一本大道久久a久久精二百| 国产乱子伦视频一区二区三区| 日韩精品每日更新| 亚洲制服丝袜在线| 日韩—二三区免费观看av| 一区二区三区四区国产精品| 国产精品理伦片| 国产精品国产三级国产三级人妇| 久久久夜色精品亚洲| 久久蜜桃一区二区| 精品99999| 国产清纯白嫩初高生在线观看91 | 最新久久zyz资源站| 国产精品美女一区二区三区| 久久综合九色综合欧美98| 久久这里只有精品视频网| 欧美变态口味重另类| 久久色在线视频| 久久精品一区二区三区不卡| 久久久久久久网| 国产精品久久久久9999吃药| 中文字幕一区二区不卡| 亚洲欧美另类小说| 一区二区三区四区乱视频| 亚洲成人在线观看视频| 日韩精品欧美精品| 国产一区二区视频在线| 成人国产精品免费观看动漫| 99久久精品99国产精品| 欧美女孩性生活视频| 欧美tickle裸体挠脚心vk| 中文无字幕一区二区三区 | 狠狠色丁香久久婷婷综合丁香| 男女性色大片免费观看一区二区 | 成人美女在线观看| 色综合久久88色综合天天免费| 欧美吞精做爰啪啪高潮| 日韩三级av在线播放| 中文在线一区二区| 午夜精品久久久久久久久久久| 久久国产精品免费| www.在线欧美| 777午夜精品视频在线播放| 久久美女艺术照精彩视频福利播放| 中文字幕日韩一区二区| 午夜精品福利在线| 风流少妇一区二区| 欧美一区二区三区人| 国产精品日韩精品欧美在线| 天天免费综合色| 9人人澡人人爽人人精品| 日韩欧美三级在线| 亚洲欧美日韩国产成人精品影院 | 国产拍揄自揄精品视频麻豆| 日韩美女视频一区二区| 日韩av在线免费观看不卡| 91亚洲精品一区二区乱码| 精品91自产拍在线观看一区| 亚洲综合免费观看高清完整版在线|