【评估】 安装包

This commit is contained in:
yuejiajun 2025-08-18 13:02:27 +08:00
parent 8689c249bc
commit e472cb04f5

View File

@ -10,6 +10,9 @@
#define MyAppAssocName MyAppName + " File"
#define MyAppAssocExt ".myp"
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
#define MyAppResources "Resources"
#define InstallPassword GetDateTimeString('yyyymmdd', '', '')
; 默认配置
@ -18,7 +21,7 @@ AppId={{6BA7B810-9DAD-11D1-80B4-00C04FD430C8}
; 默认安装路径
DefaultDirName={localappdata}\XManage
; 安装密码
Password=20250813
Password={#InstallPassword}
; 是否加密
Encryption=yes
; ICO图标
@ -53,17 +56,20 @@ UninstallFilesDir={app}\{#MyAppExeName}
UninstallDisplayIcon={app}\{#MyAppExeName}\{#MyAppExeName}.bat
; 语言选择
[Languages]
Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl"
;; 任务
[Tasks]
; 是否创建桌面图标
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
;; 程序 ICO
[Icons]
;Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}.exe"
@ -71,6 +77,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}\{#MyAppExeName}.bat"; Tasks: desktopicon
;; 组件安装方式
[Types]
; 完整安装所有组件
@ -80,6 +87,7 @@ Name: "mini"; Description: "最小安装";
Name: custom; Description: 自定义安装; Flags: iscustom
;; 组件列表选择项
[Components]
Name: Starter; Description: {#MyAppName} 启动; Types: full;
@ -88,6 +96,7 @@ Name: Server; Description: {#MyAppName} Server; Types: full mini;
Name: Data; Description: {#MyAppName} Data; Types: full;
;; 安装包引入文件列表
[Files]
; 后端工程+启动器
@ -111,12 +120,14 @@ Source: "Resources\web\*"; DestDir: "{app}\{#MyAppExeName}\web"; Flags: ignoreve
Source: "Resources\dist\*"; DestDir: "{app}\{#MyAppExeName}\web\dist"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: UI;
;; 创建必要目录
[Dirs]
Name: "{app}\{#MyAppExeName}\web\logs"; Permissions: users-modify; Components: Starter;
Name: "{app}\{#MyAppExeName}\web\temp"; Permissions: users-modify; Components: Starter;
;; 安装时注册表与环境变量列表
[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; Flags: uninsdeletevalue; \
@ -162,6 +173,14 @@ const
VC2019_REDIST_X64 = '{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}';
VC2019_REDIST_X86 = '{422B21A3-06FA-3F2F-A6C6-21BCC9B8E2F3}';
// 获取安装密码
function GetInstallPassword(): string;
begin
Result := GetDateTimeString('yyyymmdd', '', '');
end;
function SendMessageTimeout(
hWnd: Integer;
Msg: Integer;