mirror of http://192.168.10.5:8099/sane/release
增加windows下app打包脚本
This commit is contained in:
parent
808e7f884f
commit
6e6f28dba9
Binary file not shown.
|
@ -0,0 +1,95 @@
|
||||||
|
; 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\Release\hwusbdev.key"; DestDir: "{app}\"; Flags: ignoreversion
|
||||||
|
|
||||||
|
Source: "..\x86\Release\iconengines\*"; DestDir: "{app}\iconengines\"; Flags: ignoreversion
|
||||||
|
Source: "..\x86\Release\imageformats\*"; DestDir: "{app}\imageformats\"; Flags: ignoreversion
|
||||||
|
Source: "..\x86\Release\platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion
|
||||||
|
Source: "..\x86\Release\styles\*"; DestDir: "{app}\styles\"; Flags: ignoreversion
|
||||||
|
Source: "..\x86\Release\translations\*"; DestDir: "{app}\translations\"; Flags: ignoreversion
|
||||||
|
|
||||||
|
Source: "..\x86\Release\HuagoScan.exe"; DestDir: "{app}\"; Flags: ignoreversion
|
||||||
|
Source: "..\x86\Release\HuagoScanUpgrade.exe"; DestDir: "{app}\"; Flags: ignoreversion
|
||||||
|
Source: "..\x86\Release\*.dll"; DestDir: "{app}\"; Flags: ignoreversion
|
||||||
|
|
||||||
|
|
||||||
|
[INI]
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\HuagoScan.exe"
|
||||||
|
Name: "{group}\{#MyAppName}"; Filename: "{app}\HuagoScan.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}\HuagoScan.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}\HuagoScan.exe"; Description: "{cm:LaunchProgram, {#MyAppName}}"; Flags: postinstall nowait skipifsilent
|
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
Loading…
Reference in New Issue