Skip to content

Commit

Permalink
add compile script and file metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
gogodr committed Jun 7, 2022
1 parent 102fea4 commit efc8a76
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 76 deletions.
15 changes: 15 additions & 0 deletions compile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import PyInstaller.__main__

from modules.config import Config

import pyinstaller_versionfile

pyinstaller_versionfile.create_versionfile_from_input_file(
output_file="file_version_info.txt",
input_file="metadata.yml",
version=Config().version
)

PyInstaller.__main__.run([
'compile.spec',
])
28 changes: 0 additions & 28 deletions compile.sh

This file was deleted.

3 changes: 2 additions & 1 deletion release.spec → compile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exe = EXE(
a.zipfiles,
a.datas,
[],
name='LostArkMarketWatcher',
name='lamo-watcher',
debug=False,
bootloader_ignore_signals=False,
strip=False,
Expand All @@ -42,4 +42,5 @@ exe = EXE(
codesign_identity=None,
entitlements_file=None,
icon='assets\\icons\\favicon.ico',
version='file_version_info.txt'
)
45 changes: 0 additions & 45 deletions debug.spec

This file was deleted.

44 changes: 44 additions & 0 deletions file_version_info.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# UTF-8
#
# For more details about fixed file info 'ffi' see:
# http://msdn.microsoft.com/en-us/library/ms646997.aspx

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=(0,9,0,0),
prodvers=(0,9,0,0),
# Contains a bitmask that specifies the valid bits 'flags'r
mask=0x3f,
# Contains a bitmask that specifies the Boolean attributes of the file.
flags=0x0,
# The operating system for which this file was designed.
# 0x4 - NT and there is no need to change it.
OS=0x40004,
# The general type of file.
# 0x1 - the file is an application.
fileType=0x1,
# The function of the file.
# 0x0 - the function is not defined for this fileType
subtype=0x0,
# Creation date and time stamp.
date=(0, 0)
),
kids=[
StringFileInfo(
[
StringTable(
u'040904B0',
[StringStruct(u'CompanyName', u'Lost Ark Market Online'),
StringStruct(u'FileDescription', u'Lost Ark Market Online Watcher App'),
StringStruct(u'FileVersion', u'0.9.0.0'),
StringStruct(u'InternalName', u'Watcher App'),
StringStruct(u'LegalCopyright', u'© Lost Ark Market Online'),
StringStruct(u'OriginalFilename', u'lamo-watcher.exe'),
StringStruct(u'ProductName', u'Lost Ark Market Online Watcher App'),
StringStruct(u'ProductVersion', u'0.9.0.0')])
]),
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
]
)
2 changes: 1 addition & 1 deletion index.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def new_version(self, new_version):
if __name__ == "__main__":
AppLogger()
try:
myappid = f'lostarkmarketonline.watcher.app.{Config().version}'
myappid = f'lamo.watcher.app.{Config().version}'
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
app = LostArkMarketWatcher([])
icon = QIcon(os.path.abspath(os.path.join(os.path.dirname(__file__),
Expand Down
6 changes: 6 additions & 0 deletions metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CompanyName: Lost Ark Market Online
FileDescription: Lost Ark Market Online Watcher App
InternalName: Watcher App
LegalCopyright: © Lost Ark Market Online
OriginalFilename: lamo-watcher.exe
ProductName: Lost Ark Market Online Watcher App
2 changes: 1 addition & 1 deletion modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


class Config(metaclass=Singleton):
version = "0.8.5"
version = "0.9.0.0"
region: str
game_region: str
debug = False
Expand Down

0 comments on commit efc8a76

Please sign in to comment.