This commit is contained in:
Tw93
2022-12-07 22:48:41 +08:00
3 changed files with 1970 additions and 1961 deletions

3918
dist/cli.js vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "pake-cli",
"version": "0.1.0",
"version": "0.1.1",
"description": "🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App 🤱🏻 A simple way to make any web page a desktop application using Rust.",
"bin": {
"pake": "./cli.js"

View File

@@ -195,8 +195,17 @@ fn main() -> wry::Result<()> {
.build()?;
// 自定义cookie文件夹仅用于Linux
// Custom Cookie folder, only for Linux
// #[cfg(target_os = "linux")]
// let config_path = format!("/home/{}/.config/{}", env!("USER"), package_name);
#[cfg(target_os = "linux")]
let config_path = format!("/home/{}/.config/{}", env!("USER"), package_name);
let user = std::env::var_os("USER");
#[cfg(target_os = "linux")]
let config_path = match user {
Some(v) => format!(
"/home/{}/.config/{}", v.into_string().unwrap(), package_name
),
None => panic!("can't found any user")
};
#[cfg(target_os = "linux")]
let data_path = std::path::PathBuf::from(&config_path);
#[cfg(target_os = "linux")]