Added launcher version text

This commit is contained in:
frarol96 2024-07-20 05:03:04 +00:00
parent 37c35d104a
commit 5c5571047c

View File

@ -1,5 +1,6 @@
# Define version number # Define version number
PROGRAM_VERSION = "1.7.0.5" PROGRAM_VERSION = "1.7.0.5"
LAUNCHER_VERSION = "1.1.0.0"
# Define a persistent path for the configuration files in the AppData folder # Define a persistent path for the configuration files in the AppData folder
PERSISTENT_DIR = os.path.join(os.getenv('APPDATA'), 'ERSC Mod Updater') PERSISTENT_DIR = os.path.join(os.getenv('APPDATA'), 'ERSC Mod Updater')
@ -49,6 +50,8 @@ def check_logo():
print(f"Logo downloaded successfully to {LOGO_PATH}") print(f"Logo downloaded successfully to {LOGO_PATH}")
else: else:
print(f"Failed to download logo.\nHTTP status code: {response.status_code}") print(f"Failed to download logo.\nHTTP status code: {response.status_code}")
else:
print(f"Logo discovered locally at {LOGO_PATH}")
def ensure_vocabulary(config): def ensure_vocabulary(config):
if "vocabulary" not in config: if "vocabulary" not in config:
@ -786,7 +789,7 @@ def show_info():
last_updated = config.get('last_updated', 'Unknown') last_updated = config.get('last_updated', 'Unknown')
launcher_path = os.path.join(os.path.dirname(config["mod_path"]), config['launcher_name']) launcher_path = os.path.join(os.path.dirname(config["mod_path"]), config['launcher_name'])
wdir = PERSISTENT_DIR wdir = PERSISTENT_DIR
QMessageBox.information(None, "Info", f"Current Version: {installed_version}\nLast Updated: {last_updated}\nLauncher Path: {launcher_path}\nWorking Directory: {wdir}\nERSCMU Version: {PROGRAM_VERSION}") QMessageBox.information(None, "Info", f"Current Version: {installed_version}\nLast Updated: {last_updated}\nLauncher Path: {launcher_path}\nWorking Directory: {wdir}\nERSCMU Version: {PROGRAM_VERSION}\nLauncher Version: {LAUNCHER_VERSION}")
def show_about(): def show_about():
about_text = f""" about_text = f"""
@ -803,6 +806,7 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ERSCMU Version: {PROGRAM_VERSION} ERSCMU Version: {PROGRAM_VERSION}
Launcher Version: {LAUNCHER_VERSION}
""" """
QMessageBox.information(None, "About", about_text) QMessageBox.information(None, "About", about_text)
@ -852,7 +856,8 @@ def create_gui():
version_label.setAlignment(Qt.AlignRight | Qt.AlignVCenter) version_label.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
version_label.setStyleSheet("padding-right: 10px;") # Optional: add some padding to the right version_label.setStyleSheet("padding-right: 10px;") # Optional: add some padding to the right
menu_bar.setCornerWidget(version_label, Qt.TopRightCorner) menu_bar.setCornerWidget(version_label, Qt.TopRightCorner)
version_label.setToolTip(str("ERSCMU version.\nThis is the version of this program you're currently running.")) version_label_tooltip_text = f"ERSCMU version.\nThis is the version of this program you're currently running.\nLauncher Version: {LAUNCHER_VERSION}"
version_label.setToolTip(str(version_label_tooltip_text))
mod_path_label = QLabel("Mod Folder:") mod_path_label = QLabel("Mod Folder:")
mod_path_entry = QLineEdit() mod_path_entry = QLineEdit()