mirror of http://192.168.10.5:8099/sane/release
196 lines
9.6 KiB
Plaintext
196 lines
9.6 KiB
Plaintext
; Script generated by the Inno Setup Script Wizard.
|
||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||
#define MyAppName "华高扫描仪软件(64位)"
|
||
#define MyAppVersion "4.17.10100.22221"
|
||
#define MyAppSetupName "HuaGoScan_App_Setup_x64"
|
||
#define MyAppDefSetupDir "HuaGoScan"
|
||
#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={{F50A4E10-3E42-446C-A63A-DF7848C61B31}
|
||
AppName={#MyAppName}
|
||
AppVerName={#MyAppName}
|
||
AppVersion={#MyAppVersion}
|
||
DefaultDirName={pf}\{#MyAppDefSetupDir}
|
||
DefaultGroupName={#MyAppName}
|
||
VersionInfoVersion={#MyAppVersion}
|
||
OutputDir=..\..\package\huagao
|
||
OutputBaseFilename={#MyAppSetupName}_{#MyAppVersion}
|
||
Compression=lzma
|
||
AppPublisher={#MyAppPublisher}
|
||
SolidCompression=yes
|
||
UninstallIconFile=uninstall.ico
|
||
SetupIconFile=HuaGoScan_App.ico
|
||
LicenseFile=HuaGoScan_App_License.txt
|
||
AlwaysShowComponentsList=true
|
||
ArchitecturesInstallIn64BitMode=x64
|
||
|
||
[Languages]
|
||
Name: "zn"; MessagesFile: "compiler:Languages/Chinese.isl"
|
||
|
||
[Components]
|
||
Name: "Upgrade"; Description: "在线升级功能" ; Types: Full
|
||
Name: "TwainG100"; Description: "HUAGOSCAN G100 TWAIN" ; Types: Full
|
||
Name: "TwainG139"; Description: "HUAGOSCAN G139 TWAIN" ; Types: Full
|
||
Name: "TwainG200"; Description: "HUAGOSCAN G200 TWAIN" ; Types: Full
|
||
Name: "TwainG239"; Description: "HUAGOSCAN G239 TWAIN" ; Types: Full
|
||
Name: "TwainG300"; Description: "HUAGOSCAN G300 TWAIN" ; Types: Full
|
||
Name: "TwainG400"; Description: "HUAGOSCAN G400 TWAIN" ; Types: Full
|
||
Name: "TwainG402"; Description: "HUAGOSCAN G402 TWAIN" ; Types: Full
|
||
Name: "TwainG439"; Description: "HUAGOSCAN G439 TWAIN" ; Types: Full
|
||
|
||
[Files]
|
||
|
||
; app
|
||
Source: ".\HuaGoScan_App.ico"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\..\..\code_app\doc\scanner\HuaGoScan_App_Help_manual.pdf"; DestDir: "{app}\"; Flags: ignoreversion
|
||
|
||
Source: "..\..\x64\Release\hwusbdev.key"; DestDir: "{app}\"; Flags: ignoreversion
|
||
|
||
Source: "..\..\x64\Qt\iconengines\*"; DestDir: "{app}\iconengines\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Qt\imageformats\*"; DestDir: "{app}\imageformats\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Qt\platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Qt\styles\*"; DestDir: "{app}\styles\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Qt\translations\*"; DestDir: "{app}\translations\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Qt\*.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
|
||
Source: "..\..\x64\Release\HuaGoScan.exe"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\HGUpgradeApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade;
|
||
Source: "..\..\x64\Release\cnocr.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\doc_seg.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\ExportFile.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\FormEx.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\GetPdf.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\GetRtf.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\GetXls.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\hanwangOCRdetect.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\hasp_windows_x64_113819.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\HGBase.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\HGImgFmt.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\HGImgProc.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\HGVersion.dll"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade;
|
||
Source: "..\..\x64\Release\HwOcrSdk.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\libmupdf.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\libzip.org.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\mp30.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\ofd.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\pdflib.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\PDFParse.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\tinyxml2.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\msvcp140.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\vcruntime140.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\concrt140.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\zlib.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
|
||
Source: "..\..\x64\OEM\huagao\sane.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\OEM\huagao\scanner.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\OEM\huagao\huagaotwain100.ds"; DestDir: "{win}\twain_32\HuaGoTwain\x64\"; Flags: ignoreversion; Components: TwainG100;
|
||
Source: "..\..\x64\OEM\huagao\huagaotwain139.ds"; DestDir: "{win}\twain_32\HuaGoTwain\x64\"; Flags: ignoreversion; Components: TwainG139;
|
||
Source: "..\..\x64\OEM\huagao\huagaotwain200.ds"; DestDir: "{win}\twain_32\HuaGoTwain\x64\"; Flags: ignoreversion; Components: TwainG200;
|
||
Source: "..\..\x64\OEM\huagao\huagaotwain239.ds"; DestDir: "{win}\twain_32\HuaGoTwain\x64\"; Flags: ignoreversion; Components: TwainG239;
|
||
Source: "..\..\x64\OEM\huagao\huagaotwain300.ds"; DestDir: "{win}\twain_32\HuaGoTwain\x64\"; Flags: ignoreversion; Components: TwainG300;
|
||
Source: "..\..\x64\OEM\huagao\huagaotwain400.ds"; DestDir: "{win}\twain_32\HuaGoTwain\x64\"; Flags: ignoreversion; Components: TwainG400;
|
||
Source: "..\..\x64\OEM\huagao\huagaotwain402.ds"; DestDir: "{win}\twain_32\HuaGoTwain\x64\"; Flags: ignoreversion; Components: TwainG402;
|
||
Source: "..\..\x64\OEM\huagao\huagaotwain439.ds"; DestDir: "{win}\twain_32\HuaGoTwain\x64\"; Flags: ignoreversion; Components: TwainG439;
|
||
|
||
;拷贝驱动
|
||
Source: "..\..\x64\Release\scannerusb.inf"; DestDir: "{app}\driver\"; Flags: ignoreversion recursesubdirs;
|
||
Source: "..\..\x64\Release\scannerusb.cat"; DestDir: "{app}\driver\"; Flags: ignoreversion recursesubdirs;
|
||
Source: "..\..\x64\Release\DPInst64.exe"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs;
|
||
|
||
; 临时使用
|
||
Source: "..\..\x86\Release\HGRemoveOldApp.exe"; DestDir: "{tmp}\"; Flags: ignoreversion
|
||
Source: "..\..\x64\Release\HGCheckNewApp.exe"; DestDir: "{app}\"; Flags: ignoreversion
|
||
|
||
|
||
[INI]
|
||
|
||
[Icons]
|
||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\HuaGoScan.exe"
|
||
Name: "{group}\{#MyAppName}"; Filename: "{app}\HuaGoScan.exe"
|
||
Name: "{group}\华高扫描仪软件帮助文档"; Filename: "{app}\HuaGoScan_App_Help_manual.pdf"
|
||
Name: "{group}\{cm:UninstallProgram, {#MyAppName}}"; Filename: "{uninstallexe}";
|
||
|
||
[Registry]
|
||
Root: HKLM; Subkey: "Software\HuaGoScan"; ValueType: string; ValueName: "AppDirectory"; ValueData: "{app}"; Flags: uninsdeletekey
|
||
Root: HKLM; Subkey: "Software\HuaGoScan"; ValueType: string; ValueName: "Application"; ValueData: "{app}\HuaGoScan.exe"; Flags: uninsdeletekey
|
||
Root: HKLM; Subkey: "Software\HuaGoScan"; ValueType: string; ValueName: "AppVersion"; ValueData: "{#MyAppVersion}"; Flags: uninsdeletekey
|
||
|
||
[Code]
|
||
|
||
function InitializeSetup(): boolean;
|
||
var
|
||
ErrorCode: Integer;
|
||
begin
|
||
Result := false;
|
||
ExtractTemporaryFile('HGRemoveOldApp.exe');
|
||
if Exec(ExpandConstant('{tmp}\HGRemoveOldApp.exe'), '', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
|
||
begin
|
||
if 0 = ErrorCode then
|
||
begin
|
||
Result := true;
|
||
end
|
||
else if 2 = ErrorCode then
|
||
begin
|
||
MsgBox('请关闭旧版扫描软件再卸载!', mbInformation, MB_OK);
|
||
end
|
||
else
|
||
begin
|
||
MsgBox('卸载旧版扫描软件失败,停止安装!', mbInformation, MB_OK);
|
||
end
|
||
end
|
||
end;
|
||
|
||
function SetUninstallIcon(iconPath:string): Boolean;
|
||
var
|
||
InstalledVersion,SubKeyName: String;
|
||
begin
|
||
SubKeyName := 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{F50A4E10-3E42-446C-A63A-DF7848C61B31}_is1';
|
||
RegWriteStringValue(HKLM,SubKeyName,'DisplayIcon',iconPath);
|
||
end;
|
||
|
||
function InitializeUninstall(): Boolean;
|
||
var
|
||
ErrorCode: Integer;
|
||
begin
|
||
Result := false;
|
||
if Exec(ExpandConstant('{app}\HGCheckNewApp.exe'), '', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
|
||
begin
|
||
if 0 = ErrorCode then
|
||
begin
|
||
ShellExec('', ExpandConstant('{app}\HGUpgradeApp.exe'), '-type=postuninstallinfo -appName=Scanner -desc=uninstall', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode);
|
||
Result := true;
|
||
end
|
||
else
|
||
begin
|
||
MsgBox('请关闭扫描软件再卸载!', mbInformation, MB_OK);
|
||
end
|
||
end
|
||
end;
|
||
|
||
procedure CurPageChanged(CurPageID: Integer);
|
||
begin
|
||
if CurPageID = wpFinished then
|
||
begin
|
||
SetUninstallIcon(ExpandConstant('{app}\HuaGoScan_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}\DPInst64"; Parameters: "/path ""{app}\driver"" /sw /sa /se /lm /f";
|
||
Filename: "{app}\HGUpgradeApp.exe"; Parameters:"-type=postinstallinfo -appName=Scanner -desc=install/upgrade"; Components: Upgrade;
|
||
Filename: "{app}\HuaGoScan.exe"; Description: "{cm:LaunchProgram, {#MyAppName}}"; Flags: postinstall nowait skipifsilent
|
||
|
||
[UninstallRun]
|
||
; 卸载驱动
|
||
;Filename: "{app}\DPInst64"; Parameters: "/u ""{app}\driver\scannerusb.inf"" /q /d"; |