fix: improve app relaunch after update and release 0.1.28
This commit is contained in:
@@ -112,7 +112,7 @@ const DOWNLOAD_SIGNED_URL_EXPIRES_SECONDS = Math.max(
|
||||
10,
|
||||
Math.min(3600, Number(process.env.DOWNLOAD_SIGNED_URL_EXPIRES_SECONDS || 30))
|
||||
);
|
||||
const DEFAULT_DESKTOP_VERSION = process.env.DESKTOP_LATEST_VERSION || '0.1.27';
|
||||
const DEFAULT_DESKTOP_VERSION = process.env.DESKTOP_LATEST_VERSION || '0.1.28';
|
||||
const DEFAULT_DESKTOP_INSTALLER_URL = process.env.DESKTOP_INSTALLER_URL || '';
|
||||
const DEFAULT_DESKTOP_INSTALLER_SHA256 = String(process.env.DESKTOP_INSTALLER_SHA256 || '').trim().toLowerCase();
|
||||
const DEFAULT_DESKTOP_INSTALLER_SIZE = Math.max(0, Number(process.env.DESKTOP_INSTALLER_SIZE || 0));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "desktop-client",
|
||||
"private": true,
|
||||
"version": "0.1.27",
|
||||
"version": "0.1.28",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
2
desktop-client/src-tauri/Cargo.lock
generated
2
desktop-client/src-tauri/Cargo.lock
generated
@@ -693,7 +693,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "desktop-client"
|
||||
version = "0.1.27"
|
||||
version = "0.1.28"
|
||||
dependencies = [
|
||||
"reqwest 0.12.28",
|
||||
"rusqlite",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "desktop-client"
|
||||
version = "0.1.27"
|
||||
version = "0.1.28"
|
||||
description = "A Tauri App"
|
||||
authors = ["you"]
|
||||
edition = "2021"
|
||||
|
||||
@@ -1479,9 +1479,25 @@ timeout /t 1 /nobreak >nul\r\n\
|
||||
start \"\" /wait \"%INSTALLER%\" /S\r\n\
|
||||
set \"INSTALL_EXIT=%ERRORLEVEL%\"\r\n\
|
||||
echo [%%date%% %%time%%] installer exit code: %INSTALL_EXIT% >> \"%LOG_FILE%\"\r\n\
|
||||
if not \"%INSTALL_EXIT%\"==\"0\" exit /b %INSTALL_EXIT%\r\n\
|
||||
set \"RETRY_COUNT=0\"\r\n\
|
||||
:wait_for_app\r\n\
|
||||
if exist \"%APP_EXE%\" goto launch_app\r\n\
|
||||
if exist \"%LOCALAPPDATA%\\玩玩云\\desktop-client.exe\" (\r\n\
|
||||
set \"APP_EXE=%LOCALAPPDATA%\\玩玩云\\desktop-client.exe\"\r\n\
|
||||
goto launch_app\r\n\
|
||||
)\r\n\
|
||||
if %RETRY_COUNT% GEQ 25 goto app_missing\r\n\
|
||||
set /a RETRY_COUNT+=1\r\n\
|
||||
timeout /t 1 /nobreak >nul\r\n\
|
||||
if exist \"%APP_EXE%\" start \"\" \"%APP_EXE%\"\r\n\
|
||||
goto wait_for_app\r\n\
|
||||
:launch_app\r\n\
|
||||
start \"\" \"%APP_EXE%\"\r\n\
|
||||
set \"START_EXIT=%ERRORLEVEL%\"\r\n\
|
||||
echo [%%date%% %%time%%] launch app exit code: %START_EXIT% path=%APP_EXE% >> \"%LOG_FILE%\"\r\n\
|
||||
goto cleanup\r\n\
|
||||
:app_missing\r\n\
|
||||
echo [%%date%% %%time%%] app exe not found after install >> \"%LOG_FILE%\"\r\n\
|
||||
:cleanup\r\n\
|
||||
del \"%~f0\" >nul 2>nul\r\n",
|
||||
installer = installer_text,
|
||||
app_exe = app_text,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "玩玩云",
|
||||
"version": "0.1.27",
|
||||
"version": "0.1.28",
|
||||
"identifier": "cn.workyai.wanwancloud.desktop",
|
||||
"build": {
|
||||
"beforeDevCommand": "npm run dev",
|
||||
|
||||
@@ -153,7 +153,7 @@ const syncState = reactive({
|
||||
nextRunAt: "",
|
||||
});
|
||||
const updateState = reactive({
|
||||
currentVersion: "0.1.27",
|
||||
currentVersion: "0.1.28",
|
||||
latestVersion: "",
|
||||
available: false,
|
||||
mandatory: false,
|
||||
|
||||
Reference in New Issue
Block a user