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..0ff8eff --- /dev/null +++ b/.travis/exec.sh @@ -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 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/src/installer.rs b/src/installer.rs index 4738b4e..c2be519 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,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), }) } } diff --git a/src/native/mod.rs b/src/native/mod.rs index 967b7a9..46e61b9 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(); @@ -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 { diff --git a/src/tasks/install_desktop_shortcut.rs b/src/tasks/install_desktop_shortcut.rs index 58cb797..74399b5 100644 --- a/src/tasks/install_desktop_shortcut.rs +++ b/src/tasks/install_desktop_shortcut.rs @@ -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 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.

Where yuzu is installed
@@ -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.


- Where yuzu is installed + Where yuzu is installed

{{ $root.$data.attrs.name }} has been uninstalled.

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 +