Files
envi-code/autoCompile/WF2026/ISS_File/PP3D-EQU-LIBRARY.iss
T
2026-09-28 15:28:50 +08:00

103 lines
2.4 KiB
Plaintext

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "上华水处理"
#define MyAppPublisher "ShangHuaSoft, Inc."
#define MyAppURL "http://www.shanghuasoft.com/"
#define DateTime GetDateTimeString('(yyyy.mm.dd-hh.nn)', '-', ':')
#define INIDateTime GetDateTimeString('yyyymmddhhnn', '', '')
#define PROFILES "SHS-PP3D"
#define VERSION "2021"
#define PACKAGE_PATH "..\..\..\setup\PoolPlant3D\WF2023\equ-library"
#define APPDATA "\ShangHuaSoft\PP3D-EQU-LIB-2021"
#define REG_KEY "Software\ShangHuaSoft\PP3D"
; 64bit 操作系统 安装了 R17平台的32bitCAD 用下面的key
#define REG_KEY2 "Software\WOW6432Node\Autodesk\AutoCAD\R"
[Setup]
AppId={{E9EAC829-DDF8-4150-9E11-ECFD6F2275B6}
AppName={#MyAppName}
AppVersion={#Version}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={sd}{#APPDATA}
DisableProgramGroupPage=yes
OutputDir=..\Output-File
OutputBaseFilename=PP3D-EQU-LIBRARY{#VERSION}{#DateTime}
SetupIconFile="..\..\..\setup\PoolPlant3D\WF2023\sys\poolplant.ico"
Compression=lzma
SolidCompression=yes
DisableDirPage=no
;Uninstallable=no
PrivilegesRequired=admin
ArchitecturesInstallIn64BitMode=x64
;修改左侧图片(大)
;WizardImageFile=dh.bmp
;修改右上角图片(小)
;WizardSmallImageFile=xx.bmp
[Languages]
Name: "Chinese"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
[Tasks]
[Files]
Source: "{#PACKAGE_PATH}\*"; DestDir: "{code:getInitializePath}\sys\"; Flags: ignoreversion
[LangOptions]
LanguageID=$0804
[INI]
Filename: "{code:getInitializePath}\sys\product.ini"; Section: "EquLib"; Key: "上华设备库"; String: "sh-equ-library.db"; Flags : uninsdeleteentry;
[Messages]
ButtonFinish=完成(&F)
[code]
function getInitializePath(V: string):string;
var
s:string;
value:string;
begin
s := '{#REG_KEY}' + '\';
if RegKeyExists(HKLM, s) then
begin
if RegValueExists(HKLM, s, 'InstallPath') then
begin
RegQueryStringValue(HKLM, s, 'InstallPath', value);
Result := value;
end
else
begin
Result := ''
end;
end
else
begin
Result := ''
end;
end;
function InitializeSetup(): Boolean;
var
s:string;
begin
s := getInitializePath('a')
if s = '' then
begin
MsgBox('没有安装上华水处理软件,或安装的版本过旧!', mbInformation, MB_OK);
Result := false;
end
else
begin
Result := true;
end ;
end;