mirror of
https://github.com/EasyTier/EasytierGame.git
synced 2026-10-19 16:16:35 +00:00
#Update 更新包体
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
pnpm run build
|
||||
@REM rustup default nightly
|
||||
rustup default nightly
|
||||
@REM rem 使用rust nightly构建支持win7的版本,请先将根目录的windows.0.48.5 放入以下目录
|
||||
@REM rem C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\你自己的版本\lib\x64
|
||||
@REM rem C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\你自己的版本\lib\x86
|
||||
@REM rem C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\你自己的版本\atlmfc\lib\x64
|
||||
@REM rem C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\你自己的版本\atlmfc\lib\x86
|
||||
@REM pnpm tauri build -- -Z build-std --target x86_64-win7-windows-msvc
|
||||
pnpm tauri build -- -Z build-std --target x86_64-win7-windows-msvc
|
||||
rustup default stable
|
||||
pnpm tauri build
|
||||
pnpm run release
|
||||
@REM pnpm run release-win7
|
||||
pnpm run release-win7
|
||||
+44
-44
@@ -6,55 +6,55 @@ import { BaseDirectory } from "@tauri-apps/api/path";
|
||||
import { exists } from "@tauri-apps/plugin-fs";
|
||||
|
||||
const getWinIpBroadcastPid = async () => {
|
||||
const mainStore = useMainStore();
|
||||
const pid = await invoke("search_pid_by_pname", { target_process_name: "WinIPBroadcast" });
|
||||
mainStore.winipBcPid = (pid as number) || 0;
|
||||
mainStore.$patch({
|
||||
winipBcStart: !!(mainStore.winipBcPid && mainStore.winipBcPid > 0)
|
||||
});
|
||||
// const mainStore = useMainStore();
|
||||
// const pid = await invoke("search_pid_by_pname", { target_process_name: "WinIPBroadcast" });
|
||||
// mainStore.winipBcPid = (pid as number) || 0;
|
||||
// mainStore.$patch({
|
||||
// winipBcStart: !!(mainStore.winipBcPid && mainStore.winipBcPid > 0)
|
||||
// });
|
||||
};
|
||||
|
||||
export const handleWinipBcStart = async () => {
|
||||
const mainStore = useMainStore();
|
||||
if (!mainStore.winipBcStart) {
|
||||
try {
|
||||
await invoke("stop_command", { child_id: mainStore.winipBcPid || 0 });
|
||||
const isExists = await exists("easytier/tool/WinIPBroadcast.exe", { baseDir: BaseDirectory.Resource });
|
||||
if (!isExists) {
|
||||
ElMessage.error(`WinipBc不存在`);
|
||||
console.error(`WinipBc不存在`);
|
||||
return;
|
||||
}
|
||||
const child = await Command.create("WinIPBroadcast", ["run"]).spawn();
|
||||
mainStore.winipBcPid = child.pid || 0;
|
||||
await getWinIpBroadcastPid();
|
||||
if (mainStore.winipBcPid) {
|
||||
mainStore.$patch({
|
||||
winIpBcAutoStart: true
|
||||
});
|
||||
} else {
|
||||
ElMessage.error(`WinipBc失败`);
|
||||
}
|
||||
} catch (err) {
|
||||
ElMessage.error(`WinipBc失败`);
|
||||
console.error(err);
|
||||
}
|
||||
} else {
|
||||
await invoke("stop_command", { child_id: mainStore.winipBcPid || 0 });
|
||||
await getWinIpBroadcastPid();
|
||||
if (mainStore.winipBcPid <= 0) {
|
||||
mainStore.$patch({
|
||||
winIpBcAutoStart: false
|
||||
});
|
||||
}
|
||||
}
|
||||
// const mainStore = useMainStore();
|
||||
// if (!mainStore.winipBcStart) {
|
||||
// try {
|
||||
// await invoke("stop_command", { child_id: mainStore.winipBcPid || 0 });
|
||||
// const isExists = await exists("easytier/tool/WinIPBroadcast.exe", { baseDir: BaseDirectory.Resource });
|
||||
// if (!isExists) {
|
||||
// ElMessage.error(`WinipBc不存在`);
|
||||
// console.error(`WinipBc不存在`);
|
||||
// return;
|
||||
// }
|
||||
// const child = await Command.create("WinIPBroadcast", ["run"]).spawn();
|
||||
// mainStore.winipBcPid = child.pid || 0;
|
||||
// await getWinIpBroadcastPid();
|
||||
// if (mainStore.winipBcPid) {
|
||||
// mainStore.$patch({
|
||||
// winIpBcAutoStart: true
|
||||
// });
|
||||
// } else {
|
||||
// ElMessage.error(`WinipBc失败`);
|
||||
// }
|
||||
// } catch (err) {
|
||||
// ElMessage.error(`WinipBc失败`);
|
||||
// console.error(err);
|
||||
// }
|
||||
// } else {
|
||||
// await invoke("stop_command", { child_id: mainStore.winipBcPid || 0 });
|
||||
// await getWinIpBroadcastPid();
|
||||
// if (mainStore.winipBcPid <= 0) {
|
||||
// mainStore.$patch({
|
||||
// winIpBcAutoStart: false
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
};
|
||||
|
||||
export const initStartWinIpBroadcast = async () => {
|
||||
const mainStore = useMainStore();
|
||||
await getWinIpBroadcastPid();
|
||||
// const mainStore = useMainStore();
|
||||
// await getWinIpBroadcastPid();
|
||||
// console.error(mainStore.winipBcStart, mainStore.winIpBcAutoStart)
|
||||
if (mainStore.winIpBcAutoStart && !mainStore.winipBcStart) {
|
||||
await handleWinipBcStart();
|
||||
}
|
||||
// if (mainStore.winIpBcAutoStart && !mainStore.winipBcStart) {
|
||||
// await handleWinipBcStart();
|
||||
// }
|
||||
};
|
||||
|
||||
+14
-14
@@ -15,27 +15,27 @@
|
||||
"@element-plus/nuxt": "1.1.3",
|
||||
"@nuxtjs/tailwindcss": "6.13.2",
|
||||
"@pinia/nuxt": "0.11.1",
|
||||
"@tauri-apps/api": "2.5.0",
|
||||
"@tauri-apps/cli": "2.5.0",
|
||||
"@tauri-apps/plugin-cli": "^2.2.0",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.2.2",
|
||||
"@tauri-apps/plugin-dialog": "2.2.2",
|
||||
"@tauri-apps/plugin-fs": "2.3.0",
|
||||
"@tauri-apps/plugin-log": "2.4.0",
|
||||
"@tauri-apps/plugin-shell": "2.2.1",
|
||||
"@tauri-apps/plugin-window-state": "2.2.2",
|
||||
"@tauri-apps/api": "2.6.0",
|
||||
"@tauri-apps/cli": "2.6.2",
|
||||
"@tauri-apps/plugin-cli": "2.4.0",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.3.0",
|
||||
"@tauri-apps/plugin-dialog": "2.3.0",
|
||||
"@tauri-apps/plugin-fs": "2.4.0",
|
||||
"@tauri-apps/plugin-log": "2.6.0",
|
||||
"@tauri-apps/plugin-shell": "2.3.0",
|
||||
"@tauri-apps/plugin-window-state": "2.3.0",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@vitejs/plugin-vue-jsx": "4.1.2",
|
||||
"@vueuse/core": "12.7.0",
|
||||
"archiver": "^7.0.1",
|
||||
"element-plus": "2.10.2",
|
||||
"element-plus": "2.10.3",
|
||||
"less": "4.2.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"nuxt": "3.17.5",
|
||||
"nuxt": "3.17.6",
|
||||
"pinia": "3.0.3",
|
||||
"pinia-plugin-persistedstate": "4.3.0",
|
||||
"pinia-plugin-persistedstate": "4.4.1",
|
||||
"postcss": "^8.4.38",
|
||||
"prettier": "3.5.2",
|
||||
"prettier-plugin-tailwindcss": "0.6.13"
|
||||
"prettier": "3.6.2",
|
||||
"prettier-plugin-tailwindcss": "0.6.14"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+1082
-1503
File diff suppressed because it is too large
Load Diff
Generated
+1185
-1356
File diff suppressed because it is too large
Load Diff
+11
-11
@@ -18,7 +18,7 @@ name = "app_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.2.0", features = [] }
|
||||
tauri-build = { version = "2.3.0", features = [] }
|
||||
# prost-build = "0.13.2"
|
||||
|
||||
[target.x86_64-pc-windows-msvc.build-dependencies]
|
||||
@@ -28,34 +28,34 @@ thunk-rs = { git = "https://github.com/easytier/thunk.git", default-features = f
|
||||
serde_json = "1.0.137"
|
||||
serde = { version = "1.0.217", features = ["derive"] }
|
||||
log = "0.4.26"
|
||||
tauri = { version = "2.5.1", features = [ "protocol-asset",
|
||||
tauri = { version = "2.6.2", features = [ "protocol-asset",
|
||||
"tray-icon",
|
||||
"image-png",
|
||||
"image-ico"
|
||||
] }
|
||||
|
||||
tauri-plugin-log = "2.3.1"
|
||||
tauri-plugin-shell = "2.2.1"
|
||||
tauri-plugin-log = "2.6.0"
|
||||
tauri-plugin-shell = "2.3.0"
|
||||
reqwest = { version = "0.12.12", features = ["json"] }
|
||||
zip = "2.2.3"
|
||||
sysinfo = '0.33.1'
|
||||
# planif = { git = "https://github.com/mattrobineau/planif", tag = "1.0.1" }
|
||||
whoami = "1.5.2"
|
||||
tauri-plugin-fs = "2.3.0"
|
||||
tauri-plugin-clipboard-manager = "2.2.2"
|
||||
tauri-plugin-fs = "2.4.0"
|
||||
tauri-plugin-clipboard-manager = "2.3.0"
|
||||
rand = "0.9.0"
|
||||
tokio = { version = "1.45.1", features = ["process"] }
|
||||
tauri-plugin-dialog = "2.2.2"
|
||||
tauri-plugin-dialog = "2.3.0"
|
||||
# prost = "0.13"
|
||||
# prost-types = "0.13"
|
||||
hashbrown = "0.15.2"
|
||||
# futures-util = "0.3"
|
||||
|
||||
[dependencies.windows]
|
||||
version = "0.58.0"
|
||||
version = "0.61.3"
|
||||
features = ["Win32_System_TaskScheduler", "Win32_System_Com", "Win32_System_Power", "Win32_NetworkManagement_IpHelper", "Win32_NetworkManagement_Ndis", "Win32_Networking_WinSock"]
|
||||
|
||||
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
|
||||
tauri-plugin-cli = "2.2.0"
|
||||
tauri-plugin-single-instance = "2.2.4"
|
||||
tauri-plugin-window-state = "2.2.2"
|
||||
tauri-plugin-cli = "2.4.0"
|
||||
tauri-plugin-single-instance = "2.3.0"
|
||||
tauri-plugin-window-state = "2.3.0"
|
||||
|
||||
@@ -13,7 +13,8 @@ use sysinfo::System;
|
||||
use tauri::tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent};
|
||||
use tauri::Emitter;
|
||||
use tauri::Manager;
|
||||
use windows::core::{Interface, BSTR, VARIANT};
|
||||
use windows::Win32::System::Variant::VARIANT;
|
||||
use windows::core::{Interface, BSTR};
|
||||
use windows::Win32::Foundation::VARIANT_BOOL;
|
||||
use windows::Win32::NetworkManagement::IpHelper::{
|
||||
GetAdaptersAddresses, GAA_FLAG_INCLUDE_PREFIX, IP_ADAPTER_ADDRESSES_LH,
|
||||
|
||||
Reference in New Issue
Block a user