Skip to content

Commit 94f4129

Browse files
committed
增加 inno setup 脚本打包文件
1 parent 4c89ca2 commit 94f4129

1 file changed

Lines changed: 72 additions & 0 deletions

File tree

Metaminesweeper.iss

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
;由 Inno Setup Script Wizard 生成的脚本。
2+
;有关创建 INNO SETUP 脚本文件的详细信息,请参阅文档
3+
; 将Inno Setup 的安装目录添加到环境变量中 在命令行使用 ISCC "{xxx.iss}" 全路径 进行编译
4+
; 或者 cd 到Inno Setup 的安装目录,然后在命令行中使用 iscc "{xxx.iss}" 进行编译
5+
; 安装程序生成在该脚本的根目录下的Output目录下
6+
; 程序名称
7+
#define MyAppName "Metaminesweeper"
8+
; 程序版本
9+
#define MyAppVersion "3.1.11"
10+
; 发行商
11+
#define MyAppPublisher "eee555"
12+
; 官网
13+
#define MyAppURL "https://github.com/eee555/Solvable-Minesweeper"
14+
; 运行主程序名称
15+
#define MyAppExeName "metaminesweeper.exe"
16+
; 程序目录
17+
#define AppPath "metaminesweeper"
18+
; 根目录
19+
#define RootPath "Metaminesweeper-v3.1.11"
20+
; 图标
21+
#define IconPath "Metaminesweeper-v3.1.11\media\cat.ico"
22+
[Setup]
23+
;注意:AppId 的值唯一标识此应用程序。不要在其他应用程序的安装程序中使用相同的 AppId 值。
24+
;(要生成新的 GUID,请单击 Tools |在 IDE 中生成 GUID
25+
AppId={{A5BFCE55-30E5-4A1D-8849-E6372D2CF9D4}
26+
AppName={#MyAppName}
27+
AppVersion={#MyAppVersion}
28+
;AppVerName={#MyAppName} {#MyAppVersion}
29+
AppPublisher={#MyAppPublisher}
30+
AppPublisherURL={#MyAppURL}
31+
AppSupportURL={#MyAppURL}
32+
AppUpdatesURL={#MyAppURL}
33+
;默认按照路径
34+
DefaultDirName={autopf}\{#MyAppName}
35+
;“ArchitecturesAllowed=x64compatible” 指定安装程序无法运行
36+
;在 Arm 上的 x64 和 Windows 11 以外的任何设备上。
37+
ArchitecturesAllowed=x64compatible
38+
;“ArchitecturesInstallIn64BitMode=x64compatible” 请求
39+
;在 x64 或 Arm 上的 Windows 11 上以“64 位模式”完成安装,
40+
;这意味着它应该使用本机 64 位 Program Files 目录和
41+
;注册表的 64 位视图。
42+
ArchitecturesInstallIn64BitMode=x64compatible
43+
DisableProgramGroupPage=yes
44+
;取消注释以下行以在非管理安装模式下运行(仅为当前用户安装)。
45+
PrivilegesRequired=admin
46+
OutputBaseFilename=Metaminesweeper-{#MyAppVersion}
47+
Compression=lzma
48+
SolidCompression=yes
49+
WizardStyle=modern
50+
SetupIconFile={#IconPath}
51+
UninstallDisplayIcon={#IconPath}
52+
53+
[Languages]
54+
Name: "english"; MessagesFile: "compiler:Default.isl"
55+
; 中文语言包,需要下载对应的中文.isl文件放到InnoSetup目录下的languages目录下
56+
Name: "chinese"; MessagesFile: "compiler:Languages\Chinese.isl"
57+
58+
[Tasks]
59+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone
60+
61+
[Files]
62+
Source: {#RootPath}\{#AppPath}\{#MyAppExeName}; DestDir: "{app}\{#AppPath}"; Flags: ignoreversion
63+
Source: {#RootPath}\*; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
64+
;注意:不要在任何共享系统文件上使用 “Flags: ignoreversion”
65+
66+
[Icons]
67+
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#AppPath}\{#MyAppExeName}"
68+
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#AppPath}\{#MyAppExeName}"; Tasks: desktopicon;
69+
70+
[Run]
71+
Filename: "{app}\{#AppPath}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent runascurrentuser
72+

0 commit comments

Comments
 (0)