[Setup] AppName=Hello World
Name: "english"; MessagesFile: "compiler:Default.isl" Inno Setup 所有的可以定義的區塊可以參考[[https://jrsoftware.org/ishelp/index.php?topic=setupsection|文件]]。
; Setup 區塊設定 [Setup] ; 設定 AppName AppName=Hello World
#define MyAppName "HelloWorld" #define MyAppVersion "beta" #define MyAppPublisher "FullstackLadder" #define MyAppURL "https://fullstackladder.dev/blog/" #define MyAppExeName "HelloWorld.exe"
[Setup] AppName={#MyAppName} AppVersion={#MyAppVersion}
[Files] Source: "C:\path\to\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
#define MyAppName "HelloWorld" #define MyAppVersion "beta" #define MyAppPublisher "FullstackLadder" #define MyAppURL "https://fullstackladder.dev/blog/" #define MyAppExeName "HelloWorld.exe"
[Setup] AppId={{557C0087-0AB3-4ED9-B1A4-3338C6AACC3B} AppName={#MyAppName} AppVersion={#MyAppVersion} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName={autopf}\{#MyAppName} DisableProgramGroupPage=yes ;PrivilegesRequired=lowest OutputDir=Setup OutputBaseFilename=HelloWorldSetup SetupIconFile=C:\GitHub\hello-world\HelloWorldSetup\setup.ico Compression=lzma SolidCompression=yes WizardStyle=modern
[Languages] Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
<sxh>Source: "C:\GitHub\hello-world\HelloWorldSetup\HelloWorld\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: “C:\GitHub\hello-world\HelloWorldSetup\HelloWorld\*”; DestDir: “{app}”; Flags: ignoreversion recursesubdirs createallsubdirs</sxh>
[Icons] Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run] Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent