初级教程如何安装到指定目录下?如安装到E:\\\\空之轨迹SC[Setup]DefaultDirName=E:\\\\空之轨迹SCDisableDirPage=yesDisableReadyPage=yesDisableFinishedPage=yes如何判定程序已经安装过而不重复安装,假如你的程序将要安装到 {pf}\\\\空之轨迹SC,如果在该文件夹中已经有你想要安装的文件 ed6.exe,那么你认为该程序算是已经安装。那么程应该这样写:; 程序已经安装在你的系统中了!这个是提示安装过。你可以设定其他语言说明 例如 已安装或重复安装; {pf}\\\\空之轨迹SC 为安装目录文件文件夹,同理如果是其他目录更改目录即可![Code]function InitializeSetup: boolean;beginResult := true;if FileExists) thenbeginMsgBox;Result := false;end;end;[Setup]AppName=纸莎草书繁体中文破解版;游戏名AppVerName=纸莎草书繁体中文破解版;游戏版本名AppPublisher=F.B.I游戏工作室;公司AppPublisherURL=http://www.aoizora.com;网站AppSupportURL=http://www.aoizora.comAppUpdatesURL=http://www.aoizora.comDefaultDirName=E:\\\\空之轨迹SC;安装目录DisableDirPage=yesDisableReadyPage=yesDisableFinishedPage=yesDefaultGroupName=纸莎草书繁体中文破解版;产品名称LicenseFile=C:\\\\Documents and Settings\\\\Administrator\\\\桌面\\\\用户使用协议.txt;协议书(按同意之前要先看的那个)InfoAfterFile=C:\\\\Documents and Settings\\\\Administrator\\\\桌面\\\\安装后说明.txt; 安装完成后的话OutputDir=C:\\\\Documents and Settings\\\\Administrator\\\\桌面;输出目录 存放的目录OutputBaseFilename=纸莎草书繁体中文破解版; 输出的游戏名称SetupIconFile=D:\\\\图标\\\\纸莎草书.ico;图标位置Compression=lzma;压缩方式:极限压缩SolidCompression=yes;(yes为固实压缩 no则相反)InternalCompressLevel=ultra;文件极限压缩 目录下的文件VersionInfoDescription=纸莎草书繁体中文破解版;产品名称VersionInfoCopyright=Copyright 2009 By F.B.I游戏室(yang8871/yangteng);版权DiskSpanning=true; 分卷压缩DiskSliceSize=645766400;分割的文件大小 单位K 大小为615MVersionInfoVersion=1.0;文件版本VersionInfoTextVersion=1.0TouchTime=22:23 ;生成的时间PrivilegesRequired=none ;不需要管理权限也能安装AlwaysRestart=yes ;询问是否要重新启动?(可以设置强制重新启动但是感觉没必要就不要害人)
[Files]Source: "C:\\\\\\\\纸莎草书繁体中文破解版\\\\\\\\game.exe"; DestDir: "{app}"; Flags: ignoreversion ;游戏生成的快捷方式所指原执行文件Source: "C:\\\\\\\\纸莎草书繁体中文破解版\\\\\\\\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;要打包的目录[Languages]Name: "chinesesimp"; MessagesFile: "compiler
anguages\\\\\\\\ChineseSimp.isl" ;语言中性[Icons]Name: "{group}\\\\\\\\纸莎草书繁体中文破解版"; Filename:"{app}\\\\\\\\game.exe";WorkingDir:"{app}" ;生成开始菜单游戏可执行程序game.exe是你目录下的可执行文件 WorkingDir: {app}”WorkingDir后面加{app} app的意思是随安装目录生成Name: "{group}\\\\\\\\{cm
rogramOnTheWeb,访问青空学园}"; Filename:" http://www.aoizora.com; WorkingDir: {app} " ;生成开始菜单网站Name: "{group}\\\\\\\\{cm:UninstallProgram,纸莎草书繁体中文破解版}"; Filename: "{uninstallexe}; WorkingDir: {app}";生成开始菜单卸载Name: "{commondesktop}\\\\\\\\纸莎草书繁体中文破解版"; Filename: "{app}\\\\\\\\game.exe"; Tasks: desktopicon;WorkingDir: "{app}";Tasks: desktopicon 任务:生成快捷方式[Tasks]Name: changestartpage; Description: "设置青空学园为主页" Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked ;Tasks: desktopicon 任务:生成快捷方式压缩方式的设置:默认是lzma[Setup]Compression=XXXXXX 表示压缩方式,目前的版本支持以下的压缩方式:zip ; 相当于 zip/7,是软件默认的压缩方式zip/1 ; Zip 格式,压缩率最低,速度最快,耗内存最少……zip/9 ; Zip 格式,压缩率最高,速度最慢,耗内存最大bzip ; 相当于 bzip/9bzip/1 ; BZip2 格式(压缩率高于 Zip 格式),压缩率最低,速度最快,耗内存最少……bzip/9 ; BZip2 格式,压缩率最高,速度最慢,耗内存最大lzma ; 相当于 lzma/maxlzma/fast ; 7-Zip LZMA 格式(压缩率高于 Zip 和 BZip2 格式),压缩率低,速度快lzma/normal ;7-Zip LZMA 格式,压缩率一般,速度一般lzma/max ;7-Zip LZMA 格式,压缩率高,速度慢lzma/ultra ;7-Zip LZMA 格式,超级压缩(谨慎使用,特别耗内存!!)none ;不压缩让安装程序安装后随WINDOWS启动~这个感觉没必要 要娱乐一下的试试看?[Tasks]Name: "startup"; Description: "随 windwos 启动"; GroupDescription: "添加启动选" ;Takes建立任务类似快捷方式类的[Registry]Root: HKCU; SubKey: Software\\\\\\\\Microsoft\\\\\\\\Windows\\\\\\\\CurrentVersion\\\\\\\\Run; valueType: string; valueName: "fileBX"; valueData: "{app}\\\\\\\\fileBX.exe";Flags: uninsdeletevalue; Tasks: startup ;在注册表上修改随windows启动!想把这2个图片换了?安装软件后目录有2个图片 你可以替换这2个头像就可以了。WizModernSmallImage.bmp 这个右上方的网站标志(注意只是举例)
WizModernImage.bmp 这个是左边的游戏图片
[Code]procedure URLLabelOnClick;varErrorCode: Integer;beginShellExec;end;procedure AboutButtonOnClick;beginMsgBox; ;这是关于按钮里面的内容 10是换行的意思end;varAboutButton, CancelButton: TButton;URLLabel: TNewStaticText;procedure InitializeWizard;begin{ Create the pages }WizardForm.PAGENAMELABEL.Font.Color:= clred;WizardForm.PAGEDESCRIPTIONLABEL.Font.Color:= clBlue;WizardForm.WELCOMELABEL1.Font.Color:= clGreen;WizardForm.WELCOMELABEL2.Font.Color:= clblack;CancelButton := WizardForm.CancelButton;AboutButton := TButton.Create;AboutButton.Left := WizardForm.ClientWidth – CancelButton.Left – CancelButton.Width;AboutButton.Top := CancelButton.Top;AboutButton.Width := CancelButton.Width;AboutButton.Height := CancelButton.Height;AboutButton.Caption := &39;;AboutButton.OnClick := @AboutButtonOnClick;AboutButton.Parent := WizardForm;URLLabel := TNewStaticText.Create;URLLabel.Caption := &39;;URLLabel.Cursor := crHand;URLLabel.OnClick := @URLLabelOnClick;URLLabel.Parent := WizardForm;{ Alter Font *after* setting Parent so the correct defaults are inherited first }URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];URLLabel.Font.Color := clBlue;URLLabel.Top := AboutButton.Top + AboutButton.Height – URLLabel.Height – 2;URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX;end;默认勾选同意~急着安装?不用急这就是设定默认的同意!
[Code]varLabel2: TLabel;Label1: TLabel;CheckBox1: TCheckBox;NewStaticText1: TNewStaticText;procedure Cus_Next;beginif CheckBox1.Checked = True thenWizardForm.LicenseAcceptedRadio.Checked := TrueelseWizardForm.LicenseNotAcceptedRadio.Checked := Trueend;procedure InitializeWizard;beginWizardForm.LicenseMemo.Height := 127;WizardForm.LicenseAcceptedRadio.visible := False;WizardForm.LicenseNotAcceptedRadio.visible := False;Label1 := TLabel.Create;Label1.Parent := WizardForm.LicensePage;Label1.Left := WizardForm.LicenseMemo.Left;Label1.Top := WizardForm.LicenseMemo.Top + WizardForm.LicenseMemo.Height + 7;Label1.Width := WizardForm.LicenseMemo.Width;Label1.Height := ScaleY;Label1.Caption := &39;39;1.5。单击 [下一步] 继续。&39;我同意“许可协议”中的条款&39;DeleteMenu@user32.dll stdcall&39;GetSystemMenu@user32.dll stdcall&1313 为回车字符
procedure InitializeWizard; 这个不能重复~只能是一个~注意编译时常常会出现错误都是因为这个。都归到一个命令下就可以了~
左下方F.B.I标志 XXXX改为你的名字或组织均可![Messages]BeveledLabel=XXXXXX添加任务设定为主页,卸载游戏
以上就是朝夕生活(www.30zx.com)关于“Inno Setup 编程技术全图文教程”的详细内容,希望对大家有所帮助!