Windows fix

This commit is contained in:
Rémi BERTHO 2023-11-09 23:15:32 +01:00
parent 68860aad80
commit 1681188214
Signed by: dalan
GPG Key ID: EE3B917931C07B64
7 changed files with 19 additions and 123 deletions

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<comment version="3.0">
<caption/>
<note>-
Projection: Equirectangular (2)
FOV: 360 x 62
Ev: 13,14</note>
<place/>
<categories/>
</comment>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<comment version="3.0">
<caption/>
<note>-
Projection: Equirectangular (2)
FOV: 139 x 49
Ev: 13,63</note>
<place/>
<categories/>
</comment>

103
.gitignore vendored
View File

@ -1,99 +1,3 @@
# ---> Python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
#*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# dotenv
.env
# virtualenv
.venv
venv/
ENV/
# Spyder project settings
.spyderproject
# Rope project settings
.ropeproject
# Images
*.jpg
*.jpeg
@ -117,3 +21,10 @@ target/
# IDE
.idea
# Git
.git
# Dist
/dist

View File

@ -14,11 +14,11 @@ dist_linux:
smc sources
dist_win:
Remove-Item dist -Force -Recurse
New-Item -Path dist -Type Directory
coreutils rm -Rf ./dist
coreutils mkdir dist
cargo build --release
smc bin_win files
smc sources
pandoc -i LICENSE.md -s -o LICENSE.rtf
Start-Process -FilePath "C:\Program Files (x86)\Inno Setup 6\compil32.exe" -ArgumentList "/cc", "win-setup.iss" -Wait
Get-FileHash "dist/SimplePanoramaViewer-2.0.0-x86_64-pc-windows-msvc-setup.exe" -Algorithm SHA512 | Select-Object -ExpandProperty Hash | Out-File "dist/SimplePanoramaViewer-2.0.0-x86_64-pc-windows-msvc-setup.exe.sha512sum"
Start-Process -WorkingDirectory dist coreutils -ArgumentList sha512sum, -b, "SimplePanoramaViewer-2.0.0-x86_64-pc-windows-msvc-setup.exe" -RedirectStandardOutput "dist/SimplePanoramaViewer-2.0.0-x86_64-pc-windows-msvc-setup.exe.sha512sum"

View File

@ -26,4 +26,5 @@ output = "./dist/SimplePanoramaViewer-2.0.0-src$EXT"
container = "Tar"
compression = "Zstd"
compression_level = 15
hidden = true
signatures = ["Sha512"]

View File

@ -14,7 +14,7 @@ use wry::{
event_loop::{ControlFlow, EventLoop},
window::WindowBuilder,
},
webview::WebViewBuilder,
webview::{WebContext, WebViewBuilder},
};
#[derive(RustEmbed)]
@ -85,8 +85,12 @@ fn main() -> Result<()> {
.with_title("Simple panorama viewer")
.with_maximized(true)
.build(&event_loop)?;
let data_dir = directories::ProjectDirs::from("fr", "dalan", "SimplePanoramaViwer").unwrap();
let _webview = WebViewBuilder::new(window)?
.with_url("http://127.0.0.1:62371/index.html")?
.with_web_context(&mut WebContext::new(Some(
data_dir.cache_dir().to_path_buf(),
)))
.build()?;
info!("Event loop");

View File

@ -5,7 +5,7 @@
#define MyAppVersion "2.0.0"
#define MyAppPublisher "Dalan"
#define MyAppURL "https://www.dalan.fr"
#define MyAppExeName "SimplePanoramaViewer.exe"
#define MyAppExeName "simple_panorama_viewer.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
@ -19,7 +19,7 @@ AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultDirName={commonpf}\{#MyAppName}
DisableProgramGroupPage=yes
LicenseFile=LICENSE.rtf
OutputBaseFilename={#MyAppName}-{#MyAppVersion}-x86_64-pc-windows-msvc-setup
@ -37,7 +37,7 @@ Name: "french"; MessagesFile: "compiler:Languages\French.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "dist\SimplePanoramaViewer\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "target\release\simple_panorama_viewer.exe"; DestDir: "{app}"; Flags: ignoreversion
[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"