Skip to content

Commit

Permalink
update and relaunch procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
gogodr committed Jun 7, 2022
1 parent 496c7fb commit 17f847a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Audio files from [MixKit](https://mixkit.co/)


### Changelog
### 1.2.4.1
- Update and relaunch procedure rework

### 1.2.3.1
- Logging update
- Launcher version check
Expand Down
1 change: 1 addition & 0 deletions compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@

PyInstaller.__main__.run([
'compile.spec',
'--clean'
])
8 changes: 4 additions & 4 deletions file_version_info.txt
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. Must always contain 4 elements.
filevers=(1,2,1,1),
prodvers=(1,2,1,1),
filevers=(1,2,3,1),
prodvers=(1,2,3,1),
# Contains a bitmask that specifies the valid bits 'flags'r
mask=0x3f,
# Contains a bitmask that specifies the Boolean attributes of the file.
Expand All @@ -32,12 +32,12 @@ VSVersionInfo(
u'040904B0',
[StringStruct(u'CompanyName', u'Lost Ark Market Online'),
StringStruct(u'FileDescription', u'Lost Ark Market Online Launcher App'),
StringStruct(u'FileVersion', u'1.2.1.1'),
StringStruct(u'FileVersion', u'1.2.3.1'),
StringStruct(u'InternalName', u'Launcher App'),
StringStruct(u'LegalCopyright', u'© Lost Ark Market Online'),
StringStruct(u'OriginalFilename', u'lamo-launcher.exe'),
StringStruct(u'ProductName', u'Lost Ark Market Online Launcher App'),
StringStruct(u'ProductVersion', u'1.2.1.1')])
StringStruct(u'ProductVersion', u'1.2.3.1')])
]),
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
]
Expand Down
17 changes: 13 additions & 4 deletions index.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def __init__(self, *args, **kwargs):
self.launcher_check_config()

# Launcher Version Check

def launcher_check_config(self):
Config().check_launcher_version()
AppLogger().info(
Expand All @@ -41,16 +40,26 @@ def launcher_check_config(self):
self.download = LostArkMarketLauncherDownload({
"url": f'https://github.com/gogodr/LostArk-Market-Launcher/releases/download/{Config().launcher_version}/{Config().launcher_file}.exe',
"title": f'New version of the Lost Ark Market Launcher Found: v{Config().launcher_version}',
"file": f'{Config().launcher_file}.exe'
"file": f'{Config().launcher_file}.exe.new'
})
self.download.launch.connect(self.launch_launcher)
self.download.finished_download.connect(self.launcher_downloaded)
else:
self.session_check()

def launch_launcher(self):
os.startfile(sys.argv[0])
sys.exit()
f = open("update-launcher.bat", "w")
f.write("""@echo off
taskkill /f /im lamo-launcher.exe >nul
timeout /t 1 /nobreak >nul
del lamo-launcher.exe
timeout /t 1 /nobreak >nul
ren lamo-launcher.exe.new lamo-launcher.exe
timeout /t 1 /nobreak >nul
start /b lamo-launcher.exe
(goto) 2>nul & del "%~f0""")
f.close()
os.system("update-launcher.bat")

def launcher_downloaded(self):
playDownloadComplete()
Expand Down
2 changes: 1 addition & 1 deletion modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class Config(metaclass=Singleton):
version = "1.2.3.1"
version = "1.2.4.1"
debug = False
id_token: str = None
refresh_token: str = None
Expand Down

0 comments on commit 17f847a

Please sign in to comment.