mirror of
https://github.com/mmvanheusden/SteamDepotDownloaderGUI.git
synced 2026-02-04 13:41:18 +01:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2d47a9e52 | ||
|
|
9bee63241e | ||
|
|
91ff8060ca | ||
|
|
a96771685c | ||
|
|
e61c0ebf34 | ||
|
|
56843f07d2 | ||
|
|
e681aceb29 | ||
|
|
7891ed19e1 | ||
|
|
95c2d8efc4 | ||
|
|
3155054531 | ||
|
|
04e8498edb | ||
|
|
69ca8dbf97 | ||
|
|
b479f50005 | ||
|
|
2cb21bea17 | ||
|
|
63c421ae10 | ||
|
|
9fadf3a627 | ||
|
|
ba7c17513a | ||
|
|
8d227944cf | ||
|
|
a13d689b8c | ||
|
|
5f0b9781c6 |
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -63,14 +63,9 @@ jobs:
|
||||
args: ${{ matrix.args }}
|
||||
includeUpdaterJson: false
|
||||
|
||||
- name: fix JSON (Windows)
|
||||
if: matrix.platform == 'windows-latest'
|
||||
id: truncate_paths_win
|
||||
run: echo "paths=$(echo '${{ steps.build.outputs.artifactPaths }}' | jq -r '.[0]')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: fix JSON (Linux, MacOS)
|
||||
- name: fix JSON
|
||||
if: matrix.platform != 'windows-latest'
|
||||
id: truncate_paths_x
|
||||
id: truncate_paths
|
||||
run: echo "paths=$(echo '${{ steps.build.outputs.artifactPaths }}' | sed 's/^..//' | sed 's/..$//')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: upload macos artifacts (M1)
|
||||
@@ -78,25 +73,27 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-m1-artifacts
|
||||
path: ${{ steps.truncate_paths_x.outputs.paths }}
|
||||
path: ${{ steps.truncate_paths.outputs.paths }}
|
||||
|
||||
- name: upload macos artifacts (Intel)
|
||||
if: matrix.platform == 'macos-latest' && matrix.arch == 'x86_64'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-intel-artifacts
|
||||
path: ${{ steps.truncate_paths_x.outputs.paths }}
|
||||
path: ${{ steps.truncate_paths.outputs.paths }}
|
||||
|
||||
- name: upload linux artifacts
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-artifacts
|
||||
path: ${{ steps.truncate_paths_x.outputs.paths }}
|
||||
path: ${{ steps.truncate_paths.outputs.paths }}
|
||||
|
||||
- name: upload windows artifacts
|
||||
if: matrix.platform == 'windows-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-artifacts
|
||||
path: ${{ steps.truncate_paths_win.outputs.paths }}
|
||||
path: "./src-tauri/target/release/bundle/*" # fck windows
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<h4>A graphical wrapper for DepotDownloader, designed to make downloading older versions of Steam games easy.</h4>
|
||||
|
||||
→ <a href="https://www.youtube.com/watch?v=H2COwT5OUOo" target="_blank"><b>Tutorial</b></a> ~
|
||||
<a href="https://depotdownloader.00pium.net/" target="_blank"><b>Website</b></a> ~
|
||||
<a href="https://depotdownloader.aphex.cc/" target="_blank"><b>Website</b></a> ~
|
||||
<a href="https://www.youtube.com/watch?v=ogiDAuH3VdY" target="_blank"><b>Example usage</b></a> ←
|
||||
</h4>
|
||||
|
||||
@@ -92,7 +92,7 @@ $ pnpm eslint --fix src/
|
||||
<a href="https://www.gnu.org/licenses/gpl-3.0" target="_blank">
|
||||
<img src="https://github.com/mmvanheusden/SteamDepotDownloaderGUI/assets/50550545/b5649b7f-ea49-45c4-b0cd-5f3788dcd6ca" height="40px">
|
||||
</a>
|
||||
<a href="https://00pium.net" target="_blank">
|
||||
<a href="https://aphex.cc" target="_blank">
|
||||
<img src="https://github.com/mmvanheusden/SteamDepotDownloaderGUI/assets/50550545/83f5f3b2-2bf9-41aa-ab87-880466f785fe" height="40px">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
20
package.json
20
package.json
@@ -11,21 +11,21 @@
|
||||
"tauri": "tauri"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.1.1",
|
||||
"@tauri-apps/api": "2.2.0",
|
||||
"@tauri-apps/plugin-dialog": "2.2.0",
|
||||
"@tauri-apps/plugin-fs": "~2",
|
||||
"@tauri-apps/plugin-shell": "2.2.0",
|
||||
"jquery": "^3.7.1"
|
||||
"jquery": "^3.7.1",
|
||||
"tauri-plugin-shellx-api": "^2.0.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.16.0",
|
||||
"@tauri-apps/cli": "2.1.0",
|
||||
"@eslint/js": "^9.20.0",
|
||||
"@tauri-apps/cli": "2.2.7",
|
||||
"@types/eslint__js": "^8.42.3",
|
||||
"@types/jquery": "^3.5.32",
|
||||
"eslint": "^9.16.0",
|
||||
"typescript": "^5.7.2",
|
||||
"typescript-eslint": "^8.18.0",
|
||||
"vite": "^6.0.3"
|
||||
"eslint": "^9.20.1",
|
||||
"typescript": "^5.7.3",
|
||||
"typescript-eslint": "^8.24.1",
|
||||
"vite": "^6.1.1"
|
||||
},
|
||||
"packageManager": "pnpm@9.15.0"
|
||||
"packageManager": "pnpm@10.4.1"
|
||||
}
|
||||
|
||||
813
pnpm-lock.yaml
generated
813
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
849
src-tauri/Cargo.lock
generated
849
src-tauri/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -9,19 +9,35 @@ license = "GPL-3.0-only"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.0.3", features = [] }
|
||||
tauri-build = { version = "2.0.5", features = [] }
|
||||
|
||||
[dependencies]
|
||||
fix-path-env = { git = "https://github.com/tauri-apps/fix-path-env-rs" }
|
||||
tauri = { version = "2.1.1", features = [] }
|
||||
tauri-plugin-shell = "2.2.0"
|
||||
tauri = { version = "2.2.5", features = [] }
|
||||
tauri-plugin-dialog = "2.2.0"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
serde = { version = "1.0.218", features = ["derive"] }
|
||||
serde_json = "1.0.139"
|
||||
derive-getters = "0.5.0"
|
||||
reqwest = { version = "0.12.9",features = ["blocking"] }
|
||||
zip = "2.2.1"
|
||||
tauri-plugin-fs = "2"
|
||||
reqwest = { version = "0.12.12",features = ["blocking"] }
|
||||
zip = "2.2.2"
|
||||
tauri-plugin-shellx = "2.0.12"
|
||||
|
||||
|
||||
|
||||
# Bacon - https://dystroy.org/bacon/
|
||||
# Mold - https://github.com/rui314/mold#how-to-use
|
||||
# https://discord.com/channels/616186924390023171/731495028677148753/1254902668376150149
|
||||
[profile.dev]
|
||||
incremental = true
|
||||
opt-level = 1
|
||||
debug = 0
|
||||
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 2
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1 # Allows LLVM to perform better optimization.
|
||||
lto = true # Enables link-time-optimizations.
|
||||
opt-level = 3 # Prioritizes small binary size. Use `3` if you prefer speed.
|
||||
panic = "abort" # Higher performance by disabling panic handlers.
|
||||
strip = true # Ensures debug symbols are removed.
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
],
|
||||
"permissions": [
|
||||
"core:default",
|
||||
"shell:allow-open",
|
||||
"dialog:default",
|
||||
"shell:allow-execute",
|
||||
"shell:allow-spawn",
|
||||
"fs:default"
|
||||
"shellx:allow-open",
|
||||
"shellx:allow-execute",
|
||||
"shellx:allow-spawn"
|
||||
]
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
use crate::get_os;
|
||||
use reqwest;
|
||||
use std::fs::File;
|
||||
use std::io::ErrorKind::AlreadyExists;
|
||||
use std::path::PathBuf;
|
||||
use std::{fs, io};
|
||||
use std::{io::Write, path::Path};
|
||||
|
||||
use crate::get_os;
|
||||
use reqwest;
|
||||
|
||||
pub static DEPOTDOWNLOADER_VERSION: &str = "2.7.4";
|
||||
|
||||
pub static DEPOTDOWNLOADER_VERSION: &str = "3.0.0";
|
||||
|
||||
|
||||
/**
|
||||
@@ -30,6 +29,7 @@ pub async fn download_file(url: &str, filename: &Path) -> io::Result<()> {
|
||||
println!("DEBUG: Not downloading. File already exists.");
|
||||
return Err(io::Error::from(AlreadyExists));
|
||||
}
|
||||
|
||||
// Create any missing directories.
|
||||
if let Some(p) = filename.parent() {
|
||||
if !p.exists() {
|
||||
@@ -49,15 +49,14 @@ pub async fn download_file(url: &str, filename: &Path) -> io::Result<()> {
|
||||
}
|
||||
|
||||
/// Unzips DepotDownloader zips
|
||||
pub fn unzip(zip_file: &Path) -> io::Result<()> {
|
||||
pub fn unzip(zip_file: &Path, working_dir: &PathBuf) -> io::Result<()> {
|
||||
let file = File::open(zip_file)?;
|
||||
let mut archive = zip::ZipArchive::new(file)?;
|
||||
|
||||
for i in 0..archive.len() {
|
||||
let mut file = archive.by_index(i)?;
|
||||
|
||||
let outpath = match file.enclosed_name() {
|
||||
Some(path) => path,
|
||||
Some(path) => working_dir.join(path),
|
||||
None => continue,
|
||||
};
|
||||
|
||||
@@ -81,9 +80,9 @@ pub fn unzip(zip_file: &Path) -> io::Result<()> {
|
||||
fs::set_permissions(&outpath, fs::Permissions::from_mode(mode))?;
|
||||
}
|
||||
|
||||
// Set DepotDownloader executable.
|
||||
if outpath.display().to_string() == "DepotDownloader" {
|
||||
fs::set_permissions(&outpath, fs::Permissions::from_mode(0o755))?; // WTF is an octal?
|
||||
// Set executable permission.
|
||||
if outpath.file_name().unwrap() == "DepotDownloader" {
|
||||
fs::set_permissions(&outpath, fs::Permissions::from_mode(0o755))?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,57 +1,51 @@
|
||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
use std::env;
|
||||
use std::io;
|
||||
use std::path::Path;
|
||||
use std::sync::OnceLock;
|
||||
use std::time::Duration;
|
||||
|
||||
use crate::depotdownloader::{get_depotdownloader_url, DEPOTDOWNLOADER_VERSION};
|
||||
use crate::terminal::Terminal;
|
||||
use tauri::path::BaseDirectory;
|
||||
use tauri::App;
|
||||
use tauri::{AppHandle, Emitter, Manager};
|
||||
use tauri_plugin_fs::FsExt;
|
||||
use tauri_plugin_fs::FilePath;
|
||||
use tauri_plugin_shell::ShellExt;
|
||||
|
||||
mod depotdownloader;
|
||||
mod steam;
|
||||
mod terminal;
|
||||
|
||||
use crate::depotdownloader::{get_depotdownloader_url, DEPOTDOWNLOADER_VERSION};
|
||||
use crate::terminal::Terminal;
|
||||
use std::env;
|
||||
use std::io::ErrorKind::AlreadyExists;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::OnceLock;
|
||||
use std::time::Duration;
|
||||
use tauri::{AppHandle, Emitter, Manager};
|
||||
use tauri_plugin_shellx::ShellExt;
|
||||
|
||||
|
||||
/// The first terminal found. Used as default terminal.
|
||||
static TERMINAL: OnceLock<Vec<Terminal>> = OnceLock::new(); // We create this variable now, and quickly populate it in preload_vectum(). we then later access the data in start_download()
|
||||
static WORKING_DIR: OnceLock<PathBuf> = OnceLock::new();
|
||||
|
||||
/// This function is called every time the app is reloaded/started. It quickly populates the [`TERMINAL`] variable with a working terminal.
|
||||
#[tauri::command]
|
||||
async fn preload_vectum(app: AppHandle) {
|
||||
// Only fill these variables once.
|
||||
if TERMINAL.get().is_none() {
|
||||
TERMINAL
|
||||
.set(terminal::get_installed_terminals(true, app.shell()).await)
|
||||
.expect("Failed to set available terminals")
|
||||
TERMINAL.set(terminal::get_installed_terminals(true, app.shell()).await).expect("Failed to set available terminals")
|
||||
}
|
||||
|
||||
if WORKING_DIR.get().is_none() {
|
||||
WORKING_DIR.set(Path::join(&app.path().local_data_dir().unwrap(), "SteamDepotDownloaderGUI")).expect("Failed to configure working directory")
|
||||
}
|
||||
|
||||
// Send the default terminal name to the frontend.
|
||||
app.emit(
|
||||
"default-terminal",
|
||||
Terminal::pretty_name(&TERMINAL.get().unwrap()[0]),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
// set working directory
|
||||
std::env::set_current_dir(app.path().app_cache_dir().unwrap()).unwrap();
|
||||
).unwrap();
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn start_download(steam_download: steam::SteamDownload, app: AppHandle) {
|
||||
let default_terminal = TERMINAL.get().unwrap();
|
||||
let working_dir = app.path().app_cache_dir().unwrap();
|
||||
let shell = app.shell();
|
||||
|
||||
|
||||
let terminal_to_use = if steam_download.options().terminal().is_none() { default_terminal.first().unwrap() } else { &Terminal::from_index(&steam_download.options().terminal().unwrap()).unwrap() };
|
||||
// Also change working directory
|
||||
std::env::set_current_dir(&WORKING_DIR.get().unwrap()).unwrap();
|
||||
|
||||
println!("\n-------------------------DEBUG INFO------------------------");
|
||||
println!("received these values from frontend:");
|
||||
@@ -62,45 +56,35 @@ async fn start_download(steam_download: steam::SteamDownload, app: AppHandle) {
|
||||
println!("\t- Manifest ID: {}", steam_download.manifest_id());
|
||||
println!("\t- Output Path: {}", steam_download.output_path());
|
||||
println!("\t- Default terminal: {}", Terminal::pretty_name(&default_terminal[0]));
|
||||
println!("\t- Terminal command: {:?}", terminal_to_use.create_command(&steam_download, shell, working_dir.clone()));
|
||||
println!("\t- Working directory: {}", working_dir.clone() .display());
|
||||
// println!("\t- Working directory2: {}", std::env::current_exe().unwrap().display());
|
||||
// println!("\t- Working directory2: {}", app.path().app_cache_dir().unwrap().display());
|
||||
|
||||
|
||||
println!("\t- Working directory: {}", &WORKING_DIR.get().unwrap().display());
|
||||
println!("\t- Terminal command: \n\t {:?}", terminal_to_use.create_command(&steam_download, shell, &WORKING_DIR.get().unwrap()));
|
||||
println!("----------------------------------------------------------\n");
|
||||
|
||||
|
||||
terminal_to_use.create_command(&steam_download, shell, working_dir).spawn().ok();
|
||||
terminal_to_use.create_command(&steam_download, shell, &WORKING_DIR.get().unwrap()).spawn().ok();
|
||||
}
|
||||
|
||||
/// Downloads the DepotDownloader zip file from the internet based on the OS.
|
||||
#[tauri::command]
|
||||
async fn download_depotdownloader(app: AppHandle) {
|
||||
async fn download_depotdownloader() {
|
||||
let url = get_depotdownloader_url();
|
||||
|
||||
// Where we store the DepotDownloader zip.
|
||||
let zip_filename = format!("DepotDownloader-v{}-{}.zip", DEPOTDOWNLOADER_VERSION, env::consts::OS);
|
||||
let depotdownloader_zip = Path::join(app.path().app_cache_dir().unwrap().as_path(), Path::new(&zip_filename));
|
||||
let depotdownloader_zip = Path::join(&WORKING_DIR.get().unwrap(), Path::new(&zip_filename));
|
||||
|
||||
println!("Downloading DepotDownloader for {} to {}", env::consts::OS, depotdownloader_zip.display());
|
||||
|
||||
match depotdownloader::download_file(url.as_str(), depotdownloader_zip.as_path()).await {
|
||||
Err(e) => {
|
||||
if e.kind() == io::ErrorKind::AlreadyExists {
|
||||
println!("DepotDownloader already exists. Skipping download.");
|
||||
return;
|
||||
}
|
||||
|
||||
if let Err(e) = depotdownloader::download_file(url.as_str(), depotdownloader_zip.as_path()).await {
|
||||
if e.kind() == AlreadyExists {
|
||||
println!("DepotDownloader already exists. Skipping download.");
|
||||
} else {
|
||||
println!("Failed to download DepotDownloader: {}", e);
|
||||
return;
|
||||
}
|
||||
_ => {}
|
||||
return;
|
||||
} else {
|
||||
println!("Downloaded DepotDownloader for {} to {}", env::consts::OS, depotdownloader_zip.display());
|
||||
}
|
||||
|
||||
println!("Succesfully downloaded DepotDownloader from {}", url);
|
||||
|
||||
depotdownloader::unzip(depotdownloader_zip.as_path()).unwrap();
|
||||
depotdownloader::unzip(depotdownloader_zip.as_path(), &WORKING_DIR.get().unwrap()).unwrap();
|
||||
println!("Succesfully extracted DepotDownloader zip.");
|
||||
}
|
||||
|
||||
@@ -149,17 +133,12 @@ fn main() {
|
||||
}
|
||||
|
||||
println!();
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
|
||||
tauri::Builder::default().plugin(tauri_plugin_dialog::init()).plugin(tauri_plugin_shellx::init(true)).invoke_handler(tauri::generate_handler![
|
||||
start_download,
|
||||
download_depotdownloader,
|
||||
internet_connection,
|
||||
preload_vectum,
|
||||
get_all_terminals
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
]).run(tauri::generate_context!()).expect("error while running tauri application");
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::path::PathBuf;
|
||||
use derive_getters::Getters;
|
||||
use serde::Deserialize;
|
||||
use std::path::PathBuf;
|
||||
|
||||
|
||||
/// Represents the data required to download a Steam depot.
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
use serde::Serialize;
|
||||
use tauri_plugin_shell::process::Command;
|
||||
use std::{env, fs};
|
||||
use std::path::{Path, PathBuf};
|
||||
use tauri::Wry;
|
||||
use tauri_plugin_shell::Shell;
|
||||
use crate::get_os;
|
||||
use crate::steam::SteamDownload;
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
use tauri::Wry;
|
||||
use tauri_plugin_shellx::process::Command;
|
||||
use tauri_plugin_shellx::Shell;
|
||||
|
||||
/// Represents a terminal that can be used to run commands.
|
||||
/// **Should be in sync with the terminal dropdown in the frontend.**
|
||||
#[derive(Debug, Serialize, PartialEq)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum Terminal {
|
||||
GNOMETerminal,
|
||||
Alacritty,
|
||||
@@ -126,7 +125,7 @@ impl Terminal {
|
||||
| Terminal (macOS) | We create a bash script and run that using `open`. |
|
||||
|
||||
*/
|
||||
pub fn create_command(&self, steam_download: &SteamDownload, shell: &Shell<Wry>, working_dir: PathBuf) -> Command {
|
||||
pub fn create_command(&self, steam_download: &SteamDownload, shell: &Shell<Wry>, working_dir: &PathBuf) -> Command {
|
||||
let command = create_depotdownloader_command(steam_download);
|
||||
|
||||
match self {
|
||||
@@ -207,15 +206,13 @@ impl Terminal {
|
||||
}
|
||||
Terminal::Terminal => {
|
||||
// Create a bash script and run that. Not very secure but it makes this easier.
|
||||
let download_script = format!("#!/bin/bash\ncd {}\n{}",working_dir.as_path().display(), command[0]);
|
||||
// println!("{}", download_script);
|
||||
let download_script = format!("#!/bin/bash\ncd {}\n{}",working_dir.to_str().unwrap().replace(" ", "\\ "), command[0]);
|
||||
|
||||
fs::write("./script.sh", download_script).unwrap();
|
||||
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
|
||||
fs::set_permissions("./script.sh", fs::Permissions::from_mode(0o755)).unwrap(); // Won't run without executable permission
|
||||
}
|
||||
|
||||
@@ -309,4 +306,4 @@ fn create_depotdownloader_command(steam_download: &SteamDownload) -> Vec<String>
|
||||
vec![format!(r#".\DepotDownloader.exe -username {} -password {} -app {} -depot {} -manifest {} -dir {}"#, steam_download.username().clone().unwrap(), steam_download.password().clone().unwrap(), steam_download.app_id(), steam_download.depot_id(), steam_download.manifest_id(), output_dir)]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="form-group-header">
|
||||
<label for="username">Username</label>
|
||||
</div>
|
||||
<input class="form-control input-block" id="username" placeholder="Leave empty for anonymous download"
|
||||
<input spellcheck="false" class="form-control input-block" id="username" placeholder="Leave empty for anonymous download"
|
||||
type="text"/>
|
||||
</div>
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
<div class="settings-surrounding" id="settings-surrounding">
|
||||
<div class="settings-content mx-auto" id="settings-content">
|
||||
<label class="version-info" id="version-info">UNKNOWN</label>
|
||||
<button class="opium-button" id="opium-btn">00pium</button>
|
||||
<button class="opium-button" id="opium-btn">aphex</button>
|
||||
<h2><b>Settings</b></h2>
|
||||
<hr>
|
||||
<h4><b>Appearance</b></h4>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import $ from "jquery";
|
||||
import {invoke} from "@tauri-apps/api/core";
|
||||
import {open as openDialog} from "@tauri-apps/plugin-dialog";
|
||||
import {open as openShell} from "@tauri-apps/plugin-shell";
|
||||
import {open as openShell} from "tauri-plugin-shellx-api";
|
||||
import {listen} from "@tauri-apps/api/event";
|
||||
|
||||
function setLoader(state: boolean) {
|
||||
@@ -176,7 +176,7 @@ $(async () => {
|
||||
});
|
||||
|
||||
$("#opium-btn").on("click", () => {
|
||||
openShell("https://00pium.net");
|
||||
openShell("https://aphex.cc");
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import {message} from "@tauri-apps/plugin-dialog";
|
||||
import {invoke} from "@tauri-apps/api/core";
|
||||
import {open} from "@tauri-apps/plugin-shell";
|
||||
import {fixPathEnv, open} from "tauri-plugin-shellx-api";
|
||||
import $ from "jquery";
|
||||
|
||||
|
||||
$(async () => {
|
||||
/* Fix stupid PATH shit */
|
||||
fixPathEnv();
|
||||
|
||||
/* eslint-disable indent */
|
||||
switch (await invoke("internet_connection")) {
|
||||
case false: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {getVersion} from "@tauri-apps/api/app";
|
||||
import {open} from "@tauri-apps/plugin-shell";
|
||||
import {open} from "tauri-plugin-shellx-api";
|
||||
import $ from "jquery";
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user