Skip to content

Commit f273b28

Browse files
authored
Merge pull request #120 from fa0311/develop-v5
v5.4.1
2 parents 5aa6bf0 + 89ca842 commit f273b28

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

DMMGamePlayerFastLauncher/models/setting_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
@dataclass
1212
class SettingData(VariableBase):
13+
last_version: StringVar = field(default_factory=lambda: StringVar(value="v5.4.0")) # field(default_factory=lambda: StringVar(value=Env.VERSION))
1314
dmm_game_player_program_folder: PathVar = field(default_factory=lambda: PathVar(value=Env.DEFAULT_DMM_GAME_PLAYER_PROGURAM_FOLDER))
1415
dmm_game_player_data_folder: PathVar = field(default_factory=lambda: PathVar(value=Env.DEFAULT_DMM_GAME_PLAYER_DATA_FOLDER))
1516
proxy_http: StringVar = field(default_factory=StringVar)

DMMGamePlayerFastLauncher/static/env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
class Env(Dump):
11-
VERSION = "v5.4.0"
11+
VERSION = "v5.4.1"
1212
RELEASE_VERSION = requests.get(UrlConfig.RELEASE_API).json().get("tag_name", VERSION)
1313

1414
DEVELOP: bool = os.environ.get("ENV") == "DEVELOP"

DMMGamePlayerFastLauncher/static/loder.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import json
2+
from pathlib import Path
23

34
from models.setting_data import AppConfig, DeviceData, SettingData
4-
from static.config import DataPathConfig
5-
from utils.utils import get_supported_lang
5+
from static.config import AssetsPathConfig, DataPathConfig
6+
from static.env import Env
67

78

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

23-
if AppConfig.DATA.lang.get() not in [x[0] for x in get_supported_lang()]:
24-
AppConfig.DATA.lang.set("en_US")
24+
if AppConfig.DATA.last_version.get() != Env.VERSION:
25+
if AppConfig.DATA.last_version.get() == "v5.4.0":
26+
Path(AssetsPathConfig.I18N).joinpath("app.ja.yml").unlink(missing_ok=True)
27+
Path(AssetsPathConfig.I18N).joinpath("app.en.yml").unlink(missing_ok=True)
28+
AppConfig.DATA.lang.set("en_US")
29+
30+
AppConfig.DATA.last_version.set(Env.VERSION)
2531

2632
AppConfig.DATA.update()
2733
AppConfig.DEVICE.update()

setup.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "DMMGamePlayerFastLauncher"
5-
#define MyAppVersion "5.4.0"
5+
#define MyAppVersion "5.4.1"
66
#define MyAppPublisher "yuki"
77
#define MyAppURL "https://github.com/fa0311/DMMGamePlayerFastLauncher"
88
#define MyAppExeName "DMMGamePlayerFastLauncher.exe"

0 commit comments

Comments
 (0)