mirror of http://192.168.10.5:8099/sane/release
278 lines
15 KiB
Plaintext
278 lines
15 KiB
Plaintext
; Script generated by the Inno Setup Script Wizard.
|
||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||
|
||
#define MyAppVersion "4.37.20100.23034"
|
||
#define MyAppSetupName "MicrotekScan_App_Setup"
|
||
#define MyAppDefSetupDir "MicrotekScan"
|
||
|
||
[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={{36868C39-B195-498B-BFAE-36125D55305E}
|
||
AppName={cm:MyAppName}
|
||
AppVerName={cm:MyAppName}
|
||
AppVersion={#MyAppVersion}
|
||
DefaultDirName={pf}\{#MyAppDefSetupDir}
|
||
DefaultGroupName={cm:MyAppName}
|
||
VersionInfoVersion={#MyAppVersion}
|
||
OutputDir=..\..\package
|
||
OutputBaseFilename={#MyAppSetupName}_{#MyAppVersion}
|
||
Compression=lzma
|
||
AppPublisher={cm:MyAppPublisher}
|
||
SolidCompression=no
|
||
UninstallIconFile=uninstall.ico
|
||
SetupIconFile=MicrotekScan_App.ico
|
||
LicenseFile=MicrotekScan_App_License.txt
|
||
AlwaysShowComponentsList=true
|
||
ArchitecturesInstallIn64BitMode=x64
|
||
PrivilegesRequired=admin
|
||
DisableWelcomePage=no
|
||
ShowLanguageDialog=yes
|
||
ShowUndisplayableLanguages=yes
|
||
|
||
[Languages]
|
||
Name: "english"; MessagesFile: "compiler:Languages/English.isl"; LicenseFile:MicrotekScan_App_License_En.txt
|
||
Name: "chinese_simp"; MessagesFile: "compiler:Languages/ChineseSimp.isl"; LicenseFile:MicrotekScan_App_License.txt
|
||
;Name: "chinese_trad"; MessagesFile: "compiler:Languages/ChineseTrad.isl"; LicenseFile:MicrotekScan_App_License_Cn_Tr.txt
|
||
|
||
[CustomMessages]
|
||
; english
|
||
english.MyAppName=Microtek DocWizard EX V1.0
|
||
english.MyAppPublisher=Shanghai Microtek Technology Co., Ltd
|
||
english.MyStr1=The scanning software has been installed. Do you want to uninstall the original version?
|
||
english.MyStr2=Please close the old scanning software first!
|
||
english.MyStr3=Failed to uninstall the old scanning software, stop installing!
|
||
english.MyStr4=Please close the scanning software first!
|
||
; chinese_simp
|
||
chinese_simp.MyAppName=Öо§É¨ÃèÈí¼þ
|
||
chinese_simp.MyAppPublisher=ÉϺ£Öо§¿Æ¼¼ÓÐÏÞ¹«Ë¾
|
||
chinese_simp.MyStr1=ɨÃèÈí¼þÒÑ°²×°£¬ÊÇ·ñжÔØÔ°æ±¾£¿
|
||
chinese_simp.MyStr2=ÇëÏȹرվɰæɨÃèÈí¼þ£¡
|
||
chinese_simp.MyStr3=жÔؾɰæɨÃèÈí¼þʧ°Ü£¬Í£Ö¹°²×°£¡
|
||
chinese_simp.MyStr4=ÇëÏȹرÕɨÃèÈí¼þ£¡
|
||
; chinese_trad
|
||
;chinese_trad.MyAppName=Öо§’ßÃèÜ›¼þ
|
||
;chinese_trad.MyAppPublisher=ÉϺ£Öо§¿Æ¼¼ÓÐÏÞ¹«Ë¾
|
||
;chinese_trad.MyStr1=’ßÃèÜ›¼þÒÑ°²Ñb£¬ÊÇ·ñжÝdÔ°æ±¾£¿
|
||
;chinese_trad.MyStr2=ÕˆÏÈêPé]Åf°æ’ßÃèÜ›¼þ£¡
|
||
;chinese_trad.MyStr3=жÝdÅf°æ’ßÃèÜ›¼þʧ”¡£¬Í£Ö¹°²Ñb£¡
|
||
;chinese_trad.MyStr4=ÕˆÏÈêPé]’ßÃèÜ›¼þ£¡
|
||
|
||
[Components]
|
||
Name: "Upgrade"; Description: "Upgrade" ; Types: Full; Languages: english
|
||
Name: "Upgrade"; Description: "ÔÚÏßÉý¼¶¹¦ÄÜ" ; Types: Full; Languages: chinese_simp
|
||
;Name: "Upgrade"; Description: "¾€ÉÏÉý¼‰¹¦ÄÜ" ; Types: Full; Languages: chinese_trad
|
||
|
||
[Files]
|
||
|
||
; app
|
||
Source: ".\MicrotekScan_App.ico"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\..\..\code_app\doc\scanner\MicrotekScan_App_Help_manual.pdf"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\..\..\code_app\doc\scanner\MicrotekScan_scanSettings_Help_manual.pdf"; DestDir: "{app}\"; Flags: ignoreversion
|
||
Source: "..\..\x86\Release\microtek-tool\*"; DestDir: "{app}\microtek-tool\"; Flags: ignoreversion recursesubdirs
|
||
|
||
; app32
|
||
Source: "..\..\x86\Release\tessdata\*"; DestDir: "{app}\tessdata\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Qt\iconengines\*"; DestDir: "{app}\iconengines\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Qt\imageformats\*"; DestDir: "{app}\imageformats\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Qt\platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Qt\styles\*"; DestDir: "{app}\styles\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Qt\translations\*"; DestDir: "{app}\translations\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Qt\*.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Release\MicrotekScan.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Release\ZJUpgradeApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Release\ZJBase.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Release\ZJImgFmt.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Release\ZJImgProc.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Release\ZJVersion.dll"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Release\libmupdf.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Release\pdflib.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Release\msvcp140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Release\vcruntime140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\Release\concrt140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\OEM\microtek\sane.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\OEM\microtek\scanner.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x86\OEM\microtek\lang.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\..\lang\*"; DestDir: "{app}\lang\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
|
||
; app64
|
||
Source: "..\..\x64\Release\tessdata\*"; DestDir: "{app}\tessdata\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Qt\iconengines\*"; DestDir: "{app}\iconengines\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Qt\imageformats\*"; DestDir: "{app}\imageformats\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Qt\platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Qt\styles\*"; DestDir: "{app}\styles\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Qt\translations\*"; DestDir: "{app}\translations\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Qt\*.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Release\MicrotekScan.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Release\ZJUpgradeApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Release\ZJBase.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Release\ZJImgFmt.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Release\ZJImgProc.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Release\ZJVersion.dll"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Release\libmupdf.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Release\pdflib.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Release\msvcp140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Release\vcruntime140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Release\vcruntime140_1.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\Release\concrt140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\OEM\microtek\sane.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\OEM\microtek\scanner.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\x64\OEM\microtek\lang.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
Source: "..\..\..\lang\*"; DestDir: "{app}\lang\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
|
||
;¿½±´Çý¶¯
|
||
Source: "..\..\usb\microtek\Microtek_A3HG_scanner_usb.inf"; DestDir: "{app}\driver\"; Flags: ignoreversion recursesubdirs;
|
||
Source: "..\..\usb\microtek\Microtek_A3HG_scanner_usb.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
|
||
|
||
; ÁÙʱʹÓÃ
|
||
Source: "..\..\x86\Release\ZJRemoveOldApp.exe"; DestDir: "{tmp}\"; Flags: ignoreversion
|
||
Source: "..\..\x86\Release\ZJCheckNewApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
||
Source: "..\..\x64\Release\ZJCheckNewApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
||
|
||
|
||
[INI]
|
||
|
||
[Icons]
|
||
Name: "{commondesktop}\{cm:MyAppName}"; Filename: "{app}\MicrotekScan.exe"
|
||
Name: "{group}\{cm:MyAppName}"; Filename: "{app}\MicrotekScan.exe"
|
||
Name: "{group}\Microtek after-sales tools"; Filename: "{app}\microtek-tool\After_sales_tool.exe"; Languages: english
|
||
Name: "{group}\Öо§Êۺ󹤾ß"; Filename: "{app}\microtek-tool\After_sales_tool.exe"; Languages: chinese_simp
|
||
;Name: "{group}\Öо§ÊÛáṤ¾ß"; Filename: "{app}\microtek-tool\After_sales_tool.exe"; Languages: chinese_trad
|
||
Name: "{group}\Microtek DocWizard EX V1.0 help document"; Filename: "{app}\MicrotekScan_App_Help_manual.pdf"; Languages: english
|
||
Name: "{group}\Öо§É¨ÃèÈí¼þ°ïÖúÎĵµ"; Filename: "{app}\MicrotekScan_App_Help_manual.pdf"; Languages: chinese_simp
|
||
;Name: "{group}\Öо§’ßÃèÜ›¼þŽÍÖúÎÄ™n"; Filename: "{app}\MicrotekScan_App_Help_manual.pdf"; Languages: chinese_trad
|
||
Name: "{group}\Uninstall"; Filename: "{uninstallexe}"; Languages: english
|
||
Name: "{group}\жÔØ"; Filename: "{uninstallexe}"; Languages: chinese_simp
|
||
;Name: "{group}\жÝd"; Filename: "{uninstallexe}"; Languages: chinese_trad
|
||
|
||
[Registry]
|
||
Root: HKLM; Subkey: "Software\MicrotekScan"; ValueType: string; ValueName: "AppDirectory"; ValueData: "{app}"; Flags: uninsdeletekey
|
||
Root: HKLM; Subkey: "Software\MicrotekScan"; ValueType: string; ValueName: "Application"; ValueData: "{app}\MicrotekScan.exe"; Flags: uninsdeletekey
|
||
Root: HKLM; Subkey: "Software\MicrotekScan"; ValueType: string; ValueName: "AppVersion"; ValueData: "{#MyAppVersion}"; Flags: uninsdeletekey
|
||
|
||
[Code]
|
||
|
||
|
||
var
|
||
globalInstallPath: String;
|
||
|
||
procedure InitializeWizard;
|
||
begin
|
||
WizardForm.DirEdit.Text := globalInstallPath;
|
||
end;
|
||
|
||
function GetInstallString(): String;
|
||
var
|
||
InstallPath: String;
|
||
begin
|
||
InstallPath := ExpandConstant('{pf}\{#MyAppDefSetupDir}');
|
||
if RegValueExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{36868C39-B195-498B-BFAE-36125D55305E}_is1', 'Inno Setup: App Path') then
|
||
begin
|
||
RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{36868C39-B195-498B-BFAE-36125D55305E}_is1', 'Inno Setup: App Path', InstallPath)
|
||
end
|
||
result := InstallPath;
|
||
end;
|
||
|
||
function InitializeSetup(): boolean;
|
||
var
|
||
ErrorCode: Integer;
|
||
ResultCode: Integer;
|
||
ResultStr: String;
|
||
UninstallContinue: Boolean;
|
||
CmdStr: String;
|
||
begin
|
||
Result := false;
|
||
globalInstallPath := GetInstallString();
|
||
CmdStr := GetCmdTail();
|
||
ExtractTemporaryFile('ZJRemoveOldApp.exe');
|
||
if Exec(ExpandConstant('{tmp}\ZJRemoveOldApp.exe'), '', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
|
||
begin
|
||
if 0 = ErrorCode then
|
||
begin
|
||
if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{36868C39-B195-498B-BFAE-36125D55305E}_is1', 'UninstallString', ResultStr) then
|
||
begin
|
||
UninstallContinue := true;
|
||
if Pos('/verysilent', CmdStr) = 0 then
|
||
begin
|
||
if MsgBox(ExpandConstant('{cm:MyStr1}'), mbConfirmation, MB_YESNO) <> IDYES then
|
||
begin
|
||
UninstallContinue := false;
|
||
end
|
||
end
|
||
if UninstallContinue then
|
||
begin
|
||
ResultStr := RemoveQuotes(ResultStr);
|
||
if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
|
||
begin
|
||
if 0 = ResultCode then
|
||
begin
|
||
Sleep(1000)
|
||
Result := true;
|
||
end
|
||
end
|
||
end
|
||
end
|
||
else
|
||
begin
|
||
Result := true;
|
||
end
|
||
end
|
||
else if 2 = ErrorCode then
|
||
begin
|
||
MsgBox(ExpandConstant('{cm:MyStr2}'), mbInformation, MB_OK);
|
||
end
|
||
else
|
||
begin
|
||
MsgBox(ExpandConstant('{cm:MyStr3}'), mbInformation, MB_OK);
|
||
end
|
||
end
|
||
end;
|
||
|
||
function SetUninstallIcon(iconPath:string): Boolean;
|
||
var
|
||
InstalledVersion,SubKeyName: String;
|
||
begin
|
||
SubKeyName := 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{36868C39-B195-498B-BFAE-36125D55305E}_is1';
|
||
RegWriteStringValue(HKLM,SubKeyName,'DisplayIcon',iconPath);
|
||
end;
|
||
|
||
function InitializeUninstall(): Boolean;
|
||
var
|
||
ErrorCode: Integer;
|
||
begin
|
||
Result := false;
|
||
if Exec(ExpandConstant('{app}\ZJCheckNewApp.exe'), '', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
|
||
begin
|
||
if 0 = ErrorCode then
|
||
begin
|
||
ShellExec('', ExpandConstant('{app}\ZJUpgradeApp.exe'), '-type=postuninstallinfo -appName=Scanner -desc=uninstall', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode);
|
||
Result := true;
|
||
end
|
||
else
|
||
begin
|
||
MsgBox(ExpandConstant('{cm:MyStr4}'), mbInformation, MB_OK);
|
||
end
|
||
end
|
||
end;
|
||
|
||
procedure CurPageChanged(CurPageID: Integer);
|
||
begin
|
||
if CurPageID = wpFinished then
|
||
begin
|
||
SetUninstallIcon(ExpandConstant('{app}\MicrotekScan_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}\ZJUpgradeApp.exe"; Parameters:"-type=postinstallinfo -appName=Scanner -desc=install/upgrade"; Components: Upgrade; Flags: runascurrentuser
|
||
Filename: "{app}\MicrotekScan.exe"; Description: "{cm:LaunchProgram, {cm:MyAppName}}"; Parameters:"-language=english"; Flags: postinstall nowait skipifsilent runascurrentuser; Languages: english
|
||
Filename: "{app}\MicrotekScan.exe"; Description: "{cm:LaunchProgram, {cm:MyAppName}}"; Parameters:"-language=chinese"; Flags: postinstall nowait skipifsilent runascurrentuser; Languages: chinese_simp
|
||
;Filename: "{app}\MicrotekScan.exe"; Description: "{cm:LaunchProgram, {cm:MyAppName}}"; Parameters:"-language=chinese-trad"; Flags: postinstall nowait skipifsilent runascurrentuser; Languages: chinese_trad
|
||
|
||
[UninstallRun]
|
||
;Filename: "{app}\DPInst32"; Parameters: "/u ""{app}\driver\Microtek_A3HG_scanner_usb.inf"" /q /d"; Check: not IsWin64; Flags: runascurrentuser
|
||
;Filename: "{app}\DPInst64"; Parameters: "/u ""{app}\driver\Microtek_A3HG_scanner_usb.inf"" /q /d"; Check: IsWin64; Flags: runascurrentuser |