arm64 support

This commit is contained in:
Natsumi
2025-09-02 22:30:46 +12:00
parent d4bf9ef0f6
commit f1c8c0fa65
9 changed files with 174 additions and 146 deletions

View File

@@ -14,6 +14,7 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
const { t } = useI18n();
const state = reactive({
arch: 'x64',
appVersion: '',
autoUpdateVRCX: 'Auto Download',
latestAppVersion: '',
@@ -40,6 +41,12 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
});
async function initVRCXUpdaterSettings() {
if (!WINDOWS) {
const arch = await window.electron.getArch();
console.log('Architecture:', arch);
state.arch = arch;
}
const [autoUpdateVRCX, vrcxId] = await Promise.all([
configRepository.getString('VRCX_autoUpdateVRCX', 'Auto Download'),
configRepository.getString('VRCX_id', '')
@@ -200,7 +207,7 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
}
if (
LINUX &&
asset.name.endsWith('.AppImage') &&
asset.name.endsWith(`${state.arch}.AppImage`) &&
asset.content_type === 'application/octet-stream'
) {
downloadUrl = asset.browser_download_url;

View File

@@ -30,6 +30,7 @@ declare global {
) => Promise<any>;
};
electron: {
getArch: () => Promise<string>;
openFileDialog: () => Promise<string>;
openDirectoryDialog: () => Promise<string>;
desktopNotification: (
@@ -63,7 +64,7 @@ declare global {
overlayHand: int
) => Promise<void>;
ipcRenderer: {
on(channel: String, func: (...args: unknown[]) => void)
on(channel: String, func: (...args: unknown[]) => void);
};
};
__APP_GLOBALS__: AppGlobals;