Skip to content

Commit

Permalink
Try to fix new launcher error
Browse files Browse the repository at this point in the history
  • Loading branch information
seuyh committed Sep 28, 2024
1 parent 2ff8789 commit 6790e88
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions design/languages/en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ after_launcher_download_text: We've downloaded the corrected launcher,\nnow go b
warning_title: Warning!
documents_remove_text: Warning!\nThis action will delete the folder with all game saves and mod presets in the launcher.\nAre you sure you want to continue?
after_documents_remove_text: Done! You can continue with the installation.
new_launcher_error: Reinstallation error!\try pressing "help" on the start screen and select the second option.
4 changes: 2 additions & 2 deletions design/languages/installer_en.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,9 @@ def retranslateUi(self, MainWindow):
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">2. THIS UNLOCKER IS PROVIDED &quot;AS IS&quot;. NO WARRANTIES ARE PROVIDED OR IMPLIED. YOU USE THIS MODIFICATION OF THE ORIGINAL GAME AT YOUR OWN RISK. THE AUTHORS OF THE MODIFICATION WILL NOT BE LIABLE FOR ANY LOSSES OR DATA CORRUPTION, ANY LOST PROFITS IN THE PROCESS OF USE OR MISUSE OF THIS MODIFICATION.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">4. All rights not expressly granted here are reserved by the copyright holders.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">3. All rights not expressly granted here are reserved by the copyright holders.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">5. Installation and use of this modification implies that you have read and understand the terms of this license agreement and agree to them.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">4. Installation and use of this modification implies that you have read and understand the terms of this license agreement and agree to them.</p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
self.eula_true.setText(_translate("MainWindow", "I accept the terms of the agreement"))
self.eula_false.setText(_translate("MainWindow", "I do not accept the terms of the agreement"))
Expand Down
4 changes: 2 additions & 2 deletions design/languages/installer_ru.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,9 @@ def retranslateUi(self, MainWindow):
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> 2. ДАННЫЙ РАЗБЛОКИРОВЩИК ПОСТАВЛЯЕТСЯ ПО ПРИНЦИПУ «AS IS». НИКАКИХ ГАРАНТИЙ НЕ ПРИЛАГАЕТСЯ И НЕ ПРЕДУСМАТРИВАЕТСЯ. ВЫ ИСПОЛЬЗУЕТЕ ЭТУ МОДИФИКАЦИЮ ОРИГИНАЛЬНОЙ ИГРЫ НА СВОЙ СТРАХ И РИСК. АВТОРЫ МОДИФИКАЦИИ НЕ БУДУТ ОТВЕЧАТЬ НИ ЗА КАКИЕ ПОТЕРИ ИЛИ ИСКАЖЕНИЯ ДАННЫХ, ЛЮБУЮ УПУЩЕННУЮ ВЫГОДУ В ПРОЦЕССЕ ИСПОЛЬЗОВАНИЯ ИЛИ НЕПРАВИЛЬНОГО ИСПОЛЬЗОВАНИЯ ДАННОЙ МОДИФИКАЦИИ.</p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> 4. Все права, не предоставленные здесь явно, сохраняются за правообладателями.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> 3. Все права, не предоставленные здесь явно, сохраняются за правообладателями.</p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> 5. Установка и использование данной модификации означает, что вы ознакомились и понимаете положения настоящего лицензионного соглашения и согласны с ними.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> 4. Установка и использование данной модификации означает, что вы ознакомились и понимаете положения настоящего лицензионного соглашения и согласны с ними.</p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
self.eula_true.setText(_translate("MainWindow", "Я принимаю условия соглашения"))
self.eula_false.setText(_translate("MainWindow", "Я не принимаю условия соглашения"))
Expand Down
4 changes: 2 additions & 2 deletions design/languages/installer_zh_cn.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,9 +670,9 @@ def retranslateUi(self, MainWindow):
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">2. 本解锁器“按原样”提供,不提供任何形式的担保。使用此修改版游戏风险自负。修改者不承担因使用或误用此修改版而导致的任何损失或数据损坏,以及在使用过程中可能发生的任何利润损失。</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">4. 未在此明确授予的所有权利均由版权持有者保留。</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">3. 未在此明确授予的所有权利均由版权持有者保留。</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">5. 安装并使用此修改意味着您已阅读并理解了本许可协议的条款,并同意遵守。</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">4. 安装并使用此修改意味着您已阅读并理解了本许可协议的条款,并同意遵守。</p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
self.eula_true.setText(_translate("MainWindow", "我接受协议条款"))
self.eula_false.setText(_translate("MainWindow", "我不接受协议条款"))
Expand Down
1 change: 1 addition & 0 deletions design/languages/ru.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ after_launcher_download_text: Мы загрузили исправленный
warning_title: Предупреждение!
documents_remove_text: Внимание!\nЭто действие удалит папку со всеми сохранениями игры и пресетами модов в лаунчере.\nВы уверены, что хотите продолжить?
after_documents_remove_text: Готово! Вы можете продолжить установку.
new_launcher_error: Ошибка переустановки!\nПопробуйте на стартовом экране выжать "помощь" и выбрать вторую опцию
1 change: 1 addition & 0 deletions design/languages/zh_cn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ after_launcher_download_text: 我们已经下载了正确的启动器,现在
warning_title: 警告!
documents_remove_text: 警告!\n此操作将删除启动器中包含所有游戏保存和模式预设的文件夹。\n你确定要继续吗?
after_documents_remove_text: 完成!您可以继续安装。
new_launcher_error: 重新安装错误!\尝试在开始屏幕上按"帮助"并选择第二个选项
8 changes: 5 additions & 3 deletions gui/main_window.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import json
import os
import webbrowser
from time import sleep
Expand Down Expand Up @@ -68,7 +67,7 @@ def __init__(self, language):
self.now_reinstalling.setVisible(False)
self.next_button_5.setEnabled(False)

self.iversion = '1.13'
self.iversion = '1.14'

# -------------------------------------------- #

Expand Down Expand Up @@ -492,7 +491,10 @@ def reinstall_2(self, paradox_folder1):
try:
self.replace_files(os.path.join(os.path.join(paradox_folder1, launcher_folders[0])))
except Exception as e:
raise e
if self.ok_dialog(self.translations.get("error", ""),
self.translations.get("new_launcher_error", ""),
QMessageBox.Critical):
self.close()

def replace_files(self, launcher_folder):
# try:
Expand Down
1 change: 0 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def show_crash_message():

QTimer.singleShot(0, lambda: sys.exit(2))

# test
def excepthookk(exctype, value, tb):
"""Обработчик исключений для перехвата ошибок."""
crashlog_path = "unlocker_crashlog.txt"
Expand Down

0 comments on commit 6790e88

Please sign in to comment.