Skip to content

Commit e1b52e9

Browse files
committed
Update lib.py
Add version to Local directory
1 parent eb7926a commit e1b52e9

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

14.6 MB
Binary file not shown.

src/libs/lib.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
language_path = 'src\\resources\\languages\\'
1919

2020
APP_NAME = "Test_Application_Update"
21-
21+
VERSION = "v0.0.0"
2222
CONFIG_FILE = "config.json"
2323

2424
# ================== Temp Files functions ==================
@@ -33,15 +33,17 @@ def resource_temp_path(relative_path: str) -> str:
3333

3434
# ================== File functions ==================
3535

36-
def resource_path(relative_path: str):
37-
base_path = user_data_dir(appname=APP_NAME, appauthor=False)
36+
def resource_path(relative_path: str,):
37+
base_path = user_data_dir(
38+
appname=APP_NAME, appauthor=False, version=VERSION)
3839
print("Local - ", os.path.join(base_path, relative_path))
3940
return os.path.join(base_path, relative_path)
4041

4142

4243
def create_app_files():
4344
print("create app files")
44-
copy_dir(resource_temp_path(file_path), resource_path(file_path))
45+
copy_dir(resource_temp_path(file_path), resource_path(
46+
file_path), resource_temp_path(image_path))
4547

4648

4749
def copy_dir(src: str, dst: str, ignore: str = ""):
@@ -110,9 +112,9 @@ def get_dix_json(file_name: str):
110112
def default_config_values():
111113
print("default config values")
112114
dix = {
113-
"version": "v0.0.0",
115+
"version": VERSION,
114116
"repo_owner": 'FrenkyDema',
115-
"repo_name": 'Test_Application_Update'
117+
"repo_name": APP_NAME
116118
}
117119

118120
update_json(CONFIG_FILE, dix)
@@ -123,6 +125,7 @@ def default_config_values():
123125
def get_image_path(image_name: str) -> str:
124126
return resource_temp_path(image_path + image_name)
125127

128+
126129
boold = True
127130
if __name__ == "__main__":
128131
if boold:

0 commit comments

Comments
 (0)