Merge pull request #28 from lat9nq/ea-linux

general: Fix Linux build
This commit is contained in:
liushuyu 2022-07-28 17:13:26 -06:00 committed by GitHub
commit f3d0d06a09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 102 additions and 21 deletions

View file

@ -1,15 +1,6 @@
#!/usr/bin/env bash
cd /liftinstall || exit 1
# setup NodeJS
curl -sL https://deb.nodesource.com/setup_12.x | bash -
# setup Yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
apt-get update
apt-get install -y libwebkit2gtk-4.0-dev libssl-dev nodejs yarn
yarn --cwd ui
cargo build
cargo build --release

4
.travis/exec.sh Normal file
View file

@ -0,0 +1,4 @@
#!/bin/bash -ex
# the UID for the container yuzu user is 1027
docker run -u root -v $(pwd):/liftinstall -t yuzuemu/build-environments:linux-liftinstall /bin/bash /liftinstall/.travis/build.sh

View file

@ -1,2 +1,2 @@
name = "yuzu"
target_url = "https://raw.githubusercontent.com/yuzu-emu/liftinstall/master/config.linux.v2.toml"
target_url = "https://raw.githubusercontent.com/yuzu-emu/liftinstall/master/config.linux.v3.toml"

58
config.linux.v3.toml Normal file
View file

@ -0,0 +1,58 @@
installing_message = "Reminder: yuzu is an <b>experimental</b> emulator. Stuff will break!"
hide_advanced = true
[authentication]
# Base64 encoded version of the public key for validating the JWT token. Must be in DER format
pub_key_base64 = "MIIBCgKCAQEAs5K6s49JVV9LBMzDrkORsoPSYsv1sCXDtxjp4pn8p0uPSvJAsbNNmdIgCjfSULzbHLM28MblnI4zYP8ZgKtkjdg+Ic5WQbS5iBAkf18zMafpOrotTArLsgZSmUfNYt0SOiN17D+sq/Ov/CKXRM9CttKkEbanBTVqkx7sxsHVbkI6tDvkboSaNeVPHzHlfAbvGrUo5cbAFCB/KnRsoxr+g7jLKTxU1w4xb/pIs91h80AXV/yZPXL6ItPM3/0noIRXjmoeYWf2sFQaFALNB2Kef0p6/hoHYUQP04ZSIL3Q+v13z5X2YJIlI4eLg+iD25QYm9V8oP3+Xro4vd47a0/maQIDAQAB"
# URL to authenticate against. This must return a JWT token with their permissions and a custom claim patreonInfo with the following structure
# "patreonInfo": { "linked": false, "activeSubscription": false }
# If successful, the frontend will use this JWT token as a Bearer Authentication when requesting the binaries to download
auth_url = "https://api.yuzu-emu.org/jwt/installer/"
[authentication.validation]
iss = "citra-core"
aud = "installer"
[[packages]]
name = "yuzu Early Access"
description = "Preview release with the newest features for the supporters."
icon = "thicc_logo_installer__ea_shadow.png"
requires_authorization = true
# puts a "new" ribbon the package select
is_new = true
[packages.extended_description]
no_action_description = "Thank you for your support!"
# Displayed when the package has no authentication for the user
need_authentication_description = "Click here to sign in with your yuzu account for Early Access"
# Displayed when the package has an authentication, but the user has not linked their account
need_link_description = "You are signed in, but you need to link your Patreon account! Click here for more details"
# Displayed when the package has an authentication, but the user has not linked their account
need_subscription_description = "You are signed in, but you need to link your Patreon account! Click here for more details"
# Displayed when the package has an authentication, but the user has not linked their account
need_reward_tier_description = "You are signed in, but are not backing an eligible reward tier! Click here for more details"
[packages.source]
name = "patreon"
match = "^yuzu-linux-[0-9]*-[0-9a-f]*.tar.xz$"
[packages.source.config]
repo = "earlyaccess"
[[packages.shortcuts]]
name = "yuzu Early Access"
relative_path = "yuzu-linux-early-access/yuzu-early-access.AppImage"
description = "Launch yuzu Early Access"
[[packages]]
name = "yuzu"
description = "Includes frequent updates to yuzu with all the latest reviewed and tested features."
icon = "thicc_logo_installer_shadow.png"
default = true
[packages.source]
name = "github"
match = "^yuzu-linux-[0-9]*-[0-9a-f]*.tar.xz$"
[packages.source.config]
repo = "yuzu-emu/yuzu-mainline"
[[packages.shortcuts]]
name = "yuzu"
relative_path = "yuzu-linux-mainline/yuzu"
description = "Launch yuzu"

View file

@ -97,6 +97,7 @@ pub struct InstallerFramework {
// If we just completed an uninstall, and we should clean up after ourselves.
pub burn_after_exit: bool,
pub launcher_path: Option<String>,
pub is_windows: bool,
}
/// Contains basic properties on the status of the session. Subset of InstallationFramework.
@ -453,6 +454,7 @@ impl InstallerFramework {
is_launcher: false,
burn_after_exit: false,
launcher_path: None,
is_windows: cfg!(windows),
}
}
@ -480,6 +482,7 @@ impl InstallerFramework {
is_launcher: false,
burn_after_exit: false,
launcher_path: None,
is_windows: cfg!(windows),
})
}
}

View file

@ -314,6 +314,7 @@ mod natives {
target: &str,
args: &str,
working_dir: &str,
exe_path: &str,
) -> Result<String, String> {
// FIXME: no icon will be shown since no icon is provided
let data_local_dir = dirs::data_local_dir();
@ -330,10 +331,10 @@ mod natives {
));
}
};
path.push(format!("{}.desktop", slugify(name))); // file name
path.push(format!("yuzu-maintenance-tool_{}.desktop", slugify(name))); // file name
let desktop_file = format!(
"[Desktop Entry]\nName={}\nExec=\"{}\" {}\nComment={}\nPath={}\n",
name, target, args, description, working_dir
"[Desktop Entry]\nType=Application\nName={}\nExec=\"{}\" {}\nComment={}\nPath={}\nIcon=yuzu\n",
name, target, args, description, working_dir
);
let desktop_f = File::create(path);
let mut desktop_f = match desktop_f {

View file

@ -11,7 +11,10 @@ use config::PackageDescription;
use logging::LoggingErrors;
#[cfg(windows)]
use native::create_desktop_shortcut;
#[cfg(target_os = "linux")]
use native::create_shortcut;
pub struct InstallDesktopShortcutTask {
pub name: String,
@ -81,6 +84,7 @@ impl Task for InstallDesktopShortcutTask {
.to_str()
.log_expect("Unable to build shortcut metadata (exe)");
#[cfg(windows)]
installed_files.push(create_desktop_shortcut(
&shortcut.name,
&shortcut.description,
@ -90,6 +94,16 @@ impl Task for InstallDesktopShortcutTask {
&starting_dir,
exe_path,
)?);
#[cfg(target_os = "linux")]
installed_files.push(create_shortcut(
&shortcut.name,
&shortcut.description,
tool_path,
&format!("--launcher \"{}\"", exe_path),
&starting_dir,
exe_path,
)?);
}
// Update the installed packages shortcuts information in the database

View file

@ -65,7 +65,7 @@
</p>
</div>
<div class="is-right-floating is-bottom-floating">
<div class="is-right-floating is-bottom-floating" v-scroll>
<p class="control">
<a class="button is-dark is-medium" v-on:click="verify_token">Verify Token</a>
</p>
@ -166,6 +166,13 @@ export default {
error: function() {
this.verification_opened = true;
}
},
directives: {
scroll: {
inserted: function (el) {
el.scrollIntoView()
}
}
}
}
</script>

View file

@ -3,7 +3,7 @@
<div v-if="was_migrate">
<h4 class="subtitle">You have been moved to the new, single version of {{ $root.$data.attrs.name }}.</h4>
<p>You can find your installed applications in your start menu - if you were in the middle of something, just reattempt.</p>
<p>You can find your installed applications in your applications menu - if you were in the middle of something, just reattempt.</p>
<img src="../assets/how-to-open.png" alt="Where yuzu is installed"/>
</div>
@ -11,20 +11,20 @@
<div v-if="has_installed">
<h4 class="subtitle">{{ $root.$data.attrs.name }} has been updated.</h4>
<p>You can find your installed applications in your start menu.</p>
<p>You can find your installed applications in your applications menu.</p>
</div>
<div v-else>
<h4 class="subtitle">{{ $root.$data.attrs.name }} is already up to date!</h4>
<p>You can find your installed applications in your start menu.</p>
<p>You can find your installed applications in your applications menu.</p>
</div>
</div>
<div v-else-if="was_install">
<h4 class="subtitle">Thanks for installing {{ $root.$data.attrs.name }}!</h4>
<p>You can find your installed applications in your start menu.</p>
<p>You can find your installed applications in your applications menu.</p>
<br>
<img src="../assets/how-to-open.png" alt="Where yuzu is installed"/>
<img src="../assets/how-to-open.png" alt="Where yuzu is installed" v-if="$root.$data.metadata.is_windows"/>
</div>
<div v-else>
<h4 class="subtitle">{{ $root.$data.attrs.name }} has been uninstalled.</h4>

View file

@ -23,9 +23,12 @@
</div>
<div class="tile is-child is-6 box clickable-box" v-if="!$root.$data.metadata.preexisting_install" v-on:click.capture.stop="installDesktopShortcut = !installDesktopShortcut">
<h4>Install Options</h4>
<b-checkbox v-model="installDesktopShortcut">
<b-checkbox v-model="installDesktopShortcut" v-if="$root.$data.metadata.is_windows">
Create Desktop Shortcut
</b-checkbox>
<b-checkbox v-model="installDesktopShortcut" v-if="!$root.$data.metadata.is_windows">
Create Shortcut
</b-checkbox>
</div>
</div>
</div>