Commit 07d71636 authored by Auto Backup's avatar Auto Backup

feat: build

parent 0559f665
; 脚本由 Inno Setup 脚本向导 生成! ; 脚本由 Inno Setup 脚本向导 生成!
; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档! ; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档!
#include AddBackslash( CompilerPath ) + "ISPPBUILTINS.ISS" #include AddBackslash( CompilerPath ) + "ISPPBUILTINS.ISS"
#define MyAppName "IAS审计作业系统" #define MyAppName "IAS审计作业系统"
; MyAppRegName 名称应保持与Config.ini中APPRegName配置一致,否则注册表读写不对应。 ; MyAppRegName 名称应保持与Config.ini中APPRegName配置一致,否则注册表读写不对应。
#define MyAppRegName4 "UFCPAS4" #define MyAppRegName4 "UFCPAS4"
#define MyAppExeName4 "UFCPAS4.exe" #define MyAppRegName6 "CPAS6" #define MyAppExeName4 "UFCPAS4.exe"
#define MyAppEnName6 "CPAS6" #define MyAppExeName6 "cpas-WorkPlatform.exe" #define MyAppRegName6 "CPAS6"
#define MyAppEnName6 "CPAS6"
;#define MyPMAppExeName "cpas-WorkPlatform.exe" #define MyAppExeName6 "cpas-WorkPlatform.exe"
;#define MyPMAppEnName "cpas-WorkPlatform"
#define MyAppVersion "6.0.250909" ;#define MyPMAppExeName "cpas-WorkPlatform.exe"
#define MyAppPublisher "北京友数聚科技有限公司" ;#define MyPMAppEnName "cpas-WorkPlatform"
#define MyAppURL "http://www.youdatasum.com/" #define MyAppVersion "6.0.250909"
#define SQL_Path "C:\AudSQL2014" #define MyAppPublisher "北京友数聚科技有限公司"
#define SQL_INSTANCE "MSSQL$AudSQL2014" #define MyAppURL "http://www.youdatasum.com/"
#define SQL_ServerName "(local)\AudSQL2014" #define SQL_Path "C:\AudSQL2014"
#define CurDateString GetDateTimeString('yyMMdd', '-', ':'); #define SQL_INSTANCE "MSSQL$AudSQL2014"
#define SQL_ServerName "(local)\AudSQL2014"
[Setup] #define CurDateString GetDateTimeString('yyMMdd', '-', ':');
; 注: AppId的值为单独标识该应用程序。
; 不要为其他安装程序使用相同的AppId值。 [Setup]
; (生成新的GUID,点击 工具|在IDE中生成GUID。) ; 注: AppId的值为单独标识该应用程序。
AppId={{UFAUD001-6EBAF16B-1F26-4ED9-B287-0F1010CFCCE2} ; 不要为其他安装程序使用相同的AppId值。
AppName={#MyAppName} ; (生成新的GUID,点击 工具|在IDE中生成GUID。)
AppVersion=6.0.{#CurDateString} AppId={{UFAUD001-6EBAF16B-1F26-4ED9-B287-0F1010CFCCE2}
AppPublisher={#MyAppPublisher} AppName={#MyAppName}
AppPublisherURL={#MyAppURL} AppVersion=6.0.{#CurDateString}
DefaultDirName={code:GetDefaultDir} AppPublisher={#MyAppPublisher}
;D:\{#MyAppEnName} AppPublisherURL={#MyAppURL}
DefaultGroupName={#MyAppName} DefaultDirName={code:GetDefaultDir}
CreateAppDir=true ;D:\{#MyAppEnName}
OutputBaseFilename={#MyAppName}Setup-{#CurDateString} DefaultGroupName={#MyAppName}
;lzma 压缩方式 lzma2/fast none CreateAppDir=true
compression=lzma OutputBaseFilename={#MyAppName}Setup-{#CurDateString}
;是否使用原来的安装路径,不让选择 ;lzma 压缩方式 lzma2/fast none
UsePreviousAppDir=no compression=lzma
SolidCompression=yes ;是否使用原来的安装路径,不让选择
OutputDir=. UsePreviousAppDir=no
Uninstallable=yes SolidCompression=yes
DisableReadyPage=yes OutputDir=E:/产品安装包/05 大客户专版/109 致同/CPAS6.0 IAS版
EnableDirDoesntExistWarning=no Uninstallable=yes
DirExistsWarning=no DisableReadyPage=yes
AlwaysShowGroupOnReadyPage=no EnableDirDoesntExistWarning=no
DisableProgramGroupPage=yes DirExistsWarning=no
PrivilegesRequired=admin AlwaysShowGroupOnReadyPage=no
SetupLogging=yes DisableProgramGroupPage=yes
[Files] PrivilegesRequired=admin
SetupLogging=yes
;6.0项目管理工具与审计作业平台未分成两个EXE; [Files]
Source: "{#MyAppExeName6}"; DestDir: "{app}"; Flags: ignoreversion;
Source: "{#MyAppExeName4}"; DestDir: "{app}"; Flags: ignoreversion; Source: "AutoUpdate\update.inf"; DestDir: "{app}\AutoUpdate"; ;6.0项目管理工具与审计作业平台未分成两个EXE;
;Source: "ConfigTool.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "{#MyAppExeName6}"; DestDir: "{app}"; Flags: ignoreversion;
Source: "CpasCloudSvr\CpasCloudSvr.exe"; DestDir: "{app}\CpasCloudSvr"; Flags: ignoreversion; Source: "{#MyAppExeName4}"; DestDir: "{app}"; Flags: ignoreversion;
Source: "CpasCloudSvr\data\*"; DestDir: "{app}\CpasCloudSvr\data"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "AutoUpdateClient.exe"; DestDir: "{app}"; Flags: ignoreversion ;Source: "1,68-A8-6D-14-57-9E.CPA"; DestDir: "{app}"; Flags: ignoreversion Source: "AutoUpdate\update.inf"; DestDir: "{app}\AutoUpdate";
;Source: "WorkPaperViewer.exe"; DestDir: "{app}"; Flags: ignoreversion ;Source: "ConfigTool.exe"; DestDir: "{app}"; Flags: ignoreversion
;Source: "RegWorkPaperViewer.bat"; DestDir: "{app}"; Flags: ignoreversion Source: "CpasCloudSvr\CpasCloudSvr.exe"; DestDir: "{app}\CpasCloudSvr"; Flags: ignoreversion;
;Source: "CPAProjectSynchron.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "CpasCloudSvr\data\*"; DestDir: "{app}\CpasCloudSvr\data"; Flags: ignoreversion recursesubdirs createallsubdirs
;Source: "UFHSPSystem.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "AutoUpdateClient.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion ;Source: "1,68-A8-6D-14-57-9E.CPA"; DestDir: "{app}"; Flags: ignoreversion
Source: "CPASProtocol.exe"; DestDir: "{app}"; Flags: ignoreversion; ;Source: "WorkPaperViewer.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "borlndmm.dll"; DestDir: "{app}"; Flags: ignoreversion ;Source: "RegWorkPaperViewer.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "UFCPASSetupDll.dll"; DestDir: "{app}\"; Flags: ignoreversion dontcopy ;Source: "CPAProjectSynchron.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "重启资源管理器.bat"; DestDir: "{app}"; Flags: ignoreversion ;Source: "UFHSPSystem.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "AppBPL\*"; DestDir: "{app}\AppBPL"; Flags: ignoreversion recursesubdirs createallsubdirs ; Source: "libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "Config\Config.ini"; DestDir: "{app}\Config"; Flags: ignoreversion Source: "ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "Config\Config.xml"; DestDir: "{app}\Config"; Flags: ignoreversion Source: "CPASProtocol.exe"; DestDir: "{app}"; Flags: ignoreversion;
Source: "Config\ExportExcel.xml"; DestDir: "{app}\Config"; Flags: ignoreversion Source: "borlndmm.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "Config\ServerConfig.ini"; DestDir: "{app}\Config"; Flags: ignoreversion Source: "UFCPASSetupDll.dll"; DestDir: "{app}\"; Flags: ignoreversion dontcopy
Source: "Config\Symbol.ini"; DestDir: "{app}\Config"; Flags: ignoreversion ;Source: "Config\*"; DestDir: "{app}\Config"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "重启资源管理器.bat"; DestDir: "{app}"; Flags: ignoreversion
;Source: "Data\*"; DestDir: "{app}\Data"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "AppBPL\*"; DestDir: "{app}\AppBPL"; Flags: ignoreversion recursesubdirs createallsubdirs ;
Source: "SysBPL\*"; DestDir: "{app}\SysBPL"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "Config\Config.ini"; DestDir: "{app}\Config"; Flags: ignoreversion
Source: "Tools\*"; DestDir: "{app}\Tools"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "Config\Config.xml"; DestDir: "{app}\Config"; Flags: ignoreversion
Source: "SourceData\*"; DestDir: "{app}\SourceData"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "Config\ExportExcel.xml"; DestDir: "{app}\Config"; Flags: ignoreversion
Source: "数据采集工具\*"; DestDir: "{app}\数据采集工具"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "Config\ServerConfig.ini"; DestDir: "{app}\Config"; Flags: ignoreversion
Source: "演示数据\*"; DestDir: "{app}\演示数据"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "Config\Symbol.ini"; DestDir: "{app}\Config"; Flags: ignoreversion
Source: "AppData\*"; DestDir: "{app}\AppData"; Flags: ignoreversion recursesubdirs createallsubdirs ;Source: "Config\*"; DestDir: "{app}\Config"; Flags: ignoreversion recursesubdirs createallsubdirs
;ProjectData文件夹内有演示企业的底稿文件,数据库初始化工具不能回复,暂时直接恢复; ;Source: "Data\*"; DestDir: "{app}\Data"; Flags: ignoreversion recursesubdirs createallsubdirs
;Source: "ProjectData\"; DestDir: "{app}\ProjectData"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "SysBPL\*"; DestDir: "{app}\SysBPL"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "DataConvert\*"; DestDir: "{app}\DataConvert"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "Tools\*"; DestDir: "{app}\Tools"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "DBUpdate\*"; DestDir: "{app}\DBUpdate"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "SourceData\*"; DestDir: "{app}\SourceData"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "升级包数据库升级脚本\*"; DestDir: "{app}\DBUpdate\Script\"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "数据采集工具\*"; DestDir: "{app}\数据采集工具"; Flags: ignoreversion recursesubdirs createallsubdirs
;注册Office加载项,[run]段也加入bat文件注册双保险 Source: "演示数据\*"; DestDir: "{app}\演示数据"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "DataConvert\Dts_dll\dtspkg.dll"; DestDir: "{app}\DataConvert\Dts_dll"; DestName: "dtspkg.dll"; Flags: regserver noregerror; Source: "AppData\*"; DestDir: "{app}\AppData"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "DataConvert\Dts_dll\dtspump.dll"; DestDir: "{app}\DataConvert\Dts_dll"; DestName: "dtspump.dll"; Flags: regserver noregerror; ;ProjectData文件夹内有演示企业的底稿文件,数据库初始化工具不能回复,暂时直接恢复;
;Source: "ProjectData\"; DestDir: "{app}\ProjectData"; Flags: ignoreversion recursesubdirs createallsubdirs
;Office加载项换成新方式 Source: "VSTO\*"; DestDir: "{app}\VSTO"; Flags: ignoreversion recursesubdirs createallsubdirs; Source: "UFCPAS4Office\UFSY4Protocol.exe"; DestDir: "{app}\UFCPAS4Office"; Flags: ignoreversion recursesubdirs createallsubdirs;BeforeInstall: ClearTargetDir(ExpandConstant('{app}\UFCPAS4Office')) Source: "DataConvert\*"; DestDir: "{app}\DataConvert"; Flags: ignoreversion recursesubdirs createallsubdirs
;注册Office加载项,[run]段也加入bat文件注册双保险 Source: "DBUpdate\*"; DestDir: "{app}\DBUpdate"; Flags: ignoreversion recursesubdirs createallsubdirs
;Source: "UFCPAS4Office\libeay32.dll"; DestDir: "{app}\UFCPAS4Office"; DestName: "libeay32.dll"; Flags: regserver noregerror; Source: "升级包数据库升级脚本\*"; DestDir: "{app}\DBUpdate\Script\"; Flags: ignoreversion recursesubdirs createallsubdirs
;Source: "UFCPAS4Office\ssleay32.dll"; DestDir: "{app}\UFCPAS4Office"; DestName: "ssleay32.dll"; Flags: regserver noregerror; ;注册Office加载项,[run]段也加入bat文件注册双保险
;注册Office加载项,[run]段也加入bat文件注册双保险 Source: "DataConvert\Dts_dll\dtspkg.dll"; DestDir: "{app}\DataConvert\Dts_dll"; DestName: "dtspkg.dll"; Flags: regserver noregerror;
;Source: "UFCPAS4Office\UFCPAS4Office-32.dll"; DestDir: "{app}\UFCPAS4Office"; DestName: "UFCPAS4Office.dll"; Flags: regserver noregerror; Check: not IsOffice64 Source: "DataConvert\Dts_dll\dtspump.dll"; DestDir: "{app}\DataConvert\Dts_dll"; DestName: "dtspump.dll"; Flags: regserver noregerror;
;Source: "UFCPAS4Office\UFCPAS4Office-64.dll"; DestDir: "{app}\UFCPAS4Office"; DestName: "UFCPAS4Office.dll"; Flags: regserver noregerror; Check: IsOffice64
;注册UFSYA.ocx,[run]段也加入bat文件注册双保险 ;Office加载项换成新方式
;Source: "UFCPAS4Office\UFSYA-32.ocx"; DestDir: "{app}\UFCPAS4Office"; DestName: "UFSYA-32.ocx"; Flags: regserver noregerror 32bit; ;ource: "UFCPAS4Office\UFSYA-64.ocx"; DestDir: "{app}\UFCPAS4Office"; DestName: "UFSYA-64.ocx"; Flags: regserver noregerror 64bit; Check: IsWin64 Source: "VSTO\*"; DestDir: "{app}\VSTO"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "UFCPAS4Office\UFSY4Protocol.exe"; DestDir: "{app}\UFCPAS4Office"; Flags: ignoreversion recursesubdirs createallsubdirs;BeforeInstall: ClearTargetDir(ExpandConstant('{app}\UFCPAS4Office'))
;UFCPAS6.0新增 ;注册Office加载项,[run]段也加入bat文件注册双保险
Source: "cpas-apps\*"; DestDir: "{app}\cpas-apps"; Flags: ignoreversion recursesubdirs createallsubdirs ;Source: "UFCPAS4Office\libeay32.dll"; DestDir: "{app}\UFCPAS4Office"; DestName: "libeay32.dll"; Flags: regserver noregerror;
Source: "locales\zh-CN.pak"; DestDir: "{app}\locales"; Flags: ignoreversion recursesubdirs createallsubdirs ;Source: "UFCPAS4Office\ssleay32.dll"; DestDir: "{app}\UFCPAS4Office"; DestName: "ssleay32.dll"; Flags: regserver noregerror;
Source: "locales\en-US.pak"; DestDir: "{app}\locales"; Flags: ignoreversion recursesubdirs createallsubdirs ;注册Office加载项,[run]段也加入bat文件注册双保险
Source: "locales\zh-TW.pak"; DestDir: "{app}\locales"; Flags: ignoreversion recursesubdirs createallsubdirs ;Source: "UFCPAS4Office\UFCPAS4Office-32.dll"; DestDir: "{app}\UFCPAS4Office"; DestName: "UFCPAS4Office.dll"; Flags: regserver noregerror; Check: not IsOffice64
Source: "resources\*"; DestDir: "{app}\resources"; Flags: ignoreversion recursesubdirs createallsubdirs ;Source: "UFCPAS4Office\UFCPAS4Office-64.dll"; DestDir: "{app}\UFCPAS4Office"; DestName: "UFCPAS4Office.dll"; Flags: regserver noregerror; Check: IsOffice64
Source: "swiftshader\*"; DestDir: "{app}\swiftshader"; Flags: ignoreversion recursesubdirs createallsubdirs ;注册UFSYA.ocx,[run]段也加入bat文件注册双保险
Source: "chrome_100_percent.pak"; DestDir: "{app}"; Flags: ignoreversion ;Source: "UFCPAS4Office\UFSYA-32.ocx"; DestDir: "{app}\UFCPAS4Office"; DestName: "UFSYA-32.ocx"; Flags: regserver noregerror 32bit;
Source: "chrome_200_percent.pak"; DestDir: "{app}"; Flags:ignoreversion ;ource: "UFCPAS4Office\UFSYA-64.ocx"; DestDir: "{app}\UFCPAS4Office"; DestName: "UFSYA-64.ocx"; Flags: regserver noregerror 64bit; Check: IsWin64
Source: "cpas-WorkPlatform.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "d3dcompiler_47.dll"; DestDir: "{app}"; Flags: ignoreversion ;UFCPAS6.0新增
Source: "ffmpeg.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "cpas-apps\*"; DestDir: "{app}\cpas-apps"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "icudtl.dat"; DestDir: "{app}"; Flags: ignoreversion Source: "locales\zh-CN.pak"; DestDir: "{app}\locales"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "libEGL.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "locales\en-US.pak"; DestDir: "{app}\locales"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "libGLESv2.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "locales\zh-TW.pak"; DestDir: "{app}\locales"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "LICENSE.electron.txt"; DestDir: "{app}"; Flags: ignoreversion Source: "resources\*"; DestDir: "{app}\resources"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "LICENSES.chromium.html"; DestDir: "{app}"; Flags: ignoreversion Source: "swiftshader\*"; DestDir: "{app}\swiftshader"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "resources.pak"; DestDir: "{app}"; Flags: ignoreversion Source: "chrome_100_percent.pak"; DestDir: "{app}"; Flags: ignoreversion
Source: "snapshot_blob.bin"; DestDir: "{app}"; Flags: ignoreversion Source: "chrome_200_percent.pak"; DestDir: "{app}"; Flags:ignoreversion
Source: "start-日志.bat"; DestDir: "{app}"; Flags: ignoreversion Source: "cpas-WorkPlatform.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "v8_context_snapshot.bin"; DestDir: "{app}"; Flags: ignoreversion Source: "d3dcompiler_47.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "vk_swiftshader.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "ffmpeg.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "vk_swiftshader_icd.json"; DestDir: "{app}"; Flags: ignoreversion Source: "icudtl.dat"; DestDir: "{app}"; Flags: ignoreversion
Source: "libEGL.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "SysBPL\midas.dll"; DestDir: "{app}\SysBPL"; Flags: ignoreversion regserver Source: "libGLESv2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "LICENSE.electron.txt"; DestDir: "{app}"; Flags: ignoreversion
;先不打包审聊工具 Source: "LICENSES.chromium.html"; DestDir: "{app}"; Flags: ignoreversion
;Source: "UFAudChat\*"; DestDir: "{app}\UFAudChat";Excludes: "*\appdata\*"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "resources.pak"; DestDir: "{app}"; Flags: ignoreversion
Source: "snapshot_blob.bin"; DestDir: "{app}"; Flags: ignoreversion
Source: "start-日志.bat"; DestDir: "{app}"; Flags: ignoreversion
;创建空目录 Source: "v8_context_snapshot.bin"; DestDir: "{app}"; Flags: ignoreversion
[Dirs] Source: "vk_swiftshader.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "vk_swiftshader_icd.json"; DestDir: "{app}"; Flags: ignoreversion
;Name: "{app}\2025"
Name: "{app}\Temp" ;Source: "SysBPL\midas.dll"; DestDir: "{app}\SysBPL"; Flags: ignoreversion regserver
Name: "{app}\DBUpdate"
Name: "{app}\AppData" ;先不打包审聊工具
Name: "{app}\ProjectData" ;Source: "UFAudChat\*"; DestDir: "{app}\UFAudChat";Excludes: "*\appdata\*"; Flags: ignoreversion recursesubdirs createallsubdirs
[Languages]
Name: "chinesesimp"; MessagesFile: "compiler:Default.isl" ;创建空目录
[Messages] [Dirs]
[Registry] Root: HKU; Subkey: ".default\software\{#MyAppRegName4}"; ValueType: string; ValueName: "Path"; ValueData: "{app}\" Root: HKU; Subkey: ".default\software\{#MyAppRegName4}"; ValueType: string; ValueName: "ExeName"; ValueData: "{#MyAppExeName4}" ;Name: "{app}\2025"
Name: "{app}\Temp"
Root: HKU; Subkey: ".default\software\{#MyAppRegName6}"; ValueType: string; ValueName: "Path"; ValueData: "{app}\" Name: "{app}\DBUpdate"
Root: HKU; Subkey: ".default\software\{#MyAppRegName6}"; ValueType: string; ValueName: "ExeName"; ValueData: "{#MyAppExeName6}" Name: "{app}\AppData"
Root: HKCU; Subkey: "Control Panel\International"; ValueType: string; ValueName: "sShortDate"; ValueData: "yyyy-MM-dd" Name: "{app}\ProjectData"
;兼容性 [Languages]
root: HKCU ;Subkey: "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers";ValueType: string; ValueName: "{#SQL_Path}\SQLQuery\isqlw.exe"; ValueData: "WINXPSP3 RUNASADMIN" Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
root: HKCU ;Subkey: "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers";ValueType: string; ValueName: "{app}\{#MyAppExeName6}"; ValueData: "RUNASADMIN" [Messages]
root: HKCU ;Subkey: "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers";ValueType: string; ValueName: "{app}\UFCPAS4Office\注册Office加载项6.exe"; ValueData: "RUNASADMIN"
;CPAS在线底稿查看工具 [Registry]
;Root: HKCR; Subkey: "cpas"; ValueType: string; ValueData: "CPASWorkPaperViewer" Root: HKU; Subkey: ".default\software\{#MyAppRegName4}"; ValueType: string; ValueName: "Path"; ValueData: "{app}\"
;Root: HKCR; Subkey: "cpas"; ValueType: string; ValueName:"URL Protocol"; ValueData: "{app}\CPASProtocol.exe" Root: HKU; Subkey: ".default\software\{#MyAppRegName4}"; ValueType: string; ValueName: "ExeName"; ValueData: "{#MyAppExeName4}"
;Root: HKCR; Subkey: "cpas\DefaultIcon"; ValueType: string; ValueData: "{app}\CPASProtocol.exe,1"
;Root: HKCR; Subkey: "cpas\shell\open\command"; ValueType: string; ValueData: """{app}\CPASProtocol.exe"" ""%1""" Root: HKU; Subkey: ".default\software\{#MyAppRegName6}"; ValueType: string; ValueName: "Path"; ValueData: "{app}\"
; 或者只删除特定的 open 值(推荐) Root: HKU; Subkey: ".default\software\{#MyAppRegName6}"; ValueType: string; ValueName: "ExeName"; ValueData: "{#MyAppExeName6}"
Root: HKCU; Subkey: "Software\Microsoft\Office\16.0\Excel\Options"; ValueType: none; ValueName: "open"; Flags: deletevalue uninsdeletevalue; Root: HKCU; Subkey: "Control Panel\International"; ValueType: string; ValueName: "sShortDate"; ValueData: "yyyy-MM-dd"
Root: HKCU; Subkey: "Software\Microsoft\Office\15.0\Excel\Options"; ValueType: none; ValueName: "open"; Flags: deletevalue uninsdeletevalue;
Root: HKCU; Subkey: "Software\Microsoft\Office\14.0\Excel\Options"; ValueType: none; ValueName: "open"; Flags: deletevalue uninsdeletevalue; ;兼容性
root: HKCU ;Subkey: "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers";ValueType: string; ValueName: "{#SQL_Path}\SQLQuery\isqlw.exe"; ValueData: "WINXPSP3 RUNASADMIN"
root: HKCU ;Subkey: "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers";ValueType: string; ValueName: "{app}\{#MyAppExeName6}"; ValueData: "RUNASADMIN"
[INI] root: HKCU ;Subkey: "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers";ValueType: string; ValueName: "{app}\UFCPAS4Office\注册Office加载项6.exe"; ValueData: "RUNASADMIN"
;Filename: "{app}\config.ini"; Section: "config"; Key: "IsDebug"; string: "0"
;userConfig默认值 ;CPAS在线底稿查看工具
Filename: "{app}\Config\UserConfig.ini"; Section: "DBCONNECTION"; Key: "DBTYPE"; string: "MSSQL"; Flags: createkeyifdoesntexist ;Root: HKCR; Subkey: "cpas"; ValueType: string; ValueData: "CPASWorkPaperViewer"
Filename: "{app}\Config\UserConfig.ini"; Section: "DBCONNECTION"; Key: "SQLINSTANCE"; string: "{#SQL_ServerName}"; Flags: createkeyifdoesntexist ;Root: HKCR; Subkey: "cpas"; ValueType: string; ValueName:"URL Protocol"; ValueData: "{app}\CPASProtocol.exe"
Filename: "{app}\Config\UserConfig.ini"; Section: "DBCONNECTION"; Key: "SYSDATABASE"; string: "AudSys"; Flags: createkeyifdoesntexist ;Root: HKCR; Subkey: "cpas\DefaultIcon"; ValueType: string; ValueData: "{app}\CPASProtocol.exe,1"
Filename: "{app}\Config\UserConfig.ini"; Section: "UserConfig"; Key: "Skin"; string: "GTI"; Flags: createkeyifdoesntexist ;Root: HKCR; Subkey: "cpas\shell\open\command"; ValueType: string; ValueData: """{app}\CPASProtocol.exe"" ""%1"""
Filename: "{app}\Config\UserConfig.ini"; Section: "UserConfig"; Key: "FrmMainStyle"; string: "0"; Flags: createkeyifdoesntexist ; 或者只删除特定的 open 值(推荐)
Filename: "{app}\Config\UserConfig.ini"; Section: "UserConfig"; Key: "HomePageType"; string: "1"; Root: HKCU; Subkey: "Software\Microsoft\Office\16.0\Excel\Options"; ValueType: none; ValueName: "open"; Flags: deletevalue uninsdeletevalue;
Filename: "{app}\Config\UserConfig.ini"; Section: "UserConfig"; Key: "DefaultShowWorkPaperModule"; string: "1"; Flags: createkeyifdoesntexist Root: HKCU; Subkey: "Software\Microsoft\Office\15.0\Excel\Options"; ValueType: none; ValueName: "open"; Flags: deletevalue uninsdeletevalue;
Filename: "{app}\Config\UserConfig.ini"; Section: "AppLoginServer"; Key: "zserver"; string: "123.124.206.166"; Flags: createkeyifdoesntexist Root: HKCU; Subkey: "Software\Microsoft\Office\14.0\Excel\Options"; ValueType: none; ValueName: "open"; Flags: deletevalue uninsdeletevalue;
Filename: "{app}\Config\UserConfig.ini"; Section: "AppLoginServer"; Key: "zserverport"; string: "8080"; Flags: createkeyifdoesntexist
;Filename: "{app}\Config\UserConfig.ini"; Section: "SystemFunction"; Key: "CanEdit"; string: "1"; Flags: createkeyifdoesntexist [INI]
Filename: "{app}\Config\UserConfig.ini"; Section: "AuditReportOpt"; Key: "edittemplate"; string: "1"; Flags: createkeyifdoesntexist ;Filename: "{app}\config.ini"; Section: "config"; Key: "IsDebug"; string: "0"
Filename: "{app}\Config\UserConfig.ini"; Section: "AuditReportOpt"; Key: "Psjjd"; string: "第五部分 业务完成阶段工作底稿"; Flags: createkeyifdoesntexist ;userConfig默认值
Filename: "{app}\Config\UserConfig.ini"; Section: "AuditReportOpt"; Key: "sjjd"; string: "单体报告"; Flags: createkeyifdoesntexist Filename: "{app}\Config\UserConfig.ini"; Section: "DBCONNECTION"; Key: "DBTYPE"; string: "MSSQL"; Flags: createkeyifdoesntexist
Filename: "{app}\Config\UserConfig.ini"; Section: "DBCONNECTION"; Key: "SQLINSTANCE"; string: "{#SQL_ServerName}"; Flags: createkeyifdoesntexist
[Run] Filename: "{app}\Config\UserConfig.ini"; Section: "DBCONNECTION"; Key: "SYSDATABASE"; string: "AudSys"; Flags: createkeyifdoesntexist
Filename: "{app}\Tools\AudSQL2014Express_Setup(AudSQL2014实例).exe";StatusMsg: "安装AudSQL2014数据库"; Parameters: "/sp- /silent /norestart"; WorkingDir: "{app}"; Flags:runhidden; Filename: "{app}\Config\UserConfig.ini"; Section: "UserConfig"; Key: "Skin"; string: "GTI"; Flags: createkeyifdoesntexist
Filename: "msiexec";StatusMsg: "正在安装AudSQL2014数据库"; Parameters: "/i ""{app}\Tools\SQLServerNativeClient32.msi"" IACCEPTSQLNCLILICENSETERMS=YES /passive /log ""{app}\Tools\SQLClient安装日志.log"""; WorkingDir: "{app}"; Flags:runhidden; Check: not IsWin64 and not GetSQLClientIsInstall; Filename: "{app}\Config\UserConfig.ini"; Section: "UserConfig"; Key: "FrmMainStyle"; string: "0"; Flags: createkeyifdoesntexist
Filename: "msiexec";StatusMsg: "正在安装AudSQL2014数据库"; Parameters: "/i ""{app}\Tools\SQLServerNativeClient64.msi"" IACCEPTSQLNCLILICENSETERMS=YES /passive /log ""{app}\Tools\SQLClient安装日志.log"""; WorkingDir: "{app}"; Flags:runhidden; Check: IsWin64 and not GetSQLClientIsInstall; Filename: "{app}\Config\UserConfig.ini"; Section: "UserConfig"; Key: "HomePageType"; string: "1";
Filename: "net"; StatusMsg: "正在启动数据库"; Parameters: "start {#SQL_INSTANCE}"; Flags:runhidden nowait; Filename: "{app}\Config\UserConfig.ini"; Section: "UserConfig"; Key: "DefaultShowWorkPaperModule"; string: "1"; Flags: createkeyifdoesntexist
;Filename: "{app}\RegWorkPaperViewer.bat"; WorkingDir: "{app}\SysBPL"; Flags:runhidden nowait; Filename: "{app}\Config\UserConfig.ini"; Section: "AppLoginServer"; Key: "zserver"; string: "123.124.206.166"; Flags: createkeyifdoesntexist
;双重注册 ;注册Office加载项,[file]段也加入bat文件注册双保险 Filename: "{app}\Config\UserConfig.ini"; Section: "AppLoginServer"; Key: "zserverport"; string: "8080"; Flags: createkeyifdoesntexist
;Filename: "{app}\UFCPAS4Office\32位Office请执行我.bat"; Parameters: "notpause"; WorkingDir: "{app}\UFCPAS4Office"; Flags:runhidden nowait runasoriginaluser 32bit; Check: not IsOffice64; ;Filename: "{app}\UFCPAS4Office\64位Office请执行我.bat"; Parameters: "notpause"; WorkingDir: "{app}\UFCPAS4Office"; Flags:runhidden nowait runasoriginaluser 64bit; Check: IsOffice64;
;Filename: "{app}\UFCPAS4Office\注册Office加载项6.exe" ; Parameters: "-s"; WorkingDir: "{app}\UFCPAS4Office"; ;Filename: "{app}\Config\UserConfig.ini"; Section: "SystemFunction"; Key: "CanEdit"; string: "1"; Flags: createkeyifdoesntexist
Filename: "{app}\Config\UserConfig.ini"; Section: "AuditReportOpt"; Key: "edittemplate"; string: "1"; Flags: createkeyifdoesntexist
Filename: "{app}\Config\UserConfig.ini"; Section: "AuditReportOpt"; Key: "Psjjd"; string: "第五部分 业务完成阶段工作底稿"; Flags: createkeyifdoesntexist
;cpas6.0 office加载项 Filename: "{app}\Config\UserConfig.ini"; Section: "AuditReportOpt"; Key: "sjjd"; string: "单体报告"; Flags: createkeyifdoesntexist
Filename: "{app}\Tools\vstor_redist.exe"; StatusMsg: "VSTool工具"; Parameters: "/q /s"; WorkingDir: "{app}";
Filename: "msiexec";StatusMsg: "正在卸载cpas-report-office-addin.msi加载项"; Parameters: "/x ""{app}\Tools\cpas-report-office-addin.msi"" /qn /lv ""{app}\Tools\cpas-report-office-addin卸载日志.log"""; WorkingDir: "{app}"; ;Filename: "msiexec";StatusMsg: "正在安装UFCPAS6加载项"; Parameters: "/i ""{app}\Tools\cpas-report-office-addin.msi"" IACCEPTSQLNCLILICENSETERMS=YES /passive /lv ""{app}\Tools\cpas-report-office-addin安装日志.log"""; WorkingDir: "{app}"; Flags:runhidden; [Run]
Filename: "{app}\Tools\AudSQL2014Express_Setup(AudSQL2014实例).exe";StatusMsg: "安装AudSQL2014数据库"; Parameters: "/sp- /silent /norestart"; WorkingDir: "{app}"; Flags:runhidden;
Filename: "msiexec";StatusMsg: "正在安装UFCPAS6.1加载项"; Parameters: "/i ""{app}\Tools\cpasReport.msi"" IACCEPTSQLNCLILICENSETERMS=YES /passive /lv ""{app}\Tools\cpas-report-office-addin6-cpasReport安装日志.log"""; WorkingDir: "{app}"; Flags:runhidden; Filename: "msiexec";StatusMsg: "正在安装AudSQL2014数据库"; Parameters: "/i ""{app}\Tools\SQLServerNativeClient32.msi"" IACCEPTSQLNCLILICENSETERMS=YES /passive /log ""{app}\Tools\SQLClient安装日志.log"""; WorkingDir: "{app}"; Flags:runhidden; Check: not IsWin64 and not GetSQLClientIsInstall;
Filename: "{app}\VSTO\RegeditVSTO.exe" ; Parameters: ""; WorkingDir: "{app}\VSTO"; Filename: "msiexec";StatusMsg: "正在安装AudSQL2014数据库"; Parameters: "/i ""{app}\Tools\SQLServerNativeClient64.msi"" IACCEPTSQLNCLILICENSETERMS=YES /passive /log ""{app}\Tools\SQLClient安装日志.log"""; WorkingDir: "{app}"; Flags:runhidden; Check: IsWin64 and not GetSQLClientIsInstall;
Filename: "net"; StatusMsg: "正在启动数据库"; Parameters: "start {#SQL_INSTANCE}"; Flags:runhidden nowait;
;//需要与DcefBrowser.bpl在同一个文件内,否则报错; add by csb 查账通不要 Filename: "{app}\Tools\DcefBrowser_Setup.exe";StatusMsg: "安装导航图工具"; Parameters: "/sp- /silent /norestart ""/DIR={app}\SysBPL"""; WorkingDir: "{app}"; Flags:runhidden; ;Filename: "{app}\RegWorkPaperViewer.bat"; WorkingDir: "{app}\SysBPL"; Flags:runhidden nowait;
[UninstallRun] ;双重注册 ;注册Office加载项,[file]段也加入bat文件注册双保险
; 停止相关服务 ;;;; ;Filename: "{app}\UFCPAS4Office\32位Office请执行我.bat"; Parameters: "notpause"; WorkingDir: "{app}\UFCPAS4Office"; Flags:runhidden nowait runasoriginaluser 32bit; Check: not IsOffice64;
; 卸载 Office 加载项 ;Filename: "{app}\UFCPAS4Office\64位Office请执行我.bat"; Parameters: "notpause"; WorkingDir: "{app}\UFCPAS4Office"; Flags:runhidden nowait runasoriginaluser 64bit; Check: IsOffice64;
Filename: "msiexec"; Parameters: "/x ""{app}\Tools\cpasReport.msi"" /qn"; Flags: runhidden Filename: "{app}\VSTO\unInstallVsto.bat"; Parameters: "notpause"; Flags:runhidden; BeforeInstall: LogUninstallStep('Starting VSTO uninstallation') ; ;Filename: "{app}\UFCPAS4Office\注册Office加载项6.exe" ; Parameters: "-s"; WorkingDir: "{app}\UFCPAS4Office";
[Icons]
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName6}"; WorkingDir: "{app}\SysBpl";IconFilename: "{app}\AppData\pic\main.ico" ;cpas6.0 office加载项
Name: "{app}\启动{#MyAppName}"; Filename: "{app}\{#MyAppExeName6}"; WorkingDir: "{app}\SysBpl";IconFilename: "{app}\AppData\pic\main.ico" Filename: "{app}\Tools\vstor_redist.exe"; StatusMsg: "VSTool工具"; Parameters: "/q /s"; WorkingDir: "{app}";
;Name: "{app}\注册WorkPaperViewer"; Filename: "{app}\WorkPaperViewer.exe"; WorkingDir: "{app}\SysBpl" ; Parameters: "Reg" ;Name: "{app}\启动ConfigTool"; Filename: "{app}\ConfigTool.exe"; WorkingDir: "{app}\SysBpl"; Filename: "msiexec";StatusMsg: "正在卸载cpas-report-office-addin.msi加载项"; Parameters: "/x ""{app}\Tools\cpas-report-office-addin.msi"" /qn /lv ""{app}\Tools\cpas-report-office-addin卸载日志.log"""; WorkingDir: "{app}";
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName6}"; WorkingDir: "{app}\SysBpl";IconFilename: "{app}\AppData\pic\main.ico" ;Filename: "msiexec";StatusMsg: "正在安装UFCPAS6加载项"; Parameters: "/i ""{app}\Tools\cpas-report-office-addin.msi"" IACCEPTSQLNCLILICENSETERMS=YES /passive /lv ""{app}\Tools\cpas-report-office-addin安装日志.log"""; WorkingDir: "{app}"; Flags:runhidden;
;Name: "{group}\项目管理工具4"; Filename: "{app}\ProjectManager.exe"; WorkingDir: "{app}\SysBpl";IconFilename: "{app}\AppData\pic\main.ico"
Name: "{group}\CPAS6.0数据库初始化"; Filename: "{app}\SourceData\UFCPAS_Init.exe"; Parameters: "InstanceName=AudSql2014" Filename: "msiexec";StatusMsg: "正在安装UFCPAS6.1加载项"; Parameters: "/i ""{app}\Tools\cpasReport.msi"" IACCEPTSQLNCLILICENSETERMS=YES /passive /lv ""{app}\Tools\cpas-report-office-addin6-cpasReport安装日志.log"""; WorkingDir: "{app}"; Flags:runhidden;
Name: "{group}\卸载{#MyAppName}"; Filename: "{uninstallexe}" Filename: "{app}\VSTO\RegeditVSTO.exe" ; Parameters: ""; WorkingDir: "{app}\VSTO";
;Name: "{app}\UFCPAS4Office\取消注册Office加载项6"; Filename: "{app}\UFCPAS4Office\注册Office加载项6.exe";Parameters: "/u"
;//需要与DcefBrowser.bpl在同一个文件内,否则报错; add by csb 查账通不要
[Code] Filename: "{app}\Tools\DcefBrowser_Setup.exe";StatusMsg: "安装导航图工具"; Parameters: "/sp- /silent /norestart ""/DIR={app}\SysBPL"""; WorkingDir: "{app}"; Flags:runhidden;
function KillExe(Exename: PChar):integer; external 'KillExe@files:UFCPASSetupDll.dll stdcall setuponly';
function ProcessIsRun(Exename: PChar):boolean; external 'ProcessIsRun@files:UFCPASSetupDll.dll stdcall setuponly'; [UninstallRun]
function GetExcelIsWin64(): Boolean; external 'GetExcelIsWin64@files:UFCPASSetupDll.dll stdcall setuponly'; ; 停止相关服务
procedure ClearTargetDir(TargetDir: string); ;;;;
begin ; 卸载 Office 加载项
Log('清空目录判断逻辑执行: ' + TargetDir) Filename: "msiexec"; Parameters: "/x ""{app}\Tools\cpasReport.msi"" /qn"; Flags: runhidden
if DirExists(TargetDir) then Filename: "{app}\VSTO\unInstallVsto.bat"; Parameters: "notpause"; Flags:runhidden; BeforeInstall: LogUninstallStep('Starting VSTO uninstallation') ;
begin
// 删除所有文件和子目录 [Icons]
if DelTree(TargetDir, True, True, True) then Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName6}"; WorkingDir: "{app}\SysBpl";IconFilename: "{app}\AppData\pic\main.ico"
Log('成功清空目录: ' + TargetDir) Name: "{app}\启动{#MyAppName}"; Filename: "{app}\{#MyAppExeName6}"; WorkingDir: "{app}\SysBpl";IconFilename: "{app}\AppData\pic\main.ico"
else ;Name: "{app}\注册WorkPaperViewer"; Filename: "{app}\WorkPaperViewer.exe"; WorkingDir: "{app}\SysBpl" ; Parameters: "Reg"
Log('清空目录失败: ' + TargetDir); ;Name: "{app}\启动ConfigTool"; Filename: "{app}\ConfigTool.exe"; WorkingDir: "{app}\SysBpl";
end; Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName6}"; WorkingDir: "{app}\SysBpl";IconFilename: "{app}\AppData\pic\main.ico"
end; ;Name: "{group}\项目管理工具4"; Filename: "{app}\ProjectManager.exe"; WorkingDir: "{app}\SysBpl";IconFilename: "{app}\AppData\pic\main.ico"
Name: "{group}\CPAS6.0数据库初始化"; Filename: "{app}\SourceData\UFCPAS_Init.exe"; Parameters: "InstanceName=AudSql2014"
var Name: "{group}\卸载{#MyAppName}"; Filename: "{uninstallexe}"
LocalIsOffice64 :boolean; ;Name: "{app}\UFCPAS4Office\取消注册Office加载项6"; Filename: "{app}\UFCPAS4Office\注册Office加载项6.exe";Parameters: "/u"
//换个函数,直接使用GetExcelIsWin64函数,会报can't call proc
function IsOffice64(): boolean; [Code]
begin function KillExe(Exename: PChar):integer; external 'KillExe@files:UFCPASSetupDll.dll stdcall setuponly';
//不能使用方法,直接不行 result := LocalIsOffice64 function ProcessIsRun(Exename: PChar):boolean; external 'ProcessIsRun@files:UFCPASSetupDll.dll stdcall setuponly';
if LocalIsOffice64 then function GetExcelIsWin64(): Boolean; external 'GetExcelIsWin64@files:UFCPASSetupDll.dll stdcall setuponly';
result := true procedure ClearTargetDir(TargetDir: string);
else begin
result := false; Log('清空目录判断逻辑执行: ' + TargetDir)
end; if DirExists(TargetDir) then
// 在安装程序初始化时调用,返回 False 中断安装,返回 True 反之。 begin
function InitializeSetup (): Boolean; // 删除所有文件和子目录
begin if DelTree(TargetDir, True, True, True) then
LocalIsOffice64 := GetExcelIsWin64(); Log('成功清空目录: ' + TargetDir)
// 删除 C:\Test 中的所有文件和目录 // 但保留它本身目录 else
Log('清空目录失败: ' + TargetDir);
{ if IsWin64 then end;
begin end;
MsgBox('64 位系统', mbInformation, MB_OK);
end var
else begin LocalIsOffice64 :boolean;
MsgBox('32 位系统', mbInformation, MB_OK); //换个函数,直接使用GetExcelIsWin64函数,会报can't call proc
end; function IsOffice64(): boolean;
} begin
DeleteFile(ExpandConstant('{commondesktop}\智审IAS作业平台V1.0.lnk')); //不能使用方法,直接不行 result := LocalIsOffice64
DeleteFile(ExpandConstant('{commondesktop}\智审IAS作业平台V6.0.lnk')); if LocalIsOffice64 then
result := true; result := true
end; else
result := false;
function GetSQLClientIsInstall():boolean; end;
begin // 在安装程序初始化时调用,返回 False 中断安装,返回 True 反之。
result:= RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Classes\CLSID\{8F4A6B68-4F36-4e3c-BE81-BC7CA4E9C45C}\ProgID'); function InitializeSetup (): Boolean;
begin
end; LocalIsOffice64 := GetExcelIsWin64();
//默认安装路径 // 删除 C:\Test 中的所有文件和目录 // 但保留它本身目录
function GetDefaultDir(Param: String): String;
var { if IsWin64 then
OldPath,NewDrive:String; begin
C_FreeMB, C_TotalMB,T_FreeMB:Cardinal; MsgBox('64 位系统', mbInformation, MB_OK);
i:integer; end
begin else begin
if RegQueryStringValue(HKEY_USERS, '.default\software\'+ExpandConstant('{#MyAppRegName6}'),'Path', OldPath) then MsgBox('32 位系统', mbInformation, MB_OK);
begin //如果安装过,覆盖安装 end;
Result := OldPath; }
end else DeleteFile(ExpandConstant('{commondesktop}\智审IAS作业平台V1.0.lnk'));
begin DeleteFile(ExpandConstant('{commondesktop}\智审IAS作业平台V6.0.lnk'));
T_FreeMB:=0; NewDrive:='C:\'; result := true;
C_FreeMB:=0; C_TotalMB:=0; end;
for i:=67 to 77 do //c:~K:\ 哪个盘空间大,就默认选择哪个盘
begin function GetSQLClientIsInstall():boolean;
GetSpaceOnDisk(Chr(i)+':\', True, C_FreeMB, C_TotalMB); begin
if C_FreeMB>T_FreeMB then result:= RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Classes\CLSID\{8F4A6B68-4F36-4e3c-BE81-BC7CA4E9C45C}\ProgID');
begin
T_FreeMB:=C_FreeMB; end;
NewDrive:=Chr(i)+':\'; //默认安装路径
end; function GetDefaultDir(Param: String): String;
end; var
result:=NewDrive+ExpandConstant('{#MyAppEnName6}'); OldPath,NewDrive:String;
end; C_FreeMB, C_TotalMB,T_FreeMB:Cardinal;
i:integer;
end; begin
if RegQueryStringValue(HKEY_USERS, '.default\software\'+ExpandConstant('{#MyAppRegName6}'),'Path', OldPath) then
procedure SetEnv(aEnvName, aEnvValue: string; aIsInstall, aIsInsForAllUser: Boolean);//设置环境变量函数 begin //如果安装过,覆盖安装
var Result := OldPath;
sOrgValue: string; end else
S1, sFileName: string; begin
bRetValue, bInsForAllUser: Boolean; T_FreeMB:=0; NewDrive:='C:\';
SL: TStringList; C_FreeMB:=0; C_TotalMB:=0;
x: integer; for i:=67 to 77 do //c:~K:\ 哪个盘空间大,就默认选择哪个盘
begin begin
bInsForAllUser := aIsInsForAllUser; GetSpaceOnDisk(Chr(i)+':\', True, C_FreeMB, C_TotalMB);
if UsingWinNT then if C_FreeMB>T_FreeMB then
begin begin
if bInsForAllUser then T_FreeMB:=C_FreeMB;
bRetValue := RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', aEnvName, sOrgValue) NewDrive:=Chr(i)+':\';
else end;
bRetValue := RegQueryStringValue(HKEY_CURRENT_USER, 'Environment', aEnvName, sOrgValue) end;
sOrgValue := Trim(sOrgValue); result:=NewDrive+ExpandConstant('{#MyAppEnName6}');
begin end;
S1 := aEnvValue;
if pos(Uppercase(s1), Uppercase(sOrgValue)) = 0 then //还没有加入 end;
begin
if aIsInstall then procedure SetEnv(aEnvName, aEnvValue: string; aIsInstall, aIsInsForAllUser: Boolean);//设置环境变量函数
begin var
x := Length(sOrgValue); sOrgValue: string;
if (x > 0) and (StringOfChar(sOrgValue[x], 1) <> ';') then S1, sFileName: string;
sOrgValue := sOrgValue + ';'; bRetValue, bInsForAllUser: Boolean;
sOrgValue := sOrgValue + S1; SL: TStringList;
end; x: integer;
end else begin
begin bInsForAllUser := aIsInsForAllUser;
if not aIsInstall then if UsingWinNT then
begin begin
StringChangeEx(sOrgValue, S1 + ';', '', True); if bInsForAllUser then
StringChangeEx(sOrgValue, S1, '', True); bRetValue := RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', aEnvName, sOrgValue)
end; else
end; bRetValue := RegQueryStringValue(HKEY_CURRENT_USER, 'Environment', aEnvName, sOrgValue)
sOrgValue := Trim(sOrgValue);
if bInsForAllUser then begin
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', aEnvName, sOrgValue) S1 := aEnvValue;
else if pos(Uppercase(s1), Uppercase(sOrgValue)) = 0 then //还没有加入
begin begin
if (not aIsInstall) and (Trim(sOrgValue) = '') then if aIsInstall then
RegDeleteValue(HKEY_CURRENT_USER, 'Environment', aEnvName) begin
else x := Length(sOrgValue);
RegWriteStringValue(HKEY_CURRENT_USER, 'Environment', aEnvName, sOrgValue); if (x > 0) and (StringOfChar(sOrgValue[x], 1) <> ';') then
end; sOrgValue := sOrgValue + ';';
end; sOrgValue := sOrgValue + S1;
end else //非NT 系统,如Win98 end;
begin end else
SL := TStringList.Create; begin
try if not aIsInstall then
sFileName := ExpandConstant('{sd}\autoexec.bat'); begin
LoadStringFromFile(sFileName, S1); StringChangeEx(sOrgValue, S1 + ';', '', True);
SL.Text := s1; StringChangeEx(sOrgValue, S1, '', True);
s1 := '"' + aEnvValue + '"'; end;
s1 := 'set '+aEnvName +'=%path%;' + s1 ; end;
bRetValue := False; if bInsForAllUser then
x := SL.IndexOf(s1); RegWriteStringValue(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', aEnvName, sOrgValue)
if x = -1 then else
begin begin
if aIsInstall then if (not aIsInstall) and (Trim(sOrgValue) = '') then
begin RegDeleteValue(HKEY_CURRENT_USER, 'Environment', aEnvName)
SL.Add(s1); else
bRetValue := True; RegWriteStringValue(HKEY_CURRENT_USER, 'Environment', aEnvName, sOrgValue);
end; end;
end else //还没添加 end;
if not aIsInstall then end else //非NT 系统,如Win98
begin begin
SL.Delete(x); SL := TStringList.Create;
bRetValue := True; try
end; sFileName := ExpandConstant('{sd}\autoexec.bat');
LoadStringFromFile(sFileName, S1);
if bRetValue then SL.Text := s1;
SL.SaveToFile(sFileName); s1 := '"' + aEnvValue + '"';
finally s1 := 'set '+aEnvName +'=%path%;' + s1 ;
SL.free;
end; bRetValue := False;
x := SL.IndexOf(s1);
end; if x = -1 then
end; begin
if aIsInstall then
procedure CurPageChanged ( CurPageID : Integer); begin
begin SL.Add(s1);
bRetValue := True;
end; end;
//安装完成时 end else //还没添加
procedure CurStepChanged(CurStep: TSetupStep);//设置日期格式,生效,日期格式是在 [Registry] 段设置的 if not aIsInstall then
var ResultCode:integer; logfilepathname, logfilename, newfilepathname: string; begin
begin SL.Delete(x);
logfilepathname := ExpandConstant('{log}'); bRetValue := True;
logfilename := ExtractFileName(logfilepathname); end;
newfilepathname := ExpandConstant('{app}\') + logfilename;
if bRetValue then
if CurStep = ssPostInstall then SL.SaveToFile(sFileName);
begin finally
PostMessage (HWND_BROADCAST,$001A, 0,0);//$001A=WM_SETTINGCHANGE SendMessage hui si ji SL.free;
end;
SetEnv('path',ExpandConstant('{app}\SysBpl'),true,true); //在这儿调用,一定在这儿调用,安装完无须重启,立即生效
end;
Exec('cmd.exe',ExpandConstant('/c "set Path={app}\SysBPL"'),'',SW_Hide,ewNoWait, ResultCode);//环境变量生效 end;
//改变Win10下文件拖放到底稿平台,不起作用
RegWriteDWordValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System', 'EnableLUA', 0); procedure CurPageChanged ( CurPageID : Integer);
begin
// msgBox(ExpandConstant('{app}\SysBpl'), mbInformation, MB_OK);
//SetEnv('path','{app}/bin',true,true); end;
end //安装完成时
else procedure CurStepChanged(CurStep: TSetupStep);//设置日期格式,生效,日期格式是在 [Registry] 段设置的
if CurStep=ssInstall then var ResultCode:integer; logfilepathname, logfilename, newfilepathname: string;
begin begin
Exec('net', ExpandConstant('stop {#SQL_INSTANCE}'), '', SW_Hide,ewWaitUntilTerminated, ResultCode); logfilepathname := ExpandConstant('{log}');
DelTree(ExpandConstant('{app}\resources'), False, True, True); // add by zyp 23-06-14 删除原来的resources,整个目录替换 logfilename := ExtractFileName(logfilepathname);
DelTree(ExpandConstant('{app}\CpasCloudSvr'), False, True, True); // add by zyp 23-07-01 sqlite表结构有调整 newfilepathname := ExpandConstant('{app}\') + logfilename;
DelTree(ExpandConstant('{app}\AppData\Files\报告模版'), False, True, True); //报告模版 需清楚旧模板
DelTree(ExpandConstant('{app}\AppData\Files\底稿模板'), False, True, True); //询证函模板 需清楚旧模板 if CurStep = ssPostInstall then
//DelTree(ExpandConstant('{app}\AppData\Nav'), False, True, True); //询证函模板 需清楚旧模板 begin
DelTree(ExpandConstant('{app}\演示数据'), False, True, True); //询证函模板 需清楚旧模板 PostMessage (HWND_BROADCAST,$001A, 0,0);//$001A=WM_SETTINGCHANGE SendMessage hui si ji
DelTree(ExpandConstant('{app}\审计指引临时目录'), False, True, True);
DelTree(ExpandConstant('{app}\DBUpdate'), False, True, True); // 删除老脚本,避免某些老的升级脚本误执行 SetEnv('path',ExpandConstant('{app}\SysBpl'),true,true); //在这儿调用,一定在这儿调用,安装完无须重启,立即生效
// DelTree(ExpandConstant('{app}\AppData\Files\询证函模版'), False, True, True); //12.08培训后 此行不要
Exec('cmd.exe',ExpandConstant('/c "set Path={app}\SysBPL"'),'',SW_Hide,ewNoWait, ResultCode);//环境变量生效
end else //改变Win10下文件拖放到底稿平台,不起作用
if CurStep=ssDone then RegWriteDWordValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System', 'EnableLUA', 0);
begin //暂时不行,找不到bpl
//ShellExec('open',ExpandConstant('{app}\{#MyAppExeName}'),'', ExpandConstant('{app}\SysBpl'), SW_Hide,ewNoWait, ResultCode) // msgBox(ExpandConstant('{app}\SysBpl'), mbInformation, MB_OK);
FileCopy(logfilepathname, newfilepathname, false); //SetEnv('path','{app}/bin',true,true);
ShellExec('open',ExpandConstant('{app}\SourceData\UFCPAS_Init.exe'),'InstanceName=AudSql2014 autoini', ExpandConstant('{app}'), SW_Show,ewWaitUntilTerminated, ResultCode) end
//完成后执行数据初始化 else
if CurStep=ssInstall then
end; begin
end; Exec('net', ExpandConstant('stop {#SQL_INSTANCE}'), '', SW_Hide,ewWaitUntilTerminated, ResultCode);
DelTree(ExpandConstant('{app}\resources'), False, True, True); // add by zyp 23-06-14 删除原来的resources,整个目录替换
//非法字符可能引起SQLServer语句出现问题 add by csb 2017-10-30 DelTree(ExpandConstant('{app}\CpasCloudSvr'), False, True, True); // add by zyp 23-07-01 sqlite表结构有调整
function ExistsInvalidChar(str:string):boolean; DelTree(ExpandConstant('{app}\AppData\Files\报告模版'), False, True, True); //报告模版 需清楚旧模板
begin DelTree(ExpandConstant('{app}\AppData\Files\底稿模板'), False, True, True); //询证函模板 需清楚旧模板
result := (pos('''', str) >0 ) //DelTree(ExpandConstant('{app}\AppData\Nav'), False, True, True); //询证函模板 需清楚旧模板
or (pos('!', str) >0 ) DelTree(ExpandConstant('{app}\演示数据'), False, True, True); //询证函模板 需清楚旧模板
or (pos('*', str) >0 ) DelTree(ExpandConstant('{app}\审计指引临时目录'), False, True, True);
or (pos('?', str) >0 ) DelTree(ExpandConstant('{app}\DBUpdate'), False, True, True); // 删除老脚本,避免某些老的升级脚本误执行
or (pos('"', str) >0 ) // DelTree(ExpandConstant('{app}\AppData\Files\询证函模版'), False, True, True); //12.08培训后 此行不要
or (pos('<', str) >0 )
or (pos('>', str) >0 ) ; end else
if CurStep=ssDone then
begin //暂时不行,找不到bpl
end; //ShellExec('open',ExpandConstant('{app}\{#MyAppExeName}'),'', ExpandConstant('{app}\SysBpl'), SW_Hide,ewNoWait, ResultCode)
function NextButtonClick ( CurPageID : Integer): Boolean; FileCopy(logfilepathname, newfilepathname, false);
var ShellExec('open',ExpandConstant('{app}\SourceData\UFCPAS_Init.exe'),'InstanceName=AudSql2014 autoini', ExpandConstant('{app}'), SW_Show,ewWaitUntilTerminated, ResultCode)
aProcessIsRun: boolean; //完成后执行数据初始化
// ResultCode:integer;
begin end;
if (CurPageID = wpSelectDir) then//选择路径的界面,点击下一步时执行 add by csb 2017-10-30 end;
begin
result :=not ExistsInvalidChar(ExpandConstant('{app}')); //非法字符可能引起SQLServer语句出现问题 add by csb 2017-10-30
if not result then function ExistsInvalidChar(str:string):boolean;
begin begin
MsgBox('文件夹名不能包含下列任何字符:'+#13#10+#13#10+'/ : * ? " < > | '' ! ', mbCriticalError, MB_OK); result := (pos('''', str) >0 )
Exit; or (pos('!', str) >0 )
end; or (pos('*', str) >0 )
or (pos('?', str) >0 )
aProcessIsRun := ProcessIsRun('UFCPAS4.exe') or ProcessIsRun('ProjectManager.exe') or ProcessIsRun('CpasCloudSvr.exe') or (pos('"', str) >0 )
or ProcessIsRun('cpas-WorkPlatform.exe'); or (pos('<', str) >0 )
if aProcessIsRun then or (pos('>', str) >0 ) ;
begin
result := ( MsgBox('必须关闭正在运行的审计软件才能继续,是否关闭正在运行的软件?', mbConfirmation, MB_YESNO) = IDYES );
if result then end;
begin function NextButtonClick ( CurPageID : Integer): Boolean;
KillExe('UFCPAS4.exe'); var
KillExe('ProjectManager.exe'); aProcessIsRun: boolean;
KillExe('CpasCloudSvr.exe'); // ResultCode:integer;
KillExe('cpas-WorkPlatform.exe'); begin
end if (CurPageID = wpSelectDir) then//选择路径的界面,点击下一步时执行 add by csb 2017-10-30
end; begin
end result :=not ExistsInvalidChar(ExpandConstant('{app}'));
else if not result then
result := true; begin
end; MsgBox('文件夹名不能包含下列任何字符:'+#13#10+#13#10+'/ : * ? " < > | '' ! ', mbCriticalError, MB_OK);
Exit;
end;
procedure LogUninstallStep(Step: string);
begin aProcessIsRun := ProcessIsRun('UFCPAS4.exe') or ProcessIsRun('ProjectManager.exe') or ProcessIsRun('CpasCloudSvr.exe')
SaveStringToFile(ExpandConstant('{app}\uninstall_detailed.log'), '[' + GetDateTimeString('yyyy/mm/dd hh:nn:ss', '-', ':') + '] ' + Step + #13#10, True); or ProcessIsRun('cpas-WorkPlatform.exe');
end; if aProcessIsRun then
begin
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);//删除环境变量 result := ( MsgBox('必须关闭正在运行的审计软件才能继续,是否关闭正在运行的软件?', mbConfirmation, MB_YESNO) = IDYES );
begin if result then
begin
case CurUninstallStep of KillExe('UFCPAS4.exe');
usUninstall: KillExe('ProjectManager.exe');
begin KillExe('CpasCloudSvr.exe');
// 用户点击"卸载"后立即执行 KillExe('cpas-WorkPlatform.exe');
// 此时文件还未开始删除 end
// MsgBox('开始卸载...', mbInformation, MB_OK); end;
// Filename: "msiexec";StatusMsg: "正在卸载cpas-report-office-addin.msi加载项"; Parameters: "/x ""{app}\Tools\cpas-report-office-addin.msi"" /qn /lv ""{app}\Tools\cpas-report-office-addin卸载日志.log"""; WorkingDir: "{app}"; end
else
end; result := true;
usPostUninstall: end;
begin
// 所有文件删除完成后执行
// 此时安装目录已被移除 procedure LogUninstallStep(Step: string);
SetEnv('path',ExpandConstant('{app}\SysBpl'),false,true); begin
end; SaveStringToFile(ExpandConstant('{app}\uninstall_detailed.log'), '[' + GetDateTimeString('yyyy/mm/dd hh:nn:ss', '-', ':') + '] ' + Step + #13#10, True);
end; end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);//删除环境变量
begin
case CurUninstallStep of
usUninstall:
begin
// 用户点击"卸载"后立即执行
// 此时文件还未开始删除
// MsgBox('开始卸载...', mbInformation, MB_OK);
// Filename: "msiexec";StatusMsg: "正在卸载cpas-report-office-addin.msi加载项"; Parameters: "/x ""{app}\Tools\cpas-report-office-addin.msi"" /qn /lv ""{app}\Tools\cpas-report-office-addin卸载日志.log"""; WorkingDir: "{app}";
end;
usPostUninstall:
begin
// 所有文件删除完成后执行
// 此时安装目录已被移除
SetEnv('path',ExpandConstant('{app}\SysBpl'),false,true);
end;
end;
end; end;
\ No newline at end of file
...@@ -108,7 +108,7 @@ pipeline { ...@@ -108,7 +108,7 @@ pipeline {
) )
string(name: 'NODE_WORKING_DIR', defaultValue: ' G:\\cpas-framework', description: 'electron打包脚本执行的工作目录 G:\\cpas-framework or C:/Users/Administrator/Desktop/youdatasumCode/framework') string(name: 'NODE_WORKING_DIR', defaultValue: ' G:\\cpas-framework', description: 'electron打包脚本执行的工作目录 G:\\cpas-framework or C:/Users/Administrator/Desktop/youdatasumCode/framework')
string(name: 'BRANCH_NAME', defaultValue: 'unknown', description: '要构建的分支名称') string(name: 'BRANCH_NAME', defaultValue: 'unknown', description: '要构建的分支名称')
string(name: 'INSTALLATION_DIR', defaultValue: '', description: '安装包打包目录:E:/CPAS6-101 UFCPAS6.0 致同智审IAS版_测试版') string(name: 'INSTALLATION_DIR', defaultValue: '', description: '安装包打包目录:E:/CPAS6-101-UFCPAS6-zt')
string(name: 'PUBLISH_DIR', defaultValue: 'E:/产品安装包/05 大客户专版/109 致同/CPAS6.0 IAS版', description: '发布目录:E:/产品安装包/05 大客户专版/109 致同/CPAS6.0 IAS版') string(name: 'PUBLISH_DIR', defaultValue: 'E:/产品安装包/05 大客户专版/109 致同/CPAS6.0 IAS版', description: '发布目录:E:/产品安装包/05 大客户专版/109 致同/CPAS6.0 IAS版')
} }
......
...@@ -133,6 +133,12 @@ async function main() { ...@@ -133,6 +133,12 @@ async function main() {
console.log("Starting file copy..."); console.log("Starting file copy...");
await copyFiles(src, dest, subFolders); await copyFiles(src, dest, subFolders);
console.log("File copy completed."); console.log("File copy completed.");
// If it's a file, copy directly
fs.copyFile("./CPAS6Setup_IAS.iss", dest, fs.constants.COPYFILE_FICLONE, (err) => {
if (err) {
new Error(`Error copying file: ${err}`);
}
});
// Run the updateVersion.js script // Run the updateVersion.js script
console.log("Running updateVersion.js..."); console.log("Running updateVersion.js...");
...@@ -141,7 +147,7 @@ async function main() { ...@@ -141,7 +147,7 @@ async function main() {
// Run ISCC to compile the installer // Run ISCC to compile the installer
console.log("Running ISCC.exe..."); console.log("Running ISCC.exe...");
await execCommand(`ISCC.exe "${dest}/CPAS6Setup_智审IAS作业平台.iss"`); await execCommand(`ISCC.exe "${dest}/CPAS6Setup_IAS.iss"`);
console.log("ISCC.exe completed."); console.log("ISCC.exe completed.");
console.log("Script execution completed successfully."); console.log("Script execution completed successfully.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment