HGGitLab

Commit 6d963c05 authored by luoliangyi's avatar luoliangyi

增加app和twain打包脚本

parent 64a4dcb8
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "华高扫描仪软件"
#define MyAppVersion "2.0.0.1"
#define MyAppSetupName "HuagoScanApp_Setup"
#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={{7076DC53-5C2F-4216-9783-2A6F954FEB3E}
AppName={#MyAppName}
AppVerName={#MyAppName}
AppVersion={#MyAppVersion}
DefaultDirName={pf}\{#MyAppDefSetupDir}
DefaultGroupName={#MyAppName}
VersionInfoVersion={#MyAppVersion}
OutputDir=.\
OutputBaseFilename={#MyAppSetupName}
Compression=lzma
AppPublisher={#MyAppPublisher}
SolidCompression=yes
UninstallIconFile=uninstall.ico
SetupIconFile=logo.ico
LicenseFile=
[Languages]
Name: "zn"; MessagesFile: "compiler:Languages/Chinese.isl"
[Files]
; app
Source: ".\logo.ico"; DestDir: "{app}\"; Flags: ignoreversion
Source: ".\HuaGoScan_App_Help_manual.pdf"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\iconengines\*"; DestDir: "{app}\iconengines\"; Flags: ignoreversion
Source: "..\x86\imageformats\*"; DestDir: "{app}\imageformats\"; Flags: ignoreversion
Source: "..\x86\platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion
Source: "..\x86\styles\*"; DestDir: "{app}\styles\"; Flags: ignoreversion
Source: "..\x86\translations\*"; DestDir: "{app}\translations\"; Flags: ignoreversion
Source: "..\x86\D3Dcompiler_47.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\libEGL.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\libGLESV2.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\msvcp140.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\opengl32sw.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\Qt5Core.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\Qt5Gui.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\Qt5Svg.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\Qt5Widgets.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\vcruntime140.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\HGBase.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\HGImgFmt.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\HGImgProc.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\hgsane.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\hgscanner.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\HGScanner.exe"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\libmupdf.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\pdflib.dll"; DestDir: "{app}\"; Flags: ignoreversion
[INI]
[Icons]
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\HGScanner.exe"
Name: "{group}\{#MyAppName}"; Filename: "{app}\HGScanner.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}\HGScanner.exe"; Flags: uninsdeletekey
[Code]
function SetUninstallIcon(iconPath:string): Boolean;
var
InstalledVersion,SubKeyName: String;
begin
if (IsWin64()) then begin
SubKeyName := 'Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{7076DC53-5C2F-4216-9783-2A6F954FEB3E}_is1';
RegWriteStringValue(HKLM64,SubKeyName,'DisplayIcon',iconPath);
end else begin
SubKeyName := 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{7076DC53-5C2F-4216-9783-2A6F954FEB3E}_is1';
RegWriteStringValue(HKLM,SubKeyName,'DisplayIcon',iconPath);
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpFinished then
begin
SetUninstallIcon(ExpandConstant('{app}\logo.ico'));
end;
end;
procedure CurUninstallStepChanged(CurUninstallStep:TUninstallStep);
begin
if CurUninstallStep = usDone then
begin
DelTree(ExpandConstant('{app}'), True, True, True);
end;
end;
[Run]
Filename: "{app}\HGScanner.exe"; Description: "{cm:LaunchProgram, {#MyAppName}}"; Flags: postinstall nowait skipifsilent
\ No newline at end of file
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "华高TWAIN"
#define MyAppVersion "2.0.0.1"
#define MyAppSetupName "HuagoScanTwain_Setup"
#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={{A69BBD28-5199-4DD9-870B-4738B99104B0}
AppName={#MyAppName}
AppVerName={#MyAppName}
AppVersion={#MyAppVersion}
VersionInfoVersion={#MyAppVersion}
DefaultGroupName={#MyAppName}
DefaultDirName={win}\twain_32\huagoscan\
OutputDir=.\
OutputBaseFilename={#MyAppSetupName}
Compression=lzma
AppPublisher={#MyAppPublisher}
SolidCompression=yes
UninstallIconFile=uninstall.ico
SetupIconFile=logo.ico
LicenseFile=
DisableDirPage=yes
[Languages]
Name: "zn"; MessagesFile: "compiler:Languages/Chinese.isl"
[Files]
; app
Source: ".\logo.ico"; DestDir: "{app}\"; Flags: ignoreversion
; twain
Source: "..\x86\hgsane.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\hgscanner.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\huagaotwain.ds"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\msvcp140.dll"; DestDir: "{app}\"; Flags: ignoreversion
Source: "..\x86\vcruntime140.dll"; DestDir: "{app}\"; Flags: ignoreversion
[INI]
[Icons]
Name: "{group}\{cm:UninstallProgram, {#MyAppName}}"; Filename: "{uninstallexe}";
[Code]
function SetUninstallIcon(iconPath:string): Boolean;
var
InstalledVersion,SubKeyName: String;
begin
if (IsWin64()) then begin
SubKeyName := 'Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{A69BBD28-5199-4DD9-870B-4738B99104B0}_is1';
RegWriteStringValue(HKLM64,SubKeyName,'DisplayIcon',iconPath);
end else begin
SubKeyName := 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{A69BBD28-5199-4DD9-870B-4738B99104B0}_is1';
RegWriteStringValue(HKLM,SubKeyName,'DisplayIcon',iconPath);
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpFinished then
begin
SetUninstallIcon(ExpandConstant('{app}\logo.ico'));
end;
end;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment