From 810ef5fb257d3926817b18bf67b409f5290c19ee Mon Sep 17 00:00:00 2001
From: lat9nq <22451773+lat9nq@users.noreply.github.com>
Date: Mon, 12 Jul 2021 10:11:01 -0400
Subject: [PATCH 01/11] src: Fix Linux build
Syncs the parameters between the Windows and Linux create_shortcut
functions. Makes the install_desktop_shortcut only work on Windows where
it has create_desktop_shortcut implemented.
---
src/native/mod.rs | 1 +
src/tasks/install_desktop_shortcut.rs | 2 ++
2 files changed, 3 insertions(+)
diff --git a/src/native/mod.rs b/src/native/mod.rs
index 967b7a9..5f7e13d 100644
--- a/src/native/mod.rs
+++ b/src/native/mod.rs
@@ -314,6 +314,7 @@ mod natives {
target: &str,
args: &str,
working_dir: &str,
+ exe_path: &str,
) -> Result {
// FIXME: no icon will be shown since no icon is provided
let data_local_dir = dirs::data_local_dir();
diff --git a/src/tasks/install_desktop_shortcut.rs b/src/tasks/install_desktop_shortcut.rs
index 58cb797..f4d71f3 100644
--- a/src/tasks/install_desktop_shortcut.rs
+++ b/src/tasks/install_desktop_shortcut.rs
@@ -11,6 +11,7 @@ use config::PackageDescription;
use logging::LoggingErrors;
+#[cfg(windows)]
use native::create_desktop_shortcut;
pub struct InstallDesktopShortcutTask {
@@ -70,6 +71,7 @@ impl Task for InstallDesktopShortcutTask {
"maintenancetool"
};
+ #[cfg(windows)]
for shortcut in package.shortcuts {
let tool_path = path.join(platform_extension);
let tool_path = tool_path
From 825e9cc1c3343700cc4195ab37763d09863315a4 Mon Sep 17 00:00:00 2001
From: lat9nq <22451773+lat9nq@users.noreply.github.com>
Date: Sat, 17 Jul 2021 04:04:09 -0400
Subject: [PATCH 02/11] general: Fix Linux shortcuts
Makes them function even if it's missing the icon.
---
src/native/mod.rs | 4 ++--
src/tasks/install_desktop_shortcut.rs | 15 ++++++++++++++-
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/native/mod.rs b/src/native/mod.rs
index 5f7e13d..6714007 100644
--- a/src/native/mod.rs
+++ b/src/native/mod.rs
@@ -333,8 +333,8 @@ mod natives {
};
path.push(format!("{}.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 {
diff --git a/src/tasks/install_desktop_shortcut.rs b/src/tasks/install_desktop_shortcut.rs
index f4d71f3..2347bb1 100644
--- a/src/tasks/install_desktop_shortcut.rs
+++ b/src/tasks/install_desktop_shortcut.rs
@@ -13,6 +13,8 @@ use logging::LoggingErrors;
#[cfg(windows)]
use native::create_desktop_shortcut;
+#[cfg(target_os = "linux")]
+use native::create_shortcut;
pub struct InstallDesktopShortcutTask {
pub name: String,
@@ -71,7 +73,6 @@ impl Task for InstallDesktopShortcutTask {
"maintenancetool"
};
- #[cfg(windows)]
for shortcut in package.shortcuts {
let tool_path = path.join(platform_extension);
let tool_path = tool_path
@@ -83,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,
@@ -92,6 +94,17 @@ impl Task for InstallDesktopShortcutTask {
&starting_dir,
exe_path,
)?);
+
+ #[cfg(target_os = "linux")]
+ installed_files.push(create_shortcut(
+ &shortcut.name,
+ &shortcut.description,
+ tool_path,
+ // TODO: Send by list
+ &format!("--launcher \"{}\"", exe_path),
+ &starting_dir,
+ exe_path,
+ )?);
}
// Update the installed packages shortcuts information in the database
From 2958c583afad8946351d49d7cd9600229cd5548b Mon Sep 17 00:00:00 2001
From: lat9nq <22451773+lat9nq@users.noreply.github.com>
Date: Sat, 17 Jul 2021 04:46:23 -0400
Subject: [PATCH 03/11] views: Stub things that don't work or don't apply to
Linux
Icons don't work in Linux. Start menu is not a Linux thing.
Automatically scrolls to the verify token button in the Authentication
view.
---
src/installer.rs | 9 +++++++++
ui/src/views/AuthenticationView.vue | 9 ++++++++-
ui/src/views/CompleteView.vue | 10 +++++-----
ui/src/views/SelectPackages.vue | 2 +-
4 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/src/installer.rs b/src/installer.rs
index 4738b4e..2861d3a 100644
--- a/src/installer.rs
+++ b/src/installer.rs
@@ -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,
+ pub is_windows: bool,
}
/// Contains basic properties on the status of the session. Subset of InstallationFramework.
@@ -453,6 +454,10 @@ impl InstallerFramework {
is_launcher: false,
burn_after_exit: false,
launcher_path: None,
+ #[cfg(windows)]
+ is_windows: true,
+ #[cfg(not(windows))]
+ is_windows: false,
}
}
@@ -480,6 +485,10 @@ impl InstallerFramework {
is_launcher: false,
burn_after_exit: false,
launcher_path: None,
+ #[cfg(windows)]
+ is_windows: true,
+ #[cfg(not(windows))]
+ is_windows: false,
})
}
}
diff --git a/ui/src/views/AuthenticationView.vue b/ui/src/views/AuthenticationView.vue
index 125c5e0..daaa028 100644
--- a/ui/src/views/AuthenticationView.vue
+++ b/ui/src/views/AuthenticationView.vue
@@ -65,7 +65,7 @@
-
+
Verify Token
@@ -166,6 +166,13 @@ export default {
error: function() {
this.verification_opened = true;
}
+ },
+ directives: {
+ scroll: {
+ inserted: function (el) {
+ el.scrollIntoView()
+ }
+ }
}
}
diff --git a/ui/src/views/CompleteView.vue b/ui/src/views/CompleteView.vue
index 60c3895..4e037c9 100644
--- a/ui/src/views/CompleteView.vue
+++ b/ui/src/views/CompleteView.vue
@@ -3,7 +3,7 @@
You have been moved to the new, single version of {{ $root.$data.attrs.name }}.
-
You can find your installed applications in your start menu - if you were in the middle of something, just reattempt.
+
You can find your installed applications in your applications menu - if you were in the middle of something, just reattempt.
@@ -11,20 +11,20 @@
{{ $root.$data.attrs.name }} has been updated.
-
You can find your installed applications in your start menu.
+
You can find your installed applications in your applications menu.
{{ $root.$data.attrs.name }} is already up to date!
-
You can find your installed applications in your start menu.
+
You can find your installed applications in your applications menu.
Thanks for installing {{ $root.$data.attrs.name }}!
-
You can find your installed applications in your start menu.
+
You can find your installed applications in your applications menu.
-
+
{{ $root.$data.attrs.name }} has been uninstalled.
diff --git a/ui/src/views/SelectPackages.vue b/ui/src/views/SelectPackages.vue
index 9c376fc..1bc9de1 100644
--- a/ui/src/views/SelectPackages.vue
+++ b/ui/src/views/SelectPackages.vue
@@ -12,7 +12,7 @@
(installed)
-
+
{{ Lpackage.description }}
From 4ed1ffb5c377f1ebb56f5254c75e2219b716f6ab Mon Sep 17 00:00:00 2001
From: lat9nq <22451773+lat9nq@users.noreply.github.com>
Date: Sat, 17 Jul 2021 17:25:39 -0400
Subject: [PATCH 04/11] general: Get ready for Linux release
Creates a config for Linux based on config.windows.v10.toml, then points
to it. We also remove the icon stub.
---
bootstrap.linux.toml | 2 +-
config.linux.v3.toml | 58 +++++++++++++++++++++++++++++++++
ui/src/views/SelectPackages.vue | 2 +-
3 files changed, 60 insertions(+), 2 deletions(-)
create mode 100644 config.linux.v3.toml
diff --git a/bootstrap.linux.toml b/bootstrap.linux.toml
index 6fddf6a..fc50fa8 100644
--- a/bootstrap.linux.toml
+++ b/bootstrap.linux.toml
@@ -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"
diff --git a/config.linux.v3.toml b/config.linux.v3.toml
new file mode 100644
index 0000000..c26b8c9
--- /dev/null
+++ b/config.linux.v3.toml
@@ -0,0 +1,58 @@
+installing_message = "Reminder: yuzu is an
experimental 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"
+
diff --git a/ui/src/views/SelectPackages.vue b/ui/src/views/SelectPackages.vue
index 1bc9de1..9c376fc 100644
--- a/ui/src/views/SelectPackages.vue
+++ b/ui/src/views/SelectPackages.vue
@@ -12,7 +12,7 @@
(installed)
-
+
{{ Lpackage.description }}
From e54199ad6fde0f07b8a42d720c1d13457cdf5877 Mon Sep 17 00:00:00 2001
From: lat9nq <22451773+lat9nq@users.noreply.github.com>
Date: Sat, 17 Jul 2021 17:53:18 -0400
Subject: [PATCH 05/11] SelectPackages: Desktop shortcut is for Windows
---
ui/src/views/SelectPackages.vue | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ui/src/views/SelectPackages.vue b/ui/src/views/SelectPackages.vue
index 9c376fc..cdd25fb 100644
--- a/ui/src/views/SelectPackages.vue
+++ b/ui/src/views/SelectPackages.vue
@@ -23,9 +23,12 @@
Install Options
-
+
Create Desktop Shortcut
+
+ Create Shortcut
+
From 061944079b73339f0220fe0442b42bdf236ea623 Mon Sep 17 00:00:00 2001
From: lat9nq <22451773+lat9nq@users.noreply.github.com>
Date: Sat, 17 Jul 2021 01:43:33 -0400
Subject: [PATCH 06/11] travis: Build using the linux-liftinstall Docker
container
travis: Build in release mode
travis: Use yuzu user for building
travis: Fix permissions resetting
---
.travis/build.sh | 11 +----------
.travis/exec.sh | 6 ++++++
2 files changed, 7 insertions(+), 10 deletions(-)
create mode 100644 .travis/exec.sh
diff --git a/.travis/build.sh b/.travis/build.sh
index 92bc3d2..54842c5 100644
--- a/.travis/build.sh
+++ b/.travis/build.sh
@@ -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
diff --git a/.travis/exec.sh b/.travis/exec.sh
new file mode 100644
index 0000000..4609bfb
--- /dev/null
+++ b/.travis/exec.sh
@@ -0,0 +1,6 @@
+#!/bin/bash -ex
+
+# the UID for the container yuzu user is 1027
+sudo chown -R 1027 ./
+docker run -v $(pwd):/liftinstall -t yuzuemu/build-environments:linux-liftinstall /bin/bash /liftinstall/.travis/build.sh
+sudo chown -R $(id -u):$(id -g) ./
From 95ee7a1739158ef00894b56577da48f162bbe808 Mon Sep 17 00:00:00 2001
From: lat9nq <22451773+lat9nq@users.noreply.github.com>
Date: Sun, 25 Jul 2021 16:18:27 -0400
Subject: [PATCH 07/11] native: Linux shortcut specific to maintenance tool
---
src/native/mod.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/native/mod.rs b/src/native/mod.rs
index 6714007..46e61b9 100644
--- a/src/native/mod.rs
+++ b/src/native/mod.rs
@@ -331,7 +331,7 @@ 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]\nType=Application\nName={}\nExec=\"{}\" {}\nComment={}\nPath={}\nIcon=yuzu\n",
name, target, args, description, working_dir
From 77a26c149617ca0cdc30110aa8287c4e0fea1a46 Mon Sep 17 00:00:00 2001
From: lat9nq
Date: Fri, 15 Oct 2021 19:18:56 -0400
Subject: [PATCH 08/11] Update src/tasks/install_desktop_shortcut.rs
Co-authored-by: liushuyu
---
src/tasks/install_desktop_shortcut.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/tasks/install_desktop_shortcut.rs b/src/tasks/install_desktop_shortcut.rs
index 2347bb1..246a41a 100644
--- a/src/tasks/install_desktop_shortcut.rs
+++ b/src/tasks/install_desktop_shortcut.rs
@@ -100,8 +100,7 @@ impl Task for InstallDesktopShortcutTask {
&shortcut.name,
&shortcut.description,
tool_path,
- // TODO: Send by list
- &format!("--launcher \"{}\"", exe_path),
+ &["--launcher", exe_path],
&starting_dir,
exe_path,
)?);
From f809e6cb23048ae975a6b326d9853b5d19ad52c9 Mon Sep 17 00:00:00 2001
From: lat9nq
Date: Fri, 15 Oct 2021 19:19:00 -0400
Subject: [PATCH 09/11] Update src/native/mod.rs
Co-authored-by: liushuyu
---
src/native/mod.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/native/mod.rs b/src/native/mod.rs
index 46e61b9..6ca049c 100644
--- a/src/native/mod.rs
+++ b/src/native/mod.rs
@@ -312,7 +312,7 @@ mod natives {
name: &str,
description: &str,
target: &str,
- args: &str,
+ args: &[&str],
working_dir: &str,
exe_path: &str,
) -> Result {
From e6600e3b177062f947e8d452dc5d4cdf475f11ea Mon Sep 17 00:00:00 2001
From: lat9nq
Date: Thu, 28 Jul 2022 16:39:35 -0400
Subject: [PATCH 10/11] general: Housekeeping
Keep up with updates to the compiler.
---
.travis/exec.sh | 4 +---
src/native/mod.rs | 2 +-
src/tasks/install_desktop_shortcut.rs | 2 +-
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/.travis/exec.sh b/.travis/exec.sh
index 4609bfb..0ff8eff 100644
--- a/.travis/exec.sh
+++ b/.travis/exec.sh
@@ -1,6 +1,4 @@
#!/bin/bash -ex
# the UID for the container yuzu user is 1027
-sudo chown -R 1027 ./
-docker run -v $(pwd):/liftinstall -t yuzuemu/build-environments:linux-liftinstall /bin/bash /liftinstall/.travis/build.sh
-sudo chown -R $(id -u):$(id -g) ./
+docker run -u root -v $(pwd):/liftinstall -t yuzuemu/build-environments:linux-liftinstall /bin/bash /liftinstall/.travis/build.sh
diff --git a/src/native/mod.rs b/src/native/mod.rs
index 6ca049c..46e61b9 100644
--- a/src/native/mod.rs
+++ b/src/native/mod.rs
@@ -312,7 +312,7 @@ mod natives {
name: &str,
description: &str,
target: &str,
- args: &[&str],
+ args: &str,
working_dir: &str,
exe_path: &str,
) -> Result {
diff --git a/src/tasks/install_desktop_shortcut.rs b/src/tasks/install_desktop_shortcut.rs
index 246a41a..74399b5 100644
--- a/src/tasks/install_desktop_shortcut.rs
+++ b/src/tasks/install_desktop_shortcut.rs
@@ -100,7 +100,7 @@ impl Task for InstallDesktopShortcutTask {
&shortcut.name,
&shortcut.description,
tool_path,
- &["--launcher", exe_path],
+ &format!("--launcher \"{}\"", exe_path),
&starting_dir,
exe_path,
)?);
From 8c795396ebb187cca19065bab9f8aa2ee17e3b0a Mon Sep 17 00:00:00 2001
From: lat9nq
Date: Thu, 28 Jul 2022 16:47:42 -0400
Subject: [PATCH 11/11] installer: Use an inline expression for is_windows
Co-authored-by: liushuyu
---
src/installer.rs | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/installer.rs b/src/installer.rs
index 2861d3a..c2be519 100644
--- a/src/installer.rs
+++ b/src/installer.rs
@@ -454,10 +454,7 @@ impl InstallerFramework {
is_launcher: false,
burn_after_exit: false,
launcher_path: None,
- #[cfg(windows)]
- is_windows: true,
- #[cfg(not(windows))]
- is_windows: false,
+ is_windows: cfg!(windows),
}
}
@@ -485,10 +482,7 @@ impl InstallerFramework {
is_launcher: false,
burn_after_exit: false,
launcher_path: None,
- #[cfg(windows)]
- is_windows: true,
- #[cfg(not(windows))]
- is_windows: false,
+ is_windows: cfg!(windows),
})
}
}