Files
PackagingMallShipper/setup.iss
key fb65dceaa0 feat: 切换到商户号子账号登录端点 + 项目清理
- AuthService: 改用 http://common.apifm.com/loginAdmin/operator/v2 商户号登录
  * 验证码和登录统一使用该主机以保持 JSESSIONID 一致
  * 改用 FormUrlEncodedContent POST body
  * 未配置 MerchantId 时回退到旧的 pdomain 登录方式
- AppConfig: 新增 MerchantId 配置项
- App.config: 新增 MerchantId=15073
- LoginViewModel: captchaKey 由 GUID 改为 JS Math.random 风格 0.xxx
- setup.iss: 修复 GBK 编码损坏导致的字符串未闭合错误,改为 UTF-8 BOM
- README: 更新配置示例与相关文档链接
- .gitignore: 忽略 .env 本地密钥文件
- 清理过时/无关文档与未引用的 SFX 打包脚本
2026-04-17 12:03:15 +08:00

134 lines
4.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
; Inno Setup Script for 包装商城发货助手
; Requires Inno Setup 6.x
#define MyAppName "包装商城发货助手"
#define MyAppVersion "1.0.2"
#define MyAppPublisher "PackagingMall"
#define MyAppExeName "PackagingMallShipper.exe"
[Setup]
AppId={{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
OutputDir=installer
OutputBaseFilename=PackagingMallShipper_Setup_v{#MyAppVersion}
Compression=lzma2/ultra64
SolidCompression=yes
PrivilegesRequired=admin
MinVersion=6.1
ArchitecturesAllowed=x86compatible x64compatible
WizardStyle=classic
DisableProgramGroupPage=yes
UninstallDisplayName={#MyAppName}
UninstallDisplayIcon={app}\{#MyAppExeName}
[Languages]
Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
[Tasks]
Name: "desktopicon"; Description: "创建桌面快捷方式"; GroupDescription: "附加选项:"; Flags: checkedonce
[Files]
; 主程序和配置
Source: "publish\PackagingMallShipper.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "publish\PackagingMallShipper.exe.config"; DestDir: "{app}"; Flags: ignoreversion
; 所有依赖 DLL
Source: "publish\*.dll"; DestDir: "{app}"; Flags: ignoreversion
; SQLite 原生 DLL
Source: "publish\x64\SQLite.Interop.dll"; DestDir: "{app}\x64"; Flags: ignoreversion
Source: "publish\x86\SQLite.Interop.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\卸载 {#MyAppName}"; Filename: "{uninstallexe}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "运行 {#MyAppName}"; Flags: nowait postinstall skipifsilent
[Code]
function IsDotNetInstalled: Boolean;
var
Release: Cardinal;
begin
Result := False;
if RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', Release) then
begin
Result := (Release >= 394802);
end;
end;
function GetDotNetVersionStr: String;
var
Release: Cardinal;
begin
Result := '未安装';
if RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', Release) then
begin
if Release >= 533320 then
Result := '4.8.1 或更高'
else if Release >= 528040 then
Result := '4.8'
else if Release >= 461808 then
Result := '4.7.2'
else if Release >= 461308 then
Result := '4.7.1'
else if Release >= 460798 then
Result := '4.7'
else if Release >= 394802 then
Result := '4.6.2'
else if Release >= 394254 then
Result := '4.6.1'
else if Release >= 393295 then
Result := '4.6'
else
Result := '4.5.x 或更低';
end;
end;
function InitializeSetup: Boolean;
var
ErrorCode: Integer;
NetVersion: String;
begin
Result := True;
if not IsDotNetInstalled then
begin
NetVersion := GetDotNetVersionStr;
if MsgBox('此程序需要 .NET Framework 4.6.2 才能运行。' + #13#10 + #13#10 +
'当前检测到的版本: ' + NetVersion + #13#10 + #13#10 +
'是否要打开微软官网下载 .NET Framework 4.6.2' + #13#10 +
'(下载完成后请先安装运行时,再重新运行此安装程序)',
mbConfirmation, MB_YESNO) = IDYES then
begin
ShellExec('open', 'https://dotnet.microsoft.com/download/dotnet-framework/net462', '', '', SW_SHOW, ewNoWait, ErrorCode);
end;
Result := MsgBox('是否仍要继续安装?' + #13#10 + #13#10 +
'注意:如果没有安装 .NET Framework 4.6.2,程序将无法运行。',
mbConfirmation, MB_YESNO) = IDYES;
end;
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
DataDir: String;
begin
if CurUninstallStep = usPostUninstall then
begin
DataDir := ExpandConstant('{localappdata}\PackagingMallShipper');
if DirExists(DataDir) then
begin
if MsgBox('是否删除程序数据(包括本地缓存的订单数据)?', mbConfirmation, MB_YESNO) = IDYES then
begin
DelTree(DataDir, True, True, True);
end;
end;
end;
end;