mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-11-22 12:45:38 +01:00
Merge branches 'icon-swap' and 'right-click' into merged
This commit is contained in:
commit
9b58c273d1
@ -43,7 +43,8 @@ extern "C" int saveShortcut(
|
|||||||
const wchar_t *description,
|
const wchar_t *description,
|
||||||
const wchar_t *path,
|
const wchar_t *path,
|
||||||
const wchar_t *args,
|
const wchar_t *args,
|
||||||
const wchar_t *workingDir)
|
const wchar_t *workingDir,
|
||||||
|
const wchar_t *exePath)
|
||||||
{
|
{
|
||||||
const char *errStr = NULL;
|
const char *errStr = NULL;
|
||||||
HRESULT h;
|
HRESULT h;
|
||||||
@ -82,6 +83,9 @@ extern "C" int saveShortcut(
|
|||||||
shellLink->SetDescription(description);
|
shellLink->SetDescription(description);
|
||||||
if (path != NULL)
|
if (path != NULL)
|
||||||
shellLink->SetPath(path);
|
shellLink->SetPath(path);
|
||||||
|
// default to using the first icon in the exe (usually correct)
|
||||||
|
if (exePath != NULL)
|
||||||
|
shellLink->SetIconLocation(exePath, 0);
|
||||||
if (args != NULL)
|
if (args != NULL)
|
||||||
shellLink->SetArguments(args);
|
shellLink->SetArguments(args);
|
||||||
if (workingDir != NULL)
|
if (workingDir != NULL)
|
||||||
|
@ -39,6 +39,7 @@ mod natives {
|
|||||||
path: *const winapi::ctypes::wchar_t,
|
path: *const winapi::ctypes::wchar_t,
|
||||||
args: *const winapi::ctypes::wchar_t,
|
args: *const winapi::ctypes::wchar_t,
|
||||||
workingDir: *const winapi::ctypes::wchar_t,
|
workingDir: *const winapi::ctypes::wchar_t,
|
||||||
|
exePath: *const winapi::ctypes::wchar_t,
|
||||||
) -> ::std::os::raw::c_int;
|
) -> ::std::os::raw::c_int;
|
||||||
|
|
||||||
pub fn isDarkThemeActive() -> ::std::os::raw::c_uint;
|
pub fn isDarkThemeActive() -> ::std::os::raw::c_uint;
|
||||||
@ -59,6 +60,7 @@ mod natives {
|
|||||||
target: &str,
|
target: &str,
|
||||||
args: &str,
|
args: &str,
|
||||||
working_dir: &str,
|
working_dir: &str,
|
||||||
|
exe_path: &str,
|
||||||
) -> Result<String, String> {
|
) -> Result<String, String> {
|
||||||
let source_file = format!(
|
let source_file = format!(
|
||||||
"{}\\Microsoft\\Windows\\Start Menu\\Programs\\{}.lnk",
|
"{}\\Microsoft\\Windows\\Start Menu\\Programs\\{}.lnk",
|
||||||
@ -78,6 +80,8 @@ mod natives {
|
|||||||
U16CString::from_str(args).log_expect("Error while converting to wchar_t");
|
U16CString::from_str(args).log_expect("Error while converting to wchar_t");
|
||||||
let native_working_dir =
|
let native_working_dir =
|
||||||
U16CString::from_str(working_dir).log_expect("Error while converting to wchar_t");
|
U16CString::from_str(working_dir).log_expect("Error while converting to wchar_t");
|
||||||
|
let native_exe_path =
|
||||||
|
U16CString::from_str(exe_path).log_expect("Error while converting to wchar_t");
|
||||||
|
|
||||||
let shortcutResult = unsafe {
|
let shortcutResult = unsafe {
|
||||||
saveShortcut(
|
saveShortcut(
|
||||||
@ -86,6 +90,7 @@ mod natives {
|
|||||||
native_target.as_ptr(),
|
native_target.as_ptr(),
|
||||||
native_args.as_ptr(),
|
native_args.as_ptr(),
|
||||||
native_working_dir.as_ptr(),
|
native_working_dir.as_ptr(),
|
||||||
|
native_exe_path.as_ptr(),
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@ impl Task for InstallGlobalShortcutsTask {
|
|||||||
// TODO: Send by list
|
// TODO: Send by list
|
||||||
"",
|
"",
|
||||||
&starting_dir,
|
&starting_dir,
|
||||||
|
"",
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
if !shortcut_file.is_empty() {
|
if !shortcut_file.is_empty() {
|
||||||
|
@ -83,6 +83,7 @@ impl Task for InstallShortcutsTask {
|
|||||||
// TODO: Send by list
|
// TODO: Send by list
|
||||||
&format!("--launcher \"{}\"", exe_path),
|
&format!("--launcher \"{}\"", exe_path),
|
||||||
&starting_dir,
|
&starting_dir,
|
||||||
|
exe_path,
|
||||||
)?);
|
)?);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ pre {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode */
|
/* Dark mode */
|
||||||
body.has-background-black-ter .subtitle, body.has-background-black-ter .column > div {
|
body.has-background-black-ter .subtitle, body.has-background-black-ter .column > div, body.has-background-black-ter section {
|
||||||
color: hsl(0, 0%, 96%);
|
color: hsl(0, 0%, 96%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="column has-padding">
|
<div class="column has-padding">
|
||||||
|
<section>
|
||||||
<b-message type="is-info" :active.sync="browser_opened">
|
<b-message type="is-info" :active.sync="browser_opened">
|
||||||
Page opened! Check your default browser for the page, and follow the instructions there to link your patreon account.
|
Page opened! Check your default browser for the page, and follow the instructions there to link your patreon account.
|
||||||
When you are done, enter the token below.
|
When you are done, enter the token below.
|
||||||
@ -14,15 +15,24 @@
|
|||||||
<br>
|
<br>
|
||||||
If you are not already a subscriber, <a v-on:click="launch_browser('https://www.patreon.com/join/yuzuteam/checkout?rid=2822069')">click here to become one</a>
|
If you are not already a subscriber, <a v-on:click="launch_browser('https://www.patreon.com/join/yuzuteam/checkout?rid=2822069')">click here to become one</a>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
</section>
|
||||||
|
|
||||||
<div class="control">
|
|
||||||
<label for="token">Token</label>
|
|
||||||
<input class="input" type="text" v-model="combined_token" placeholder="Token" id="token">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<p>Token</p>
|
||||||
|
<b-field>
|
||||||
|
<b-input type="text" v-model="combined_token" placeholder="Token" id="token" style='width: 50em;'></b-input>
|
||||||
|
<p class="control">
|
||||||
|
<button class="button is-info" v-on:click="paste">Paste</button>
|
||||||
|
</p>
|
||||||
|
</b-field>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
<b-message type="is-danger" :active.sync="invalid_token">
|
<b-message type="is-danger" :active.sync="invalid_token">
|
||||||
Login failed!
|
Login failed!
|
||||||
Double check that your token is correct and try again
|
Double check that your token is correct and try again
|
||||||
@ -47,6 +57,7 @@
|
|||||||
Your patreon is linked, and you are supporting the project, but you must first join the Early Access reward tier!
|
Your patreon is linked, and you are supporting the project, but you must first join the Early Access reward tier!
|
||||||
<a v-on:click="launch_browser('https://www.patreon.com/join/yuzuteam/checkout?rid=2822069')">Log into your patreon account</a> and choose to back the Early Access reward tier.
|
<a v-on:click="launch_browser('https://www.patreon.com/join/yuzuteam/checkout?rid=2822069')">Log into your patreon account</a> and choose to back the Early Access reward tier.
|
||||||
</b-message>
|
</b-message>
|
||||||
|
</section>
|
||||||
|
|
||||||
<div class="is-left-floating is-bottom-floating">
|
<div class="is-left-floating is-bottom-floating">
|
||||||
<p class="control">
|
<p class="control">
|
||||||
@ -63,6 +74,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AuthenticationView',
|
name: 'AuthenticationView',
|
||||||
created: function() {
|
created: function() {
|
||||||
@ -120,6 +133,11 @@ export default {
|
|||||||
go_back: function () {
|
go_back: function () {
|
||||||
this.$router.go(-1)
|
this.$router.go(-1)
|
||||||
},
|
},
|
||||||
|
paste: function () {
|
||||||
|
document.getElementById("token").focus();
|
||||||
|
document.execCommand("paste");
|
||||||
|
|
||||||
|
},
|
||||||
launch_browser: function(url) {
|
launch_browser: function(url) {
|
||||||
const that = this;
|
const that = this;
|
||||||
let app = this.$root;
|
let app = this.$root;
|
||||||
|
Loading…
Reference in New Issue
Block a user