veloren / Airshipper

The official Veloren launcher! This repository is a mirror. Please submit all PRs and issues on our GitLab page: https://gitlab.com/veloren/airshipper
https://veloren.net/download
GNU General Public License v3.0
255 stars 35 forks source link

Airshipper doesn't build on Windows (as at 23Apr24 and 24Apr24). #195

Open mrexcessive opened 4 months ago

mrexcessive commented 4 months ago

Airshipper doesn't build on Windows (as at 23Apr24 and 24Apr24).

See Reddit thread, [https://www.reddit.com/r/Veloren/comments/1caz7vn/is_there_a_stable_windows_build_airshipper_doesnt/]

This patch appears to fix it, and it builds and runs after patch, but I'm just naively passing None as the Option second parameter value for .asset_for(,) invocations.

git diff  
diff --git a/client/src/windows.rs b/client/src/windows.rs  
index 893983f..5ffca34 100644  
--- a/client/src/windows.rs  
+++ b/client/src/windows.rs  
@@ -31,8 +31,8 @@ pub fn query() -> Result<Option<Release>> {  
if Version::parse(&latest_release.version)?
>Version::parse(env!("CARGO_PKG_VERSION"))?  
&& latest_release
- .asset\_for("windows")  
- .or_else(|| latest_release.asset_for(".msi"))  
+ .asset_for("windows",None)  
+ .or_else(|| latest_release.asset_for(".msi", None))  
.is_some()  
{  
tracing::debug!("Found new Airshipper release: {}", &latest_release.version);  
@@ -54,8 +54,8 @@ pub(crate) fn update(latest_release: &Release) -> Result<()> {  
.expect("failed to create cache directory!");  
let asset = latest_release
-    .asset_for("windows")  
-    .or_else(|| latest_release.asset_for(".msi"));  
+    .asset_for("windows",None)  
+    .or_else(|| latest_release.asset_for(".msi",None));  

// Check Github release provides artifact for current platform  
mrexcessive commented 4 months ago

I would create a PR, but not got access to create a branch