release/win/setup/scanner/LanxumScan_App_Setup.iss

199 lines
10 KiB
Plaintext
Raw Normal View History

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "<22><>˼<EFBFBD><CBBC>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
2022-08-09 10:01:38 +00:00
#define MyAppVersion "4.17.14000.22221"
#define MyAppSetupName "LanxumScan_App_Setup"
#define MyAppDefSetupDir "LanxumScan"
#define MyAppPublisher "<22><>˼<EFBFBD><CBBC><EFBFBD><EFBFBD>Ϣ<EFBFBD>Ƽ<EFBFBD><C6BC><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={{F2890F43-A51C-4379-BB79-992616B1D6BD}
AppName={#MyAppName}
AppVerName={#MyAppName}
AppVersion={#MyAppVersion}
DefaultDirName={pf}\{#MyAppDefSetupDir}
DefaultGroupName={#MyAppName}
VersionInfoVersion={#MyAppVersion}
OutputDir=..\..\package\lanxum
OutputBaseFilename={#MyAppSetupName}_{#MyAppVersion}
Compression=lzma
AppPublisher={#MyAppPublisher}
SolidCompression=yes
UninstallIconFile=uninstall.ico
SetupIconFile=LanxumScan_App.ico
LicenseFile=LanxumScan_App_License.txt
AlwaysShowComponentsList=true
[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: "Twain8200"; Description: "LANXUMSCAN G42S TWAIN" ; Types: Full
Name: "Twain8420"; Description: "LANXUMSCAN G42S TWAIN" ; Types: Full
Name: "Twain8429"; Description: "LANXUMSCAN G52S TWAIN" ; Types: Full
Name: "Twain8520"; Description: "LANXUMSCAN G62S TWAIN" ; Types: Full
Name: "Twain8529"; Description: "LANXUMSCAN G73S TWAIN" ; Types: Full
Name: "Twain8620"; Description: "LANXUMSCAN G42S TWAIN" ; Types: Full
Name: "Twain8629"; Description: "LANXUMSCAN G52S TWAIN" ; Types: Full
Name: "Twain8730"; Description: "LANXUMSCAN G62S TWAIN" ; Types: Full
Name: "Twain8739"; Description: "LANXUMSCAN G73S TWAIN" ; Types: Full
[Files]
; app
Source: ".\LanxumScan_App.ico"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\..\..\code_app\doc\scanner\LanxumScan_App_Help_manual.pdf"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\hwusbdev.key"; DestDir: "{app}\"; Flags: ignoreversion
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\LanxumScan.exe"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\LSCUpgradeApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade;
Source: "..\..\x86\Release\cnocr.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\doc_seg.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\ExportFile.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\FormEx.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\GetPdf.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\GetRtf.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\GetXls.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\hanwangOCRdetect.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\hasp_windows_113819.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\LSCBase.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\LSCImgFmt.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\LSCImgProc.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\LSCVersion.dll"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade;
Source: "..\..\x86\Release\HwOcrSdk.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\libmupdf.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\libzip.org.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\mp30.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\ofd.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\pdflib.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\PDFParse.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\Release\tinyxml2.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\Release\zlib.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\OEM\lanxum\sane.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\..\x86\OEM\lanxum\scanner.dll"; DestDir: "{app}\"; Flags: ignoreversion
2022-08-08 04:18:45 +00:00
Source: "..\..\x86\OEM\lanxum\lanxumtwain8200.ds"; DestDir: "{win}\twain_32\LanxumTwain\x86\"; Flags: ignoreversion; Components: Twain8200;
Source: "..\..\x86\OEM\lanxum\lanxumtwain8420.ds"; DestDir: "{win}\twain_32\LanxumTwain\x86\"; Flags: ignoreversion; Components: Twain8420;
Source: "..\..\x86\OEM\lanxum\lanxumtwain8429.ds"; DestDir: "{win}\twain_32\LanxumTwain\x86\"; Flags: ignoreversion; Components: Twain8429;
Source: "..\..\x86\OEM\lanxum\lanxumtwain8520.ds"; DestDir: "{win}\twain_32\LanxumTwain\x86\"; Flags: ignoreversion; Components: Twain8520;
Source: "..\..\x86\OEM\lanxum\lanxumtwain8529.ds"; DestDir: "{win}\twain_32\LanxumTwain\x86\"; Flags: ignoreversion; Components: Twain8529;
Source: "..\..\x86\OEM\lanxum\lanxumtwain8620.ds"; DestDir: "{win}\twain_32\LanxumTwain\x86\"; Flags: ignoreversion; Components: Twain8620;
Source: "..\..\x86\OEM\lanxum\lanxumtwain8629.ds"; DestDir: "{win}\twain_32\LanxumTwain\x86\"; Flags: ignoreversion; Components: Twain8629;
Source: "..\..\x86\OEM\lanxum\lanxumtwain8730.ds"; DestDir: "{win}\twain_32\LanxumTwain\x86\"; Flags: ignoreversion; Components: Twain8730;
Source: "..\..\x86\OEM\lanxum\lanxumtwain8739.ds"; DestDir: "{win}\twain_32\LanxumTwain\x86\"; Flags: ignoreversion; Components: Twain8739;
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Source: "..\..\x86\Release\scannerusb.inf"; DestDir: "{app}\driver\"; Flags: ignoreversion recursesubdirs;
Source: "..\..\x86\Release\scannerusb.cat"; DestDir: "{app}\driver\"; Flags: ignoreversion recursesubdirs;
2022-08-08 04:18:45 +00:00
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
; <20><>ʱʹ<CAB1><CAB9>
Source: "..\..\x86\Release\LSCRemoveOldApp.exe"; DestDir: "{tmp}\"; Flags: ignoreversion
Source: "..\..\x86\Release\LSCCheckNewApp.exe"; DestDir: "{app}\"; Flags: ignoreversion
[INI]
[Icons]
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\LanxumScan.exe"
Name: "{group}\{#MyAppName}"; Filename: "{app}\LanxumScan.exe"
Name: "{group}\<5C><>˼<EFBFBD><CBBC>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>"; Filename: "{app}\LanxumScan_App_Help_manual.pdf"
Name: "{group}\{cm:UninstallProgram, {#MyAppName}}"; Filename: "{uninstallexe}";
[Registry]
Root: HKLM; Subkey: "Software\LanxumScan"; ValueType: string; ValueName: "AppDirectory"; ValueData: "{app}"; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\LanxumScan"; ValueType: string; ValueName: "Application"; ValueData: "{app}\LanxumScan.exe"; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\LanxumScan"; ValueType: string; ValueName: "AppVersion"; ValueData: "{#MyAppVersion}"; Flags: uninsdeletekey
[Code]
function InitializeSetup(): boolean;
var
ErrorCode: Integer;
begin
Result := false;
ExtractTemporaryFile('LSCRemoveOldApp.exe');
if Exec(ExpandConstant('{tmp}\LSCRemoveOldApp.exe'), '', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
begin
if 0 = ErrorCode then
begin
Result := true;
end
else if 2 = ErrorCode then
begin
MsgBox('<27><><EFBFBD>رվɰ<D5BE>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>أ<EFBFBD>', mbInformation, MB_OK);
end
else
begin
MsgBox('ж<>ؾɰ<D8BE>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>ֹͣ<CDA3><D6B9>װ<EFBFBD><D7B0>', mbInformation, MB_OK);
end
end
end;
function SetUninstallIcon(iconPath:string): Boolean;
var
InstalledVersion,SubKeyName: String;
begin
2022-08-08 04:18:45 +00:00
SubKeyName := 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{F2890F43-A51C-4379-BB79-992616B1D6BD}_is1';
RegWriteStringValue(HKLM,SubKeyName,'DisplayIcon',iconPath);
end;
function InitializeUninstall(): Boolean;
var
ErrorCode: Integer;
begin
Result := false;
if Exec(ExpandConstant('{app}\LSCCheckNewApp.exe'), '', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then
begin
if 0 = ErrorCode then
begin
ShellExec('', ExpandConstant('{app}\LSCUpgradeApp.exe'), '-type=postuninstallinfo -appName=Scanner -desc=uninstall', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode);
Result := true;
end
else
begin
MsgBox('<27><><EFBFBD>ر<EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>أ<EFBFBD>', mbInformation, MB_OK);
end
end
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpFinished then
begin
SetUninstallIcon(ExpandConstant('{app}\LanxumScan_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 /sa /se /lm /f"; Check: not IsWin64
Filename: "{app}\DPInst64"; Parameters: "/path ""{app}\driver"" /sw /sa /se /lm /f"; Check: IsWin64
Filename: "{app}\LSCUpgradeApp.exe"; Parameters:"-type=postinstallinfo -appName=Scanner -desc=install/upgrade"; Components: Upgrade;
Filename: "{app}\LanxumScan.exe"; Description: "{cm:LaunchProgram, {#MyAppName}}"; Flags: postinstall nowait skipifsilent
[UninstallRun]
; ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;Filename: "{app}\DPInst32"; Parameters: "/u ""{app}\driver\scannerusb.inf"" /q /d"; Check: not IsWin64
;Filename: "{app}\DPInst64"; Parameters: "/u ""{app}\driver\scannerusb.inf"" /q /d"; Check: IsWin64