mirror of http://192.168.10.5:8099/sane/release
206 lines
9.9 KiB
Plaintext
206 lines
9.9 KiB
Plaintext
|
; Script generated by the Inno Setup Script Wizard.
|
|||
|
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
|||
|
#define MyAppName "<22><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>64λ<34><CEBB>"
|
|||
|
#define MyAppVersion "4.15.10000.22217"
|
|||
|
#define MyAppSetupName "HanvonScan_App_Setup"
|
|||
|
#define MyAppDefSetupDir "HanvonScan"
|
|||
|
#define MyAppPublisher "<22><><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><C6BC>ɷ<EFBFBD><C9B7><EFBFBD><EFBFBD><EFBFBD>˾"
|
|||
|
|
|||
|
[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={{91B3FC8D-CA10-4754-9339-6794D4D922F6}
|
|||
|
AppName={#MyAppName}
|
|||
|
AppVerName={#MyAppName}
|
|||
|
AppVersion={#MyAppVersion}
|
|||
|
DefaultDirName={pf}\{#MyAppDefSetupDir}
|
|||
|
DefaultGroupName={#MyAppName}
|
|||
|
VersionInfoVersion={#MyAppVersion}
|
|||
|
OutputDir=..\..\package\hanvon
|
|||
|
OutputBaseFilename={#MyAppSetupName}_{#MyAppVersion}_x64
|
|||
|
Compression=lzma
|
|||
|
AppPublisher={#MyAppPublisher}
|
|||
|
SolidCompression=yes
|
|||
|
UninstallIconFile=uninstall.ico
|
|||
|
SetupIconFile=HanvonScan_App.ico
|
|||
|
LicenseFile=HanvonScan_App_License.txt
|
|||
|
AlwaysShowComponentsList=true
|
|||
|
ArchitecturesInstallIn64BitMode=x64
|
|||
|
|
|||
|
[Languages]
|
|||
|
Name: "zn"; MessagesFile: "compiler:Languages/Chinese.isl"
|
|||
|
|
|||
|
[Components]
|
|||
|
Name: "Upgrade"; Description: "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" ; Types: Full
|
|||
|
Name: "Twain1000"; Description: "Hanvon HW-7000NS TAWIN" ; Types: Full
|
|||
|
Name: "Twain1002"; Description: "Hanvon HW-7000 TAWIN" ; Types: Full
|
|||
|
Name: "Twain7000"; Description: "Hanvon HW-7000NS TAWIN" ; Types: Full
|
|||
|
Name: "Twain7002"; Description: "Hanvon HW-8000 TAWIN" ; Types: Full
|
|||
|
Name: "Twain7039"; Description: "Hanvon HW-9000 TAWIN" ; Types: Full
|
|||
|
Name: "Twain8000"; Description: "Hanvon HW-1000NS TAWIN" ; Types: Full
|
|||
|
Name: "Twain9000"; Description: "Hanvon HW-1000 TAWIN" ; Types: Full
|
|||
|
|
|||
|
[Files]
|
|||
|
|
|||
|
; app
|
|||
|
Source: ".\HanvonScan_App.ico"; DestDir: "{app}\"; Flags: ignoreversion
|
|||
|
Source: "..\..\..\..\code_app\doc\scanner\HanvonScan_App_Help_manual.pdf"; DestDir: "{app}\"; Flags: ignoreversion
|
|||
|
|
|||
|
Source: "..\..\x64\Release\hwusbdev.key"; DestDir: "{app}\"; Flags: ignoreversion
|
|||
|
Source: "..\..\x64\Release\IsTask.dll"; 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\HanvonScan.exe"; DestDir: "{app}\"; Flags: ignoreversion
|
|||
|
Source: "..\..\x64\Release\HWUpgradeApp.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\HWBase.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
|||
|
Source: "..\..\x64\Release\HWImgFmt.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
|||
|
Source: "..\..\x64\Release\HWImgProc.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
|||
|
Source: "..\..\x64\Release\HWVersion.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\zlib.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
|||
|
|
|||
|
Source: "..\..\x64\OEM\hanvon\sane.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
|||
|
Source: "..\..\x64\OEM\hanvon\scanner.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
|||
|
Source: "..\..\x64\OEM\hanvon\hanvontwain1000.ds"; DestDir: "{win}\twain_32\HanvonTwain\x64\"; Flags: ignoreversion; Components: Twain1000;
|
|||
|
Source: "..\..\x64\OEM\hanvon\hanvontwain1002.ds"; DestDir: "{win}\twain_32\HanvonTwain\x64\"; Flags: ignoreversion; Components: Twain1002;
|
|||
|
Source: "..\..\x64\OEM\hanvon\hanvontwain7000.ds"; DestDir: "{win}\twain_32\HanvonTwain\x64\"; Flags: ignoreversion; Components: Twain7000;
|
|||
|
Source: "..\..\x64\OEM\hanvon\hanvontwain7002.ds"; DestDir: "{win}\twain_32\HanvonTwain\x64\"; Flags: ignoreversion; Components: Twain7002;
|
|||
|
Source: "..\..\x64\OEM\hanvon\hanvontwain7039.ds"; DestDir: "{win}\twain_32\HanvonTwain\x64\"; Flags: ignoreversion; Components: Twain7039;
|
|||
|
Source: "..\..\x64\OEM\hanvon\hanvontwain8000.ds"; DestDir: "{win}\twain_32\HanvonTwain\x64\"; Flags: ignoreversion; Components: Twain8000;
|
|||
|
Source: "..\..\x64\OEM\hanvon\hanvontwain9000.ds"; DestDir: "{win}\twain_32\HanvonTwain\x64\"; Flags: ignoreversion; Components: Twain9000;
|
|||
|
|
|||
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
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;
|
|||
|
|
|||
|
; <20><>ʱʹ<CAB1><CAB9>
|
|||
|
Source: "..\..\x64\Release\HWRemoveOldApp.exe"; DestDir: "{tmp}\"; Flags: ignoreversion
|
|||
|
|
|||
|
|
|||
|
[INI]
|
|||
|
|
|||
|
[Icons]
|
|||
|
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\HanvonScan.exe"
|
|||
|
Name: "{group}\{#MyAppName}"; Filename: "{app}\HanvonScan.exe"
|
|||
|
Name: "{group}\<5C><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>"; Filename: "{app}\HanvonScan_App_Help_manual.pdf"
|
|||
|
Name: "{group}\{cm:UninstallProgram, {#MyAppName}}"; Filename: "{uninstallexe}";
|
|||
|
|
|||
|
[Registry]
|
|||
|
Root: HKLM; Subkey: "Software\HanvonScan"; ValueType: string; ValueName: "AppDirectory"; ValueData: "{app}"; Flags: uninsdeletekey
|
|||
|
Root: HKLM; Subkey: "Software\HanvonScan"; ValueType: string; ValueName: "Application"; ValueData: "{app}\LanvonScan.exe"; Flags: uninsdeletekey
|
|||
|
Root: HKLM; Subkey: "Software\HanvonScan"; ValueType: string; ValueName: "AppVersion"; ValueData: "{#MyAppVersion}"; Flags: uninsdeletekey
|
|||
|
|
|||
|
[Code]
|
|||
|
|
|||
|
function RunTask(FileName: string; bFullpath: Boolean): Boolean;
|
|||
|
external 'RunTask@files:ISTask.dll stdcall delayload';
|
|||
|
function KillTask(ExeFileName: string): Integer;
|
|||
|
external 'KillTask@files:ISTask.dll stdcall delayload';
|
|||
|
|
|||
|
// ж<><D0B6>ǰ<EFBFBD>жϽ<D0B6><CFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
function RunTaskU(FileName: string; bFullpath: Boolean): Boolean;
|
|||
|
external 'RunTask@{app}/ISTask.dll stdcall delayload uninstallonly';
|
|||
|
function KillTaskU(ExeFileName: string): Integer;
|
|||
|
external 'KillTask@{app}/ISTask.dll stdcall delayload uninstallonly';
|
|||
|
function InitializeSetup(): boolean;
|
|||
|
var
|
|||
|
ErrorCode: Integer;
|
|||
|
begin
|
|||
|
Result := false;
|
|||
|
ExtractTemporaryFile('ISTask.dll');
|
|||
|
if RunTask('HanvonScan.exe', false) then
|
|||
|
begin
|
|||
|
MsgBox('<27><><EFBFBD>ر<EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٰ<EFBFBD>װ<EFBFBD><D7B0>', mbInformation, MB_OK);
|
|||
|
end
|
|||
|
else
|
|||
|
begin
|
|||
|
ExtractTemporaryFile('HWRemoveOldApp.exe');
|
|||
|
if Exec(ExpandConstant('{tmp}\HWRemoveOldApp.exe'), '', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
|
|||
|
begin
|
|||
|
if 0 = ErrorCode then
|
|||
|
begin
|
|||
|
Result := true;
|
|||
|
end
|
|||
|
else
|
|||
|
begin
|
|||
|
MsgBox('ж<>ؾɰ<D8BE>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>ֹͣ<CDA3><D6B9>װ<EFBFBD><D7B0>', mbInformation, MB_OK);
|
|||
|
end
|
|||
|
end
|
|||
|
end
|
|||
|
end;
|
|||
|
|
|||
|
function SetUninstallIcon(iconPath:string): Boolean;
|
|||
|
var
|
|||
|
InstalledVersion,SubKeyName: String;
|
|||
|
begin
|
|||
|
SubKeyName := 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{91B3FC8D-CA10-4754-9339-6794D4D922F6}_is1';
|
|||
|
RegWriteStringValue(HKLM,SubKeyName,'DisplayIcon',iconPath);
|
|||
|
end;
|
|||
|
|
|||
|
function InitializeUninstall(): Boolean;
|
|||
|
var
|
|||
|
ErrorCode: Integer;
|
|||
|
begin
|
|||
|
Result := false;
|
|||
|
if RunTaskU('HanvonScan.exe', false) then
|
|||
|
begin
|
|||
|
MsgBox('<27><><EFBFBD>ر<EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>أ<EFBFBD>', mbInformation, MB_OK);
|
|||
|
end
|
|||
|
else
|
|||
|
begin
|
|||
|
ShellExec('', ExpandConstant('{app}\HWUpgradeApp.exe'), '-type=postuninstallinfo -appName=Scanner -desc=uninstall', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode);
|
|||
|
Result:= true;
|
|||
|
end
|
|||
|
UnloadDll(ExpandConstant('{app}/ISTask.dll'));
|
|||
|
end;
|
|||
|
|
|||
|
procedure CurPageChanged(CurPageID: Integer);
|
|||
|
begin
|
|||
|
if CurPageID = wpFinished then
|
|||
|
begin
|
|||
|
SetUninstallIcon(ExpandConstant('{app}\HanvonScan_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}\HWUpgradeApp.exe"; Parameters:"-type=postinstallinfo -appName=Scanner -desc=install/upgrade"; Components: Upgrade;
|
|||
|
Filename: "{app}\HanvonScan.exe"; Description: "{cm:LaunchProgram, {#MyAppName}}"; Flags: postinstall nowait skipifsilent
|
|||
|
|
|||
|
[UninstallRun]
|
|||
|
; ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
;Filename: "{app}\DPInst64"; Parameters: "/u ""{app}\driver\scannerusb.inf"" /q /d";
|