Add windows packaging
This commit is contained in:
parent
2d31e7e4f8
commit
9a508a53dd
2 changed files with 74 additions and 0 deletions
20
generate.ps1
Normal file
20
generate.ps1
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
$version="1.0"
|
||||||
|
|
||||||
|
if (Test-Path dist\"SimplePanoramaViewer-$version-win64.exe")
|
||||||
|
{
|
||||||
|
Remove-Item dist\"SimplePanoramaViewer-$version-win64.exe" -Force -Recurse
|
||||||
|
}
|
||||||
|
if (Test-Path dist\SimplePanoramaViewer)
|
||||||
|
{
|
||||||
|
Remove-Item dist\SimplePanoramaViewer -Force -Recurse
|
||||||
|
}
|
||||||
|
|
||||||
|
pandoc -i LICENSE.md -s -o LICENSE.rtf
|
||||||
|
pyinstaller SimplePanoramaViewer_folder.spec
|
||||||
|
Start-Process -FilePath "C:\Program Files (x86)\Inno Setup 5\compil32.exe" -ArgumentList "/cc", "win-setup.iss" -Wait
|
||||||
|
Remove-Item dist\SimplePanoramaViewer -Force -Recurse
|
||||||
|
Get-FileHash "dist/SimplePanoramaViewer-$version-win64-setup.exe" -Algorithm SHA512 | Select-Object -ExpandProperty Hash | Out-File "dist/SimplePanoramaViewer-$version-win64-setup.exe.sha512sum"
|
||||||
|
|
||||||
|
pyinstaller SimplePanoramaViewer_file.spec
|
||||||
|
Rename-Item -Path "dist\SimplePanoramaViewer.exe" -NewName "SimplePanoramaViewer-$version-win64.exe"
|
||||||
|
Get-FileHash "dist/SimplePanoramaViewer-$version-win64.exe" -Algorithm SHA512 | Select-Object -ExpandProperty Hash | Out-File "dist/SimplePanoramaViewer-$version-win64.exe.sha512sum"
|
54
win-setup.iss
Normal file
54
win-setup.iss
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
; Script generated by the Inno Setup Script Wizard.
|
||||||
|
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||||
|
|
||||||
|
#define MyAppName "SimplePanoramaViewer"
|
||||||
|
#define MyAppVersion "1.0"
|
||||||
|
#define MyAppPublisher "Dalan"
|
||||||
|
#define MyAppURL "https://www.dalan.fr"
|
||||||
|
#define MyAppExeName "SimplePanoramaViewer.exe"
|
||||||
|
|
||||||
|
[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={{FD4C50E2-6C08-4782-BC4E-77D5A575AF4C}
|
||||||
|
AppName={#MyAppName}
|
||||||
|
AppVersion={#MyAppVersion}
|
||||||
|
;AppVerName={#MyAppName} {#MyAppVersion}
|
||||||
|
AppPublisher={#MyAppPublisher}
|
||||||
|
AppPublisherURL={#MyAppURL}
|
||||||
|
AppSupportURL={#MyAppURL}
|
||||||
|
AppUpdatesURL={#MyAppURL}
|
||||||
|
DefaultDirName={pf}\{#MyAppName}
|
||||||
|
DisableProgramGroupPage=yes
|
||||||
|
LicenseFile=LICENSE.rtf
|
||||||
|
OutputBaseFilename={#MyAppName}-{#MyAppVersion}-win64-setup
|
||||||
|
OutputDir=dist
|
||||||
|
Compression=lzma
|
||||||
|
SolidCompression=yes
|
||||||
|
ArchitecturesAllowed=x64
|
||||||
|
ArchitecturesInstallIn64BitMode=x64
|
||||||
|
|
||||||
|
[Languages]
|
||||||
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
|
||||||
|
|
||||||
|
[Tasks]
|
||||||
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||||
|
|
||||||
|
[Files]
|
||||||
|
Source: "dist\SimplePanoramaViewer\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||||
|
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||||
|
|
||||||
|
[Run]
|
||||||
|
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||||
|
|
||||||
|
[Registry]
|
||||||
|
Root: HKCR; Subkey: ".pjpg"; ValueType: string; ValueName: ""; ValueData: "PANORAMIC_IMAGE"; Flags: uninsdeletevalue
|
||||||
|
Root: HKCR; Subkey: ".pjpeg"; ValueType: string; ValueName: ""; ValueData: "PANORAMIC_IMAGE"; Flags: uninsdeletevalue
|
||||||
|
Root: HKCR; Subkey: "PANORAMIC_IMAGE"; ValueType: string; ValueName: ""; ValueData: "Panoramic image"; Flags: uninsdeletekey
|
||||||
|
Root: HKCR; Subkey: "PANORAMIC_IMAGE\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"
|
||||||
|
Root: HKCR; Subkey: "PANORAMIC_IMAGE\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
|
Loading…
Reference in a new issue