Skip to content

Commit

Permalink
Merge pull request #120 from fa0311/develop-v5
Browse files Browse the repository at this point in the history
v5.4.1
  • Loading branch information
fa0311 authored Feb 7, 2024
2 parents 5aa6bf0 + 89ca842 commit f273b28
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions DMMGamePlayerFastLauncher/models/setting_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

@dataclass
class SettingData(VariableBase):
last_version: StringVar = field(default_factory=lambda: StringVar(value="v5.4.0")) # field(default_factory=lambda: StringVar(value=Env.VERSION))
dmm_game_player_program_folder: PathVar = field(default_factory=lambda: PathVar(value=Env.DEFAULT_DMM_GAME_PLAYER_PROGURAM_FOLDER))
dmm_game_player_data_folder: PathVar = field(default_factory=lambda: PathVar(value=Env.DEFAULT_DMM_GAME_PLAYER_DATA_FOLDER))
proxy_http: StringVar = field(default_factory=StringVar)
Expand Down
2 changes: 1 addition & 1 deletion DMMGamePlayerFastLauncher/static/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class Env(Dump):
VERSION = "v5.4.0"
VERSION = "v5.4.1"
RELEASE_VERSION = requests.get(UrlConfig.RELEASE_API).json().get("tag_name", VERSION)

DEVELOP: bool = os.environ.get("ENV") == "DEVELOP"
Expand Down
14 changes: 10 additions & 4 deletions DMMGamePlayerFastLauncher/static/loder.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import json
from pathlib import Path

from models.setting_data import AppConfig, DeviceData, SettingData
from static.config import DataPathConfig
from utils.utils import get_supported_lang
from static.config import AssetsPathConfig, DataPathConfig
from static.env import Env


def config_loder():
Expand All @@ -20,8 +21,13 @@ def config_loder():
with open(DataPathConfig.DEVICE, "w+", encoding="utf-8") as f:
json.dump(AppConfig.DEVICE.to_dict(), f)

if AppConfig.DATA.lang.get() not in [x[0] for x in get_supported_lang()]:
AppConfig.DATA.lang.set("en_US")
if AppConfig.DATA.last_version.get() != Env.VERSION:
if AppConfig.DATA.last_version.get() == "v5.4.0":
Path(AssetsPathConfig.I18N).joinpath("app.ja.yml").unlink(missing_ok=True)
Path(AssetsPathConfig.I18N).joinpath("app.en.yml").unlink(missing_ok=True)
AppConfig.DATA.lang.set("en_US")

AppConfig.DATA.last_version.set(Env.VERSION)

AppConfig.DATA.update()
AppConfig.DEVICE.update()
2 changes: 1 addition & 1 deletion setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "DMMGamePlayerFastLauncher"
#define MyAppVersion "5.4.0"
#define MyAppVersion "5.4.1"
#define MyAppPublisher "yuki"
#define MyAppURL "https://github.com/fa0311/DMMGamePlayerFastLauncher"
#define MyAppExeName "DMMGamePlayerFastLauncher.exe"
Expand Down

0 comments on commit f273b28

Please sign in to comment.