Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ddc committed Jan 3, 2020
1 parent c889789 commit bd68a0d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 25 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4
2.5
8 changes: 4 additions & 4 deletions resources.rc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ VSVersionInfo(
ffi=FixedFileInfo(
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
# Set not needed items to zero 0.
filevers=(2, 0, 0, 4),
prodvers=(2, 0, 0, 4),
filevers=(2, 0, 0, 5),
prodvers=(2, 0, 0, 5),


# Contains a bitmask that specifies the valid bits 'flags'r
Expand Down Expand Up @@ -56,8 +56,8 @@ StringFileInfo(
StringStruct(u'Users', u'Unlimited'),
StringStruct(u'PrivateBuild', u''),
StringStruct(u'SpecialBuild', u''),
StringStruct(u'FileVersion', u'2.4'),
StringStruct(u'ProductVersion', u'2.4'),
StringStruct(u'FileVersion', u'2.5'),
StringStruct(u'ProductVersion', u'2.5'),
StringStruct(u'Build', u'December 2019'),
])
]),
Expand Down
30 changes: 12 additions & 18 deletions src/main_src.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,33 +370,27 @@ def _set_all_configs_on_form_from_settings_file(self):
################################################################################
def _get_gw2_file_name(self):
path = str(utilities.open_get_filename())
file_name = None
if path != "":
file_name = str(path.split("/")[-1])
gw2_names = constants.GW2_64_BIT_EXEC_NAME
gw2_name = constants.GW2_64_BIT_EXEC_NAME

for value in gw2_names:
if value.lower() == file_name.lower():
self.qtObj.gw2Path_label.setText(path)
self.configs['gw2Path'] = path
self._enable_form()
utilities.set_file_settings("GW2", "gw2Path", f"\"{self.configs['gw2Path']}\"")
return
if gw2_name.lower() == file_name.lower():
self.qtObj.gw2Path_label.setText(path)
self.configs['gw2Path'] = path
self._enable_form()
utilities.set_file_settings("GW2", "gw2Path", f"\"{self.configs['gw2Path']}\"")
elif file_name.lower() == "gw2.exe":
utilities.show_message_window("error", "ERROR", str(messages.gw2_32bit_not_supported))
else:
not_valid_gw2_msg = f"\"{file_name}\" {messages.not_valid_gw2}"
utilities.show_message_window("error", "ERROR", not_valid_gw2_msg)

if str(self.configs['gw2Path']) == "":
if str(self.configs['gw2Path']) == "" or self.configs['gw2Path'] is None:
self._disable_form()
self.qtObj.gw2Path_label.clear()
self.qtObj.gw2Path_label.setText(messages.need_find_gw2)
self.qtObj.findGw2File_button.setFocus()

if file_name is not None:
if file_name.lower() == "gw2.exe":
utilities.show_message_window("error", "ERROR", str(messages.gw2_32bit_not_supported))
return

not_valid_gw2_msg = f"\"{file_name}\" {messages.not_valid_gw2}"
utilities.show_message_window("error", "ERROR", not_valid_gw2_msg)

################################################################################
def _get_dat_file_name(self):
path = str(utilities.open_get_filename())
Expand Down
4 changes: 2 additions & 2 deletions src/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

PROGRAM_NAME = "Guild Wars 2 Launcher"
SHORT_PROGRAM_NAME = "Gw2Launcher"
VERSION = "2.4"
VERSION = "2.5"
################################################################################
EXIT_TIMER = 5
################################################################################
Expand All @@ -34,7 +34,7 @@
IS_64BIT = platform.machine().endswith("64")
PYTHON_OK = sys.version_info >= (3, 6)
################################################################################
GW2_64_BIT_EXEC_NAME = ["Gw2-64.exe"]
GW2_64_BIT_EXEC_NAME = "Gw2-64.exe"
################################################################################
APPDATA_PATH = os.getenv('APPDATA') # returns AppData\Roaming. 'LOCALAPPDATA' == AppData\Local.
PROGRAM_PATH = f"{APPDATA_PATH}/{SHORT_PROGRAM_NAME}"
Expand Down

0 comments on commit bd68a0d

Please sign in to comment.