程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> Delphi >> Inno Setup 通用腳本及簡要說明( 一般情況夠用了),innosetup

Inno Setup 通用腳本及簡要說明( 一般情況夠用了),innosetup

編輯:Delphi

Inno Setup 通用腳本及簡要說明( 一般情況夠用了),innosetup


;以下腳本主要完成創建開始菜單和桌面的快捷方式,目錄安裝。

#define MyAppName "我的軟件名"
#define MyAppVersion "1.0"
#define MyAppPublisher "軟件作者"
#define MyAppURL "作者網址"
#define MyAppExeName "MYEXE.exe"
;主程序
#define MyAppUninstallExeName "MYEXE.exe"
;卸載程序
#define InStallDir "Mydir"
;安裝目錄,最後是英文

[Setup]
; 注: AppId的值為單獨標識該應用程序。
; 不要為其他安裝程序使用相同的AppId值。
; (生成新的GUID,點擊 工具|在IDE中生成GUID。)
AppId={{FD6089FC-0774-4DBD-A1A6-8D23F728E9ED}
AppName={#MyAppName}
;常量對應 #define MyAppName "我的軟件名"
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#InStallDir}
;默認安裝目錄
DefaultGroupName={#MyAppName}
;默認程序組目錄
AllowNoIcons=yes
OutputDir=C:\Users\Myexe\Documents\RAD Studio\Projects\published\isok
;輸出目錄
OutputBaseFilename=Setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "DesktopIcon"; Description: "創建桌面快捷方式"; GroupDescription: "附加任務";
;Name: "StartMenuIcon"; Description: "創建開始菜單圖標"; GroupDescription: "附加任務";
;Name: "QuickLaunchIcon"; Description: "創建快速啟動圖標"; GroupDescription: "附加任務";

[Files]
Source: "C:\Users\Myexe\Documents\RAD Studio\Projects\published\pro\Myexe.exe"; DestDir: "{app}"; Flags: ignoreversion
;主程序
Source: "C:\Users\Myexe\Documents\RAD Studio\Projects\published\pro\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
;主程序文件夾
; 注意: 不要在任何共享系統文件上使用“Flags: ignoreversion”

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
;主程序圖標
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
;卸載程序圖標
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
;桌面主程序圖標
Name: "{commondesktop}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
;桌面卸載程序圖標
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
;安裝完成後啟動程序

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved