c2b75b64c9
Bumps the backend-deps group in /src-tauri with 6 updates: | Package | From | To | | --- | --- | --- | | [chrono](https://github.com/chronotope/chrono) | `0.4.31` | `0.4.33` | | [semver](https://github.com/dtolnay/semver) | `1.0.20` | `1.0.21` | | [serde_json](https://github.com/serde-rs/json) | `1.0.108` | `1.0.113` | | [sysinfo](https://github.com/GuillaumeGomez/sysinfo) | `0.30.1` | `0.30.5` | | [thiserror](https://github.com/dtolnay/thiserror) | `1.0.52` | `1.0.56` | | [zip-extract](https://github.com/MCOfficer/zip-extract) | `0.1.2` | `0.1.3` | Updates `chrono` from 0.4.31 to 0.4.33 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/chronotope/chrono/releases">chrono's releases</a>.</em></p> <blockquote> <h2>0.4.33</h2> <p>This release fixes the broken docrs.rs build of <a href="https://github.com/chronotope/chrono/releases/tag/v0.4.32">chrono 0.4.32</a>.</p> <h2>What's Changed</h2> <ul> <li>Make <code>rkyv</code> feature imply <code>size_32</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/1383">#1383</a>)</li> <li>Fixed typo in <code>Duration::hours()</code> exception (<a href="https://redirect.github.com/chronotope/chrono/issues/1384">#1384</a>, thanks <a href="https://github.com/danwilliams"><code>@danwilliams</code></a>)</li> </ul> <h2>v0.4.32</h2> <p>In this release we shipped part of the effort to reduce the number of methods that could unexpectedly panic, notably for the <code>DateTime</code> and <code>Duration</code> types.</p> <p>Chrono internally stores the value of a <code>DateTime</code> in UTC, and transparently converts it to the local value as required. For example adding a second to a <code>DateTime</code> needs to be done in UTC to get the correct result, but adding a day needs to be done in local time to be correct. What happens when the value is near the edge of the representable range, and the implicit conversions pushes it beyond the representable range? <em>Many</em> methods could panic on such inputs, including formatting the value for <code>Debug</code> output.</p> <p>In chrono 0.4.32 the range of <code>NaiveDate</code>, <code>NaiveDateTime</code> and <code>DateTime</code> is made slightly smaller. This allows us to always do the implicit conversion, and in many cases return the expected result. Specifically the range is now from January 1, -262144 until December 31, 262143, one year less on both sides than before. We expect this may trip up tests if you hardcoded the <code>MIN</code> and <code>MAX</code> dates.</p> <p><code>Duration</code> had a similar issue. The range of this type was pretty arbitrary picked to match the range of an <code>i64</code> in milliseconds. Negating an <code>i64::MIN</code> pushes a value out of range, and in the same way negating <code>Duration::MIN</code> could push it out of our defined range and cause a panic. This turns out to be somewhat common and hidden behind many layers of abstraction. We adjusted the type to have a minimum value of <code>-Duration::MAX</code> instead and prevent the panic case.</p> <p>Other highlights:</p> <ul> <li><code>Duration</code> gained new fallible initialization methods.</li> <li>Better support for <code>rkyv</code>.</li> <li>Most methods on <code>NaiveDateTime</code> are now const.</li> <li>We had to bump our MSRV to 1.61 to keep building with our dependencies. This will also allow us to make more methods on <code>DateTime</code> const in a future release.</li> </ul> <p>Complete list of changes:</p> <h2>Fixes</h2> <ul> <li>Fix panic in <code>TimeZone::from_local_datetime</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/1071">#1071</a>)</li> <li>Fix out of range panics in <code>DateTime</code> getters and setters (<a href="https://redirect.github.com/chronotope/chrono/issues/1317">#1317</a>, <a href="https://redirect.github.com/chronotope/chrono/issues/1329">#1329</a>)</li> </ul> <h2>Additions</h2> <ul> <li>Add <code>NaiveDateTime::checked_(add|sub)_offset</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/1313">#1313</a>)</li> <li>Add <code>DateTime::to_utc</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/1325">#1325</a>)</li> <li>Duration features part 1 (<a href="https://redirect.github.com/chronotope/chrono/issues/1327">#1327</a>)</li> <li>Make methods on <code>NaiveDateTime</code> const where possible (<a href="https://redirect.github.com/chronotope/chrono/issues/1286">#1286</a>)</li> <li>Split <code>clock</code> feature into <code>clock</code> and <code>now</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/1343">#1343</a>, thanks <a href="https://github.com/mmastrac"><code>@mmastrac</code></a>)</li> <li>Add <code>From<NaiveDate></code> for <code>NaiveDateTime</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/1355">#1355</a>, thanks <a href="https://github.com/dcechano"><code>@dcechano</code></a>)</li> <li>Add <code>NaiveDateTime::from_timestamp_nanos</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/1357">#1357</a>, thanks <a href="https://github.com/Ali-Mirghasemi"><code>@Ali-Mirghasemi</code></a>)</li> <li>Add <code>Months::num_months()</code> and <code>num_years()</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/1373">#1373</a>, thanks <a href="https://github.com/danwilliams"><code>@danwilliams</code></a>)</li> <li>Add <code>DateTime<Utc>::from_timestamp_millis</code> (<a href="https://redirect.github.com/chronotope/chrono/issues/1374">#1374</a>, thanks <a href="https://github.com/xmakro"><code>@xmakro</code></a>)</li> </ul> <h2>Changes</h2> <ul> <li>Fix panic in <code>Duration::MIN.abs()</code> (adjust <code>Duration::MIN</code> by 1 millisecond) (<a href="https://redirect.github.com/chronotope/chrono/issues/1334">#1334</a>)</li> <li>Bump MSRV to 1.61 (<a href="https://redirect.github.com/chronotope/chrono/issues/1347">#1347</a>)</li> <li>Update windows-targets requirement from 0.48 to 0.52 (<a href="https://redirect.github.com/chronotope/chrono/issues/1360">#1360</a>)</li> <li>Update windows-bindgen to 0.52 (<a href="https://redirect.github.com/chronotope/chrono/issues/1379">#1379</a>)</li> </ul> <h2>Deprecations</h2> <ul> <li>Deprecate standalone <code>format</code> functions (<a href="https://redirect.github.com/chronotope/chrono/issues/1306">#1306</a>)</li> </ul> <h2>Documentation</h2> <ul> <li>Improve doc comment and tests for timestamp_nanos_opt (<a href="https://redirect.github.com/chronotope/chrono/issues/1299">#1299</a>, thanks <a href="https://github.com/mlegner"><code>@mlegner</code></a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
---|---|---|
.github | ||
.tauri | ||
.vscode | ||
docs | ||
public/images/jak1 | ||
scripts | ||
src | ||
src-tauri | ||
.gitignore | ||
.prettierignore | ||
.prettierrc.json | ||
crowdin.yml | ||
index.html | ||
LICENSE | ||
package.json | ||
postcss.config.cjs | ||
README.md | ||
svelte.config.js | ||
tailwind.config.cjs | ||
tsconfig.json | ||
tsconfig.node.json | ||
vite.config.ts | ||
vitest.config.ts | ||
yarn.lock |
OpenGOAL Launcher
Our attempt at distributing the OpenGOAL releases in a cross-platform and easy to use and update way. It also is a place for features involving the games, such as texture pack or mod management.
The launcher uses the Tauri framework, if you are interested in our motivation for why see below.
Usage
See the documentation on our website for hopefully up to date instructions on how to use it.
Asking for help
When asking for help, please download the support package which includes logs to help someone diagnose the problem.
If you cannot do this (for example, the bug relates to making the package / the application won't launch) then you can find the application logs in the following folders:
- Windows
C://Users/<YOUR_USER_NAME>/AppData/Roaming/OpenGOAL-Launcher/logs
- Linux
/home/<YOUR_USER_NAME>/.config/OpenGOAL-Launcher/logs
Note that both AppData
and .config
are hidden folders.
Development
Tauri requires a valid Rust installation, as well as a valid NodeJS installation.
For installing Rust, it's recommended to follow the instructions here https://www.rust-lang.org/tools/install
Windows
scoop install nodejs
npm install -g yarn
Linux (Ubuntu 22.04)
sudo apt install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev # tauri deps, see - https://tauri.app/v1/guides/getting-started/prerequisites#setting-up-linux
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash # installs Node Version Manager (ubuntus package is woefully out of date)
source ~/.bashrc
nvm install lts/hydrogen # installs latest nodejs 18.X
npm install -g yarn
Building and Running
To build and run the application locally, all you have to do is run:
yarn install
yarn tauri dev
Code Overview
TODO
References
- https://tauri.app/v1/guides/features/
- https://tauri.app/v1/api/js/
- https://svelte.dev/docs
- https://tailwindcss.com/
- https://flowbite-svelte.com/
Why Tauri?
The gut reaction from many when looking at the launcher is ugh, another Electron app. This however is not the case. Tauri leverages typical HTML/CSS/JS for rendering the frontend -- but it does not do so by bundling Chromium. Instead it leverages the native WebView providers found on modern operating systems. This is also why the distribution is quite small (majority of the download size is for fonts/images/videos).
Here's a non-exhaustive list of all the benefits we get out of the box with Tauri that we'd have to build ourselves / straight-up not have available to us if we went with a non-electron GUI application framework.
- A built-in updater with private key signing
- Bundling scripts for MSI installers, AppImages, DMGs
- Essentially no differences frontend-wise across all operating systems
- No need to ship an interpreter (ie. PyQt)
- Typical web UI workflows that many people are familiar with
- The ability to painlessly write application logic in Rust
- Plethora of frontend E2E testing frameworks -- most of these are non-existant or cost money for other frameworks like Qt