mirror of http://192.168.10.5:8099/sane/release
230 lines
15 KiB
Plaintext
230 lines
15 KiB
Plaintext
; Script generated by the Inno Setup Script Wizard.
|
|
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
|
#define MyAppName "立思辰扫描仪软件"
|
|
#define MyAppVersion "4.29.14000.22272"
|
|
#define MyAppSetupName "LanxumScan_App_Setup"
|
|
#define MyAppDefSetupDir "LanxumScan"
|
|
#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={{F2890F43-A51C-4379-BB79-992616B1D6BD}
|
|
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=LanxumScan_App.ico
|
|
LicenseFile=LanxumScan_App_License.txt
|
|
AlwaysShowComponentsList=true
|
|
ArchitecturesInstallIn64BitMode=x64
|
|
PrivilegesRequired=admin
|
|
DisableWelcomePage=no
|
|
|
|
[Languages]
|
|
Name: "zn"; MessagesFile: "compiler:Languages/ChineseSimp.isl"
|
|
|
|
[Components]
|
|
Name: "Upgrade"; Description: "在线升级功能" ; 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: "..\..\..\..\code_app\doc\scanner\LanxumScan_scanSettings_Help_manual.pdf"; DestDir: "{app}\"; Flags: ignoreversion
|
|
|
|
; app32
|
|
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\LanxumScan.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
|
Source: "..\..\x86\Release\LSCUpgradeApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade; Check: not Is64BitInstallMode
|
|
Source: "..\..\x86\Release\LSCBase.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
|
Source: "..\..\x86\Release\LSCImgFmt.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
|
Source: "..\..\x86\Release\LSCImgProc.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
|
Source: "..\..\x86\Release\LSCVersion.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\lanxum\sane.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
|
Source: "..\..\x86\OEM\lanxum\scanner.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
|
|
|
; app64
|
|
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\LanxumScan.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\Release\LSCUpgradeApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\Release\LSCBase.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\Release\LSCImgFmt.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\Release\LSCImgProc.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\Release\LSCVersion.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\lanxum\sane.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\OEM\lanxum\scanner.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
|
|
|
; twain32
|
|
Source: "..\..\..\..\code_app\doc\scanner\LanxumScan_scanSettings_Help_manual.pdf"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
|
Source: "..\..\x86\Release\msvcp140.dll"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
|
Source: "..\..\x86\Release\vcruntime140.dll"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
|
Source: "..\..\x86\Release\concrt140.dll"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
|
Source: "..\..\x86\OEM\lanxum\sane.dll"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
|
Source: "..\..\x86\OEM\lanxum\scanner.dll"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
|
Source: "..\..\x86\OEM\lanxum\lanxumtwain8200.ds"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Components: Twain8200;
|
|
Source: "..\..\x86\OEM\lanxum\lanxumtwain8420.ds"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Components: Twain8420;
|
|
Source: "..\..\x86\OEM\lanxum\lanxumtwain8429.ds"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Components: Twain8429;
|
|
Source: "..\..\x86\OEM\lanxum\lanxumtwain8520.ds"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Components: Twain8520;
|
|
Source: "..\..\x86\OEM\lanxum\lanxumtwain8529.ds"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Components: Twain8529;
|
|
Source: "..\..\x86\OEM\lanxum\lanxumtwain8620.ds"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Components: Twain8620;
|
|
Source: "..\..\x86\OEM\lanxum\lanxumtwain8629.ds"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Components: Twain8629;
|
|
Source: "..\..\x86\OEM\lanxum\lanxumtwain8730.ds"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Components: Twain8730;
|
|
Source: "..\..\x86\OEM\lanxum\lanxumtwain8739.ds"; DestDir: "{win}\twain_32\LanxumTwain\"; Flags: ignoreversion; Components: Twain8739;
|
|
|
|
; twain64
|
|
Source: "..\..\x64\OEM\lanxum\lanxumtwain8200.ds"; DestDir: "{win}\twain_64\LanxumTwain\"; Flags: ignoreversion; Components: Twain8200; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\OEM\lanxum\lanxumtwain8420.ds"; DestDir: "{win}\twain_64\LanxumTwain\"; Flags: ignoreversion; Components: Twain8420; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\OEM\lanxum\lanxumtwain8429.ds"; DestDir: "{win}\twain_64\LanxumTwain\"; Flags: ignoreversion; Components: Twain8429; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\OEM\lanxum\lanxumtwain8520.ds"; DestDir: "{win}\twain_64\LanxumTwain\"; Flags: ignoreversion; Components: Twain8520; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\OEM\lanxum\lanxumtwain8529.ds"; DestDir: "{win}\twain_64\LanxumTwain\"; Flags: ignoreversion; Components: Twain8529; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\OEM\lanxum\lanxumtwain8620.ds"; DestDir: "{win}\twain_64\LanxumTwain\"; Flags: ignoreversion; Components: Twain8620; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\OEM\lanxum\lanxumtwain8629.ds"; DestDir: "{win}\twain_64\LanxumTwain\"; Flags: ignoreversion; Components: Twain8629; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\OEM\lanxum\lanxumtwain8730.ds"; DestDir: "{win}\twain_64\LanxumTwain\"; Flags: ignoreversion; Components: Twain8730; Check: Is64BitInstallMode
|
|
Source: "..\..\x64\OEM\lanxum\lanxumtwain8739.ds"; DestDir: "{win}\twain_64\LanxumTwain\"; Flags: ignoreversion; Components: Twain8739; Check: Is64BitInstallMode
|
|
|
|
;拷贝驱动
|
|
Source: "..\..\usb\lanxum\lanxumusb.inf"; DestDir: "{app}\driver\"; Flags: ignoreversion recursesubdirs;
|
|
Source: "..\..\usb\lanxum\lanxumusb.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\LSCRemoveOldApp.exe"; DestDir: "{tmp}\"; Flags: ignoreversion
|
|
Source: "..\..\x86\Release\LSCCheckNewApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode
|
|
Source: "..\..\x64\Release\LSCCheckNewApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode
|
|
|
|
[INI]
|
|
|
|
[Icons]
|
|
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\LanxumScan.exe"
|
|
Name: "{group}\{#MyAppName}"; Filename: "{app}\LanxumScan.exe"
|
|
Name: "{group}\立思辰扫描仪软件帮助文档"; 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
|
|
Root: HKLM; Subkey: "Software\LanxumScan"; ValueType: string; ValueName: "DriverPath"; ValueData: "{app}"; Flags: uninsdeletekey; Check: not Is64BitInstallMode
|
|
Root: HKLM; Subkey: "Software\LanxumScan"; ValueType: string; ValueName: "DriverPath"; ValueData: "{win}\twain_32\LanxumTwain"; Flags: uninsdeletekey; Check: Is64BitInstallMode
|
|
Root: HKLM; Subkey: "Software\LanxumScan"; ValueType: string; ValueName: "DriverPath64"; ValueData: "{app}"; Flags: uninsdeletekey; Check: Is64BitInstallMode
|
|
Root: HKLM; Subkey: "Software\WOW6432Node\LanxumScan"; ValueType: string; ValueName: "DriverPath"; ValueData: "{win}\twain_32\LanxumTwain"; Flags: uninsdeletekey; Check: Is64BitInstallMode
|
|
Root: HKLM; Subkey: "Software\WOW6432Node\LanxumScan"; ValueType: string; ValueName: "DriverPath64"; ValueData: "{app}"; Flags: uninsdeletekey; Check: Is64BitInstallMode
|
|
|
|
[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('请关闭旧版扫描软件再卸载!', 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\{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('请关闭扫描软件再卸载!', 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);
|
|
DelTree(ExpandConstant('{win}\twain_32\LanxumTwain'), True, True, True);
|
|
DelTree(ExpandConstant('{win}\twain_64\LanxumTwain'), 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}\LSCUpgradeApp.exe"; Parameters:"-type=postinstallinfo -appName=Scanner -desc=install/upgrade"; Components: Upgrade; Flags: runascurrentuser
|
|
Filename: "{app}\LanxumScan.exe"; Description: "{cm:LaunchProgram, {#MyAppName}}"; Flags: postinstall nowait skipifsilent runascurrentuser
|
|
|
|
[UninstallRun]
|
|
; 卸载驱动
|
|
;Filename: "{app}\DPInst32"; Parameters: "/u ""{app}\driver\lanxumusb.inf"" /q /d"; Check: not IsWin64; Flags: runascurrentuser
|
|
;Filename: "{app}\DPInst64"; Parameters: "/u ""{app}\driver\lanxumusb.inf"" /q /d"; Check: IsWin64; Flags: runascurrentuser |