diff --git a/electron/launcher.ts b/electron/launcher.ts index 779ec86fd7..403f04b438 100644 --- a/electron/launcher.ts +++ b/electron/launcher.ts @@ -1,11 +1,15 @@ -import { appendFileSync, writeFileSync } from 'graceful-fs' // This handles launching games, prefix creation etc.. import i18next from 'i18next' -import { existsSync, mkdirSync } from 'graceful-fs' +import { + existsSync, + mkdirSync, + appendFileSync, + writeFileSync +} from 'graceful-fs' import { join } from 'path' -import { flatPakHome, isLinux } from './constants' +import { flatPakHome, isLinux, isMac, userHome } from './constants' import { constructAndUpdateRPC, execAsync, @@ -160,6 +164,32 @@ async function prepareWineLaunch(game: LegendaryGame | GOGGame): Promise<{ ) } + // Verify that the CrossOver bottle exists + if (isMac && gameSettings.wineVersion.type === 'crossover') { + const bottleExists = existsSync( + join( + userHome, + 'Library/Application Support/CrossOver/Bottles', + gameSettings.wineCrossoverBottle, + 'cxbottle.conf' + ) + ) + if (!bottleExists) { + showErrorBoxModalAuto( + i18next.t( + 'box.error.cx-bottle-not-found.title', + 'CrossOver bottle not found' + ), + i18next.t( + 'box.error.cx-bottle-not-found.message', + `The CrossOver bottle "{{bottle_name}}" does not exist, can't launch!`, + { bottle_name: gameSettings.wineCrossoverBottle } + ) + ) + return { success: false } + } + } + const { updated: winePrefixUpdated } = await verifyWinePrefix(game) if (winePrefixUpdated) { logInfo( diff --git a/public/locales/bg/translation.json b/public/locales/bg/translation.json index d8461d7aae..53cbe61853 100644 --- a/public/locales/bg/translation.json +++ b/public/locales/bg/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Данните Ви за удостоверяване са изтекли. Излезте и влезте отново." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Няма достатъчно свободно място на диска", "title": "Недостатъчно място" diff --git a/public/locales/ca/translation.json b/public/locales/ca/translation.json index 7de695280c..a51625bccc 100644 --- a/public/locales/ca/translation.json +++ b/public/locales/ca/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Les teves credencials han caducat, tanca la sessió i inicia-la de nou." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "No hi ha prou espai al disc", "title": "No hi ha espai" diff --git a/public/locales/cs/translation.json b/public/locales/cs/translation.json index dc32766c88..069a31ff68 100644 --- a/public/locales/cs/translation.json +++ b/public/locales/cs/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Vaše přihlašovací údaje vypršeli, odhlaste se a přihlašte se znovu prosím." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Nedostatek místa na disku", "title": "Nedostatek místa" diff --git a/public/locales/de/translation.json b/public/locales/de/translation.json index 9a86f8da29..4690f09452 100644 --- a/public/locales/de/translation.json +++ b/public/locales/de/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Deine Anmeldedaten sind abgelaufen, bitte logge dich aus und melde dich erneut an." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Nicht genügend freier Speicherplatz", "title": "Kein Speicherplatz" diff --git a/public/locales/el/translation.json b/public/locales/el/translation.json index 4db2ff181f..072c995029 100644 --- a/public/locales/el/translation.json +++ b/public/locales/el/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Τα διαπιστευτήριά σας έληξαν, παρακαλώ αποσυνδεθείτε και επανασυνδεθείτε εκ νέου." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Δεν υπάρχει αρκετός διαθέσιμος χώρος στο δίσκο", "title": "Ανεπαρκής χώρος" diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 977d4fdc71..57d93892f4 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Your credentials have expired, please log out and log in again." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Not enough available disk space", "title": "No Space" diff --git a/public/locales/es/translation.json b/public/locales/es/translation.json index 1ab27611c2..18ec43d92f 100644 --- a/public/locales/es/translation.json +++ b/public/locales/es/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Tus credenciales han expirado, por favor, inicia sesión nuevamente." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "No hay suficiente espacio disponible en disco", "title": "Sin espacio" diff --git a/public/locales/et/translation.json b/public/locales/et/translation.json index 57d1d1b4fe..2a8798d5d7 100644 --- a/public/locales/et/translation.json +++ b/public/locales/et/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Teie kasutaja andmed on aegunud, palun logige välja ja logige uuesti sisse." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Ei ole piisavalt vaba kettaruumi", "title": "Ei ole ruumi" diff --git a/public/locales/fa/translation.json b/public/locales/fa/translation.json index 5d72556ff0..c2709b5cad 100644 --- a/public/locales/fa/translation.json +++ b/public/locales/fa/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "اعتبار ورود شما منقضی شده است، لطفا دوباره خارج شده و داخل شوید." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "فضای ذخیره سازی کافی موجود نیست", "title": "فضایی موجود نیست" diff --git a/public/locales/fi/translation.json b/public/locales/fi/translation.json index a42b2bbeed..8c76362e7b 100644 --- a/public/locales/fi/translation.json +++ b/public/locales/fi/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Kirjautumistietosi ovat vanhentuneet, ole hyvä ja kirjaudu uudelleen sisään." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Ei tarpeeksi tilaa levyllä", "title": "Ei ole tilaa levyllä" diff --git a/public/locales/fr/translation.json b/public/locales/fr/translation.json index 75dafd808a..b8512ba599 100644 --- a/public/locales/fr/translation.json +++ b/public/locales/fr/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Vos informations d'identification ont expiré, veuillez vous reconnecter." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Espace disque nécessaire insuffisant", "title": "Pas de place" diff --git a/public/locales/gl/translation.json b/public/locales/gl/translation.json index f8a9970ee2..0ff5f20df0 100644 --- a/public/locales/gl/translation.json +++ b/public/locales/gl/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "As túas credenciais expiraron, pecha sesión e iníciaa de novo." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Non hai suficiente espacio dispoñíbel no disco", "title": "Sen espacio" diff --git a/public/locales/hr/translation.json b/public/locales/hr/translation.json index fd4cfdc641..f669725953 100644 --- a/public/locales/hr/translation.json +++ b/public/locales/hr/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Vaša prijava je istekla, ponovno se prijavite." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Nema dovoljno slobodnog prostora na disku", "title": "Nema Prostora" @@ -369,9 +373,9 @@ "userselector": { "discord": "Discord", "logout": "Logout", + "logout_confirmation": "Jeste li sigurni da se želite odjaviti?", "manageaccounts": "Manage Accounts", - "quit": "Quit", - "logout_confirmation": "Jeste li sigurni da se želite odjaviti?" + "quit": "Quit" }, "webview": { "controls": { diff --git a/public/locales/hu/translation.json b/public/locales/hu/translation.json index abd4b85f52..447bd369d9 100644 --- a/public/locales/hu/translation.json +++ b/public/locales/hu/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Lejártak a hitelesítő adataid, jelentkezz ki, majd jelentkezz be újra." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Nincs elég elérhető lemezterület", "title": "Nincs hely" diff --git a/public/locales/id/translation.json b/public/locales/id/translation.json index e81adf7384..e59e7a2a0a 100644 --- a/public/locales/id/translation.json +++ b/public/locales/id/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Kredensial Anda telah kedaluwarsa, silakan keluar dan masuk lagi." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Ruang penyimpanan tidak cukup", "title": "Tidak Ada Ruang" diff --git a/public/locales/it/translation.json b/public/locales/it/translation.json index 9ceac1db3e..d10cfb1430 100644 --- a/public/locales/it/translation.json +++ b/public/locales/it/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Le tue credenziali non sono più valide, per favore rifai il login." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Spazio su disco insufficiente", "title": "Spazio insufficiente" diff --git a/public/locales/ja/translation.json b/public/locales/ja/translation.json index 70c32803fb..a2014e946d 100644 --- a/public/locales/ja/translation.json +++ b/public/locales/ja/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "クレデンシャルの有効期限が切れています。ログアウトしてから再度ログインしてください。" }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "使用可能なディスク容量が不足しています", "title": "ディスク容量がありません" diff --git a/public/locales/ko/translation.json b/public/locales/ko/translation.json index 3c0adb738a..4dd1a81f68 100644 --- a/public/locales/ko/translation.json +++ b/public/locales/ko/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "사용자의 인증서가 만료되었습니다, 로그아웃 한 뒤 다시 로그인 해주세요." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "사용 가능한 디스크 공간이 충분하지 않습니다", "title": "공간 없음" diff --git a/public/locales/ml/translation.json b/public/locales/ml/translation.json index 2b50343c80..20f1bc918b 100644 --- a/public/locales/ml/translation.json +++ b/public/locales/ml/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "നിങ്ങളെക്കുറിച്ചുള്ള വിവരങ്ങള് പഴകിയിരിക്കുന്നു, പുറത്തുകടന്ന് വീണ്ടും കയറിനോക്കൂ." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "തകിടില്(disk) ആവശ്യത്തിന് സ്ഥലമില്ലല്ലോ", "title": "സ്ഥലമില്ല" diff --git a/public/locales/nl/translation.json b/public/locales/nl/translation.json index cff0c363e0..6885447e09 100644 --- a/public/locales/nl/translation.json +++ b/public/locales/nl/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Uw inloggegevens zijn verlopen, gelieven uit te loggen en weer inloggen." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Niet genoeg ruimte beschikbaar op de harde schijf", "title": "Niet genoeg opslag" diff --git a/public/locales/pl/translation.json b/public/locales/pl/translation.json index 2b23df091b..22eb3e7781 100644 --- a/public/locales/pl/translation.json +++ b/public/locales/pl/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Twoje dane uwierzytelniające wygasły, wyloguj się i zaloguj ponownie." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Za mało miejsca na dysku", "title": "Brak miejsca" diff --git a/public/locales/pt/translation.json b/public/locales/pt/translation.json index 3477f5ae1d..ff9ca7df27 100644 --- a/public/locales/pt/translation.json +++ b/public/locales/pt/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Suas credenciais expiraram, por favor faça logout e login novamente." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Sem espaço disponível no disco", "title": "Sem Espaço" diff --git a/public/locales/pt_BR/translation.json b/public/locales/pt_BR/translation.json index 0f9704583c..a0ea724b2e 100644 --- a/public/locales/pt_BR/translation.json +++ b/public/locales/pt_BR/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Suas credenciais expiraram, por favor desconecte sua conta e entre novamente." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Sem espaço suficiente disponível no disco", "title": "Sem Espaço" diff --git a/public/locales/ru/translation.json b/public/locales/ru/translation.json index 1e6b194f24..19d5ae8279 100644 --- a/public/locales/ru/translation.json +++ b/public/locales/ru/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Срок действия ваших учетных данных истек. Пожалуйста, выйдите из системы и войдите снова." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Недостаточно свободного места на диске", "title": "Нет места" diff --git a/public/locales/sv/translation.json b/public/locales/sv/translation.json index a3b4fdce78..72c4f21b56 100644 --- a/public/locales/sv/translation.json +++ b/public/locales/sv/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Autentisering har utgått, logga ut och logga sedan in igen." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Otillräckligt ledigt hårdiskutrymme", "title": "Otillräckligt utrymme" diff --git a/public/locales/ta/translation.json b/public/locales/ta/translation.json index 69f4ad01d0..9aab0ea00e 100644 --- a/public/locales/ta/translation.json +++ b/public/locales/ta/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "உங்கள் சான்றிதழ்கள் காலாவதியாகிவிட்டன, தயவுசெய்து வெளியேறி மீண்டும் உள்நுழைக." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "போதுமான இடம் இல்லை", "title": "இடம் இல்லை" diff --git a/public/locales/tr/translation.json b/public/locales/tr/translation.json index c74e5cda92..e11a728742 100644 --- a/public/locales/tr/translation.json +++ b/public/locales/tr/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Kimlik bilgilerinizin süresi doldu, lütfen oturumunuzu kapatın ve tekrar oturum açın." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Yeterli kullanılabilir disk alanı yok", "title": "Alan Yok" diff --git a/public/locales/uk/translation.json b/public/locales/uk/translation.json index 704fcd213d..51c2538d11 100644 --- a/public/locales/uk/translation.json +++ b/public/locales/uk/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Термін дії ваших облікових даних скінчився, будь ласка вийдіть і увійдіть знову." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Недостатньо місця на диску", "title": "Немає місця" diff --git a/public/locales/vi/translation.json b/public/locales/vi/translation.json index acbca2a946..ec1ef14b42 100644 --- a/public/locales/vi/translation.json +++ b/public/locales/vi/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "Thông tin đăng nhập hết hạn, vui lòng đăng xuất rồi đăng nhập lại." }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "Không đủ bộ nhớ trống", "title": "Không đủ bộ nhớ" diff --git a/public/locales/zh_Hans/translation.json b/public/locales/zh_Hans/translation.json index 9a7429fde2..3af74a0e04 100644 --- a/public/locales/zh_Hans/translation.json +++ b/public/locales/zh_Hans/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "你的凭据已过期,请注销并重新登录。" }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "没有足够的可用磁盘空间", "title": "没有空间" diff --git a/public/locales/zh_Hant/translation.json b/public/locales/zh_Hant/translation.json index 26b4575a00..36f1232ee4 100644 --- a/public/locales/zh_Hant/translation.json +++ b/public/locales/zh_Hant/translation.json @@ -24,6 +24,10 @@ "credentials": { "message": "您的憑據已過期,請登出並重新登入。" }, + "cx-bottle-not-found": { + "message": "The CrossOver bottle \"{{bottle_name}}\" does not exist, can't launch!", + "title": "CrossOver bottle not found" + }, "diskspace": { "message": "磁碟空間不足", "title": "空間不足"