Add --no-updater

This commit is contained in:
Natsumi
2025-11-05 16:45:44 +11:00
parent f5b29ea775
commit cca81067a1
6 changed files with 26 additions and 7 deletions
+11 -3
View File
@@ -17,6 +17,7 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
const { t } = useI18n();
const arch = ref('x64');
const noUpdater = ref(false);
const appVersion = ref('');
const autoUpdateVRCX = ref('Auto Download');
@@ -43,9 +44,9 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
async function initVRCXUpdaterSettings() {
if (!WINDOWS) {
const archResult = await window.electron.getArch();
console.log('Architecture:', archResult);
arch.value = archResult;
arch.value = await window.electron.getArch();
noUpdater.value = await window.electron.getNoUpdater();
console.log('Architecture:', arch.value);
}
const [VRCX_autoUpdateVRCX, VRCX_id] = await Promise.all([
@@ -58,6 +59,9 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
} else {
autoUpdateVRCX.value = VRCX_autoUpdateVRCX;
}
if (noUpdater.value) {
autoUpdateVRCX.value = 'Off';
}
appVersion.value = await AppApi.GetVersion();
vrcxId.value = VRCX_id;
@@ -222,6 +226,9 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
const releaseName = json.name;
setLatestAppVersion(releaseName);
VRCXUpdateDialog.value.updatePendingIsLatest = false;
if (autoUpdateVRCX.value === 'Off') {
return;
}
if (releaseName === pendingVRCXInstall.value) {
// update already downloaded
VRCXUpdateDialog.value.updatePendingIsLatest = true;
@@ -404,6 +411,7 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
pendingVRCXInstall,
updateInProgress,
updateProgress,
noUpdater,
setAutoUpdateVRCX,
setBranch,