; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "华高生产工具" #define MyAppVersion "4.37.10000.23031" #define MyAppSetupName "HGProductionTool_App_Setup" #define MyAppDefSetupDir "HGProductionTool" #define MyAppPublisher "宁波华高信息科技有限公司" [Setup] ; NOTE: The value of AppId uniquely identifies this application. ; Do not use the same AppId value in installers for other applications. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) AppId={{52021EA6-BCE5-4E07-8766-B6DC7C61FB51} AppName={#MyAppName} AppVerName={#MyAppName} AppVersion={#MyAppVersion} DefaultDirName={pf}\{#MyAppDefSetupDir} DefaultGroupName={#MyAppName} VersionInfoVersion={#MyAppVersion} OutputDir=..\..\package OutputBaseFilename={#MyAppSetupName}_{#MyAppVersion} Compression=lzma AppPublisher={#MyAppPublisher} SolidCompression=no UninstallIconFile=uninstall.ico SetupIconFile=HGProductionTool_App.ico LicenseFile=HGProductionTool_App_License.txt AlwaysShowComponentsList=true PrivilegesRequired=admin DisableWelcomePage=no [Languages] Name: "zn"; MessagesFile: "compiler:Languages/ChineseSimp.isl" [Files] ; app Source: ".\HGProductionTool_App.ico"; DestDir: "{app}\"; Flags: ignoreversion ; app32 Source: "..\..\x86\Qt\iconengines\*"; DestDir: "{app}\iconengines\"; Flags: ignoreversion; Source: "..\..\x86\Qt\imageformats\*"; DestDir: "{app}\imageformats\"; Flags: ignoreversion; Source: "..\..\x86\Qt\platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion; Source: "..\..\x86\Qt\styles\*"; DestDir: "{app}\styles\"; Flags: ignoreversion; Source: "..\..\x86\Qt\translations\*"; DestDir: "{app}\translations\"; Flags: ignoreversion; Source: "..\..\x86\Qt\*.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\Release\ProductionTool.exe"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\Release\HGBase.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\Release\HGImgFmt.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\Release\HGImgProc.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\Release\libmysql.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\Release\HGPdtToolDb.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\Release\test.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\Release\msvcp140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\Release\vcruntime140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\Release\concrt140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\OEM\huagao\sane.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\OEM\huagao\scanner.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\x86\Release\lang.dll"; DestDir: "{app}\"; Flags: ignoreversion; Source: "..\..\..\lang\*"; DestDir: "{app}\lang\"; Flags: ignoreversion; ;拷贝驱动 Source: "..\..\usb\huagao\huagaousb.inf"; DestDir: "{app}\driver\"; Flags: ignoreversion recursesubdirs; Source: "..\..\usb\huagao\huagaousb.cat"; DestDir: "{app}\driver\"; Flags: ignoreversion recursesubdirs; Source: "..\..\x86\Release\DPInst32.exe"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs; Check: not IsWin64 Source: "..\..\x64\Release\DPInst64.exe"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs; Check: IsWin64 [INI] [Icons] Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\ProductionTool.exe" Name: "{group}\{#MyAppName}"; Filename: "{app}\ProductionTool.exe" Name: "{group}\{cm:UninstallProgram, {#MyAppName}}"; Filename: "{uninstallexe}"; [Code] function SetUninstallIcon(iconPath:string): Boolean; var InstalledVersion,SubKeyName: String; begin SubKeyName := 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{52021EA6-BCE5-4E07-8766-B6DC7C61FB51}_is1'; RegWriteStringValue(HKLM,SubKeyName,'DisplayIcon',iconPath); end; procedure CurPageChanged(CurPageID: Integer); begin if CurPageID = wpFinished then begin SetUninstallIcon(ExpandConstant('{app}\HGProductionTool_App.ico')); end; end; procedure CurUninstallStepChanged(CurUninstallStep:TUninstallStep); begin if CurUninstallStep = usDone then begin DelTree(ExpandConstant('{app}'), True, True, True); end; end; [Run] Filename: "{app}\DPInst32"; Parameters: "/path ""{app}\driver"" /sw /se /lm /f"; Check: not IsWin64; Flags: runascurrentuser Filename: "{app}\DPInst64"; Parameters: "/path ""{app}\driver"" /sw /se /lm /f"; Check: IsWin64; Flags: runascurrentuser Filename: "{app}\ProductionTool.exe"; Description: "{cm:LaunchProgram, {#MyAppName}}"; Flags: postinstall nowait skipifsilent runascurrentuser [UninstallRun] ; 卸载驱动 ;Filename: "{app}\DPInst32"; Parameters: "/u ""{app}\driver\huagaousb.inf"" /q /d"; Check: not IsWin64; Flags: runascurrentuser ;Filename: "{app}\DPInst64"; Parameters: "/u ""{app}\driver\huagaousb.inf"" /q /d"; Check: IsWin64; Flags: runascurrentuser