Browse Source

Add windows packaging

master
Rémi BERTHO 7 months ago
parent
commit
9a508a53dd
Signed by: Rémi BERTHO <remi.bertho@dalan.fr> GPG Key ID: EE3B917931C07B64
2 changed files with 74 additions and 0 deletions
  1. 20
    0
      generate.ps1
  2. 54
    0
      win-setup.iss

+ 20
- 0
generate.ps1 View File

@@ -0,0 +1,20 @@
1
+$version="1.0"
2
+
3
+if (Test-Path dist\"SimplePanoramaViewer-$version-win64.exe")
4
+{
5
+	Remove-Item dist\"SimplePanoramaViewer-$version-win64.exe" -Force -Recurse
6
+}
7
+if (Test-Path dist\SimplePanoramaViewer)
8
+{
9
+	Remove-Item dist\SimplePanoramaViewer -Force -Recurse
10
+}
11
+
12
+pandoc -i LICENSE.md -s -o LICENSE.rtf
13
+pyinstaller SimplePanoramaViewer_folder.spec
14
+Start-Process -FilePath "C:\Program Files (x86)\Inno Setup 5\compil32.exe" -ArgumentList "/cc", "win-setup.iss" -Wait
15
+Remove-Item dist\SimplePanoramaViewer -Force -Recurse
16
+Get-FileHash "dist/SimplePanoramaViewer-$version-win64-setup.exe" -Algorithm SHA512 | Select-Object -ExpandProperty Hash | Out-File "dist/SimplePanoramaViewer-$version-win64-setup.exe.sha512sum"
17
+
18
+pyinstaller SimplePanoramaViewer_file.spec
19
+Rename-Item -Path "dist\SimplePanoramaViewer.exe" -NewName "SimplePanoramaViewer-$version-win64.exe"
20
+Get-FileHash "dist/SimplePanoramaViewer-$version-win64.exe" -Algorithm SHA512 | Select-Object -ExpandProperty Hash | Out-File "dist/SimplePanoramaViewer-$version-win64.exe.sha512sum"

+ 54
- 0
win-setup.iss View File

@@ -0,0 +1,54 @@
1
+; Script generated by the Inno Setup Script Wizard.
2
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3
+
4
+#define MyAppName "SimplePanoramaViewer"
5
+#define MyAppVersion "1.0"
6
+#define MyAppPublisher "Dalan"
7
+#define MyAppURL "https://www.dalan.fr"
8
+#define MyAppExeName "SimplePanoramaViewer.exe"
9
+
10
+[Setup]
11
+; NOTE: The value of AppId uniquely identifies this application.
12
+; Do not use the same AppId value in installers for other applications.
13
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
14
+AppId={{FD4C50E2-6C08-4782-BC4E-77D5A575AF4C}
15
+AppName={#MyAppName}
16
+AppVersion={#MyAppVersion}
17
+;AppVerName={#MyAppName} {#MyAppVersion}
18
+AppPublisher={#MyAppPublisher}
19
+AppPublisherURL={#MyAppURL}
20
+AppSupportURL={#MyAppURL}
21
+AppUpdatesURL={#MyAppURL}
22
+DefaultDirName={pf}\{#MyAppName}            
23
+DisableProgramGroupPage=yes
24
+LicenseFile=LICENSE.rtf
25
+OutputBaseFilename={#MyAppName}-{#MyAppVersion}-win64-setup
26
+OutputDir=dist
27
+Compression=lzma
28
+SolidCompression=yes 
29
+ArchitecturesAllowed=x64
30
+ArchitecturesInstallIn64BitMode=x64
31
+
32
+[Languages]
33
+Name: "english"; MessagesFile: "compiler:Default.isl"
34
+Name: "french"; MessagesFile: "compiler:Languages\French.isl"
35
+
36
+[Tasks]
37
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
38
+
39
+[Files]
40
+Source: "dist\SimplePanoramaViewer\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
41
+
42
+[Icons]
43
+Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
44
+Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
45
+
46
+[Run]
47
+Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
48
+
49
+[Registry]
50
+Root: HKCR; Subkey: ".pjpg"; ValueType: string; ValueName: ""; ValueData: "PANORAMIC_IMAGE"; Flags: uninsdeletevalue 
51
+Root: HKCR; Subkey: ".pjpeg"; ValueType: string; ValueName: ""; ValueData: "PANORAMIC_IMAGE"; Flags: uninsdeletevalue 
52
+Root: HKCR; Subkey: "PANORAMIC_IMAGE"; ValueType: string; ValueName: ""; ValueData: "Panoramic image"; Flags: uninsdeletekey
53
+Root: HKCR; Subkey: "PANORAMIC_IMAGE\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"
54
+Root: HKCR; Subkey: "PANORAMIC_IMAGE\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""

Loading…
Cancel
Save