diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 539f837c..1aef9a93 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,7 +80,6 @@ jobs: BUILDS_URL: ${{ secrets.BUILDS_URL }} BUILD_WEBHOOK_URL: ${{ secrets.BUILD_WEBHOOK_URL }} GITHUB_ACTOR: ${{ github.actor }} - run: node scripts/upload-build.cjs - name: Create artifact diff --git a/package.json b/package.json index 3b8093c4..803ca0ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hydralauncher", - "version": "3.3.1", + "version": "3.4.0", "description": "Hydra", "main": "./out/main/index.js", "author": "Los Broxas", diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index ab89a616..d6a1f687 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -353,7 +353,8 @@ "enable_auto_install": "Download updates automatically", "common_redist": "Common redistributables", "common_redist_description": "Common redistributables are required to run some games. Installing them is recommended to avoid issues.", - "install_common_redist": "Install" + "install_common_redist": "Install", + "installing_common_redist": "Installing…" }, "notifications": { "download_complete": "Download complete", diff --git a/src/locales/pt-BR/translation.json b/src/locales/pt-BR/translation.json index 3cb8fa91..5f2b62cc 100644 --- a/src/locales/pt-BR/translation.json +++ b/src/locales/pt-BR/translation.json @@ -340,7 +340,8 @@ "enable_auto_install": "Baixar atualizações automaticamente", "common_redist": "Componentes recomendados", "common_redist_description": "Componentes recomendados são necessários para executar alguns jogos. A instalação deles é recomendada para evitar problemas.", - "install_common_redist": "Instalar" + "install_common_redist": "Instalar", + "installing_common_redist": "Instalando…" }, "notifications": { "download_complete": "Download concluído", diff --git a/src/renderer/src/dexie.ts b/src/renderer/src/dexie.ts index c832eb75..8d12cd49 100644 --- a/src/renderer/src/dexie.ts +++ b/src/renderer/src/dexie.ts @@ -23,7 +23,7 @@ export const db = new Dexie("Hydra"); db.version(9).stores({ repacks: `++id, title, uris, fileSize, uploadDate, downloadSourceId, repacker, objectIds, createdAt, updatedAt`, - downloadSources: `++id, url, name, etag, objectIds, downloadCount, status, fingerprint, createdAt, updatedAt`, + downloadSources: `++id, &url, name, etag, objectIds, downloadCount, status, fingerprint, createdAt, updatedAt`, howLongToBeatEntries: `++id, categories, [shop+objectId], createdAt, updatedAt`, }); diff --git a/src/renderer/src/pages/settings/settings-general.tsx b/src/renderer/src/pages/settings/settings-general.tsx index dc43e8a1..d69745f7 100644 --- a/src/renderer/src/pages/settings/settings-general.tsx +++ b/src/renderer/src/pages/settings/settings-general.tsx @@ -29,6 +29,7 @@ export function SettingsGeneral() { ); const [canInstallCommonRedist, setCanInstallCommonRedist] = useState(false); + const [installingCommonRedist, setInstallingCommonRedist] = useState(false); const [form, setForm] = useState({ downloadsPath: "", @@ -133,6 +134,27 @@ export function SettingsGeneral() { } }; + useEffect(() => { + const unlisten = window.electron.onCommonRedistProgress( + ({ log, complete }) => { + if (log === "Installation timed out" || complete) { + setInstallingCommonRedist(false); + } + } + ); + + return () => unlisten(); + }, []); + + const handleInstallCommonRedist = async () => { + setInstallingCommonRedist(true); + try { + await window.electron.installCommonRedist(); + } finally { + setInstallingCommonRedist(false); + } + }; + return (