Skip to content

Commit

Permalink
Merge pull request #114 from fa0311/develop-v5
Browse files Browse the repository at this point in the history
Develop v5
  • Loading branch information
fa0311 authored Dec 2, 2023
2 parents c0589d6 + ab9a351 commit 9badc38
Show file tree
Hide file tree
Showing 13 changed files with 108 additions and 4 deletions.
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/en-bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "[en] 🐛 Report a Bug"
description: Report a bug in DMMGamePlayerFastLauncher.
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
## Before Reporting a Bug
Before reporting a bug, please check [Issues](https://github.com/fa0311/DMMGamePlayerFastLauncher/issues) to see if a similar bug has already been reported. If there is a similar bug and you can provide additional information, please add a comment.
- type: input
id: os
attributes:
label: OS
description: Please include the version.
placeholder: "Example: Windows 10"
validations:
required: true

- type: textarea
id: bug-description
attributes:
label: Bug Description
description: Please provide detailed information about the bug. Attach images if necessary.
placeholder: |
The shortcut for Princess Connect Re:Dive does not launch when the setting is xxxxxx.
The shortcut for Uma Musume launches successfully.
The product_id for Princess Connect Re:Dive is xxxxx.
...
validations:
required: true

- type: textarea
id: error-message
attributes:
label: Error Message
description: If an error message is displayed, please paste it here.
render: Shell
validations:
required: false

- type: textarea
id: log
attributes:
label: Log
description: Paste the logs displayed in the debug window here. If there are personal information such as tokens, please redact them.
render: Shell
validations:
required: false
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/en-feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "[en] 💡 Propose a Feature"
description: Please propose the desired features for DMMGamePlayerFastLauncher.
labels: ["enhancement"]
body:
- type: textarea
id: feature-description
attributes:
label: Feature Description
validations:
required: true
10 changes: 10 additions & 0 deletions DMMGamePlayerFastLauncher/DMMGamePlayerFastLauncher.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from coloredlogs import ColoredFormatter
from component.logger import StyleScheme, TkinkerLogger
from launch import GameLauncher, LanchLauncher
from lib.DGPSessionV2 import DgpSessionV2
from models.setting_data import AppConfig
from static.config import AssetsPathConfig, DataPathConfig, SchtasksConfig, UrlConfig
from static.env import Env
Expand Down Expand Up @@ -65,6 +66,14 @@ def loder(master: LanchLauncher):
os.environ["HTTP_PROXY"] = AppConfig.DATA.proxy_http.get()
if AppConfig.DATA.proxy_https.get() != "":
os.environ["HTTPS_PROXY"] = AppConfig.DATA.proxy_https.get()
if AppConfig.DATA.proxy_socks.get() != "":
os.environ["SOCKS_PROXY"] = AppConfig.DATA.proxy_socks.get()
if AppConfig.DATA.dmm_proxy_http.get() != "":
DgpSessionV2.PROXY["http"] = AppConfig.DATA.dmm_proxy_http.get()
if AppConfig.DATA.dmm_proxy_https.get() != "":
DgpSessionV2.PROXY["https"] = AppConfig.DATA.dmm_proxy_https.get()
if AppConfig.DATA.dmm_proxy_socks.get() != "":
DgpSessionV2.PROXY["socks"] = AppConfig.DATA.dmm_proxy_socks.get()

ctk.set_default_color_theme(str(AssetsPathConfig.THEMES.joinpath(AppConfig.DATA.theme.get()).with_suffix(".json")))
ctk.set_appearance_mode(AppConfig.DATA.appearance_mode.get())
Expand Down Expand Up @@ -105,3 +114,4 @@ def loder(master: LanchLauncher):
lanch.mainloop()
else:
raise Exception("type error")
raise Exception("type error")
5 changes: 4 additions & 1 deletion DMMGamePlayerFastLauncher/lib/DGPSessionV2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import requests
import requests.cookies
import urllib3
import win32crypt
from Crypto.Cipher import AES
from win32 import win32crypt

urllib3.disable_warnings()

Expand Down Expand Up @@ -90,8 +90,11 @@ class DgpSessionV2:
LOGIN = "https://accounts.dmm.com/service/login/token/=/path={token}/is_app=false"
SIGNED_URL = "https://cdn-gameplayer.games.dmm.com/product/*"

PROXY = {}

def __init__(self):
self.session = requests.session()
self.session.proxies = self.PROXY
self.cookies = self.session.cookies

def __enter__(self):
Expand Down
4 changes: 4 additions & 0 deletions DMMGamePlayerFastLauncher/models/setting_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ class SettingData(VariableBase):
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)
proxy_https: StringVar = field(default_factory=StringVar)
proxy_socks: StringVar = field(default_factory=StringVar)
dmm_proxy_http: StringVar = field(default_factory=StringVar)
dmm_proxy_https: StringVar = field(default_factory=StringVar)
dmm_proxy_socks: StringVar = field(default_factory=StringVar)
lang: StringVar = field(default_factory=lambda: StringVar(value="ja"))
theme: StringVar = field(default_factory=lambda: StringVar(value="blue"))
appearance_mode: StringVar = field(default_factory=lambda: StringVar(value="dark"))
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.2.3"
VERSION = "v5.3.0"
RELEASE_VERSION = requests.get(UrlConfig.RELEASE_API).json().get("tag_name", VERSION)

DEVELOP: bool = os.environ.get("ENV") == "DEVELOP"
Expand Down
9 changes: 8 additions & 1 deletion DMMGamePlayerFastLauncher/tab/setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ def create(self):

EntryComponent(self, text=i18n.t("app.setting.proxy_http"), variable=self.data.proxy_http).create()
EntryComponent(self, text=i18n.t("app.setting.proxy_https"), variable=self.data.proxy_https).create()
EntryComponent(self, text=i18n.t("app.setting.proxy_socks"), variable=self.data.proxy_socks).create()

EntryComponent(self, text=i18n.t("app.setting.dmm_proxy_http"), variable=self.data.dmm_proxy_http).create()
EntryComponent(self, text=i18n.t("app.setting.dmm_proxy_https"), variable=self.data.dmm_proxy_https).create()
EntryComponent(self, text=i18n.t("app.setting.dmm_proxy_socks"), variable=self.data.dmm_proxy_socks).create()

PaddingComponent(self, height=5).create()
CTkLabel(self, text=i18n.t("app.setting.window_scaling")).pack(anchor=ctk.W)
Expand All @@ -71,7 +76,9 @@ def create(self):
PaddingComponent(self, height=5).create()
CTkButton(self, text=i18n.t("app.setting.save"), command=self.save_callback).pack(fill=ctk.X, pady=10)

command = lambda: ConfirmWindow(self, command=self.delete_callback, text=i18n.t("app.setting.confirm_reset")).create()
def command():
return ConfirmWindow(self, command=self.delete_callback, text=i18n.t("app.setting.confirm_reset")).create()

CTkButton(self, text=i18n.t("app.setting.reset_all_settings"), command=command).pack(fill=ctk.X, pady=10)

return self
Expand Down
5 changes: 5 additions & 0 deletions assets/i18n/app.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ en:

proxy_http: HTTP Proxy
proxy_https: HTTPS Proxy
proxy_socks: SOCKS Proxy

dmm_proxy_http: DMM HTTP Proxy
dmm_proxy_https: DMM HTTPS Proxy
dmm_proxy_socks: DMM SOCKS Proxy

window_scaling: Window Scaling
debug_window: Show Debug Window
Expand Down
5 changes: 5 additions & 0 deletions assets/i18n/app.ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ ja:

proxy_http: HTTPプロキシ
proxy_https: HTTPSプロキシ
proxy_socks: SOCKSプロキシ

dmm_proxy_http: DMM HTTPプロキシ
dmm_proxy_https: DMM HTTPSプロキシ
dmm_proxy_socks: DMM SOCKSプロキシ

window_scaling: ウィンドウの拡大率
debug_window: デバッグウィンドウを表示する
Expand Down
5 changes: 5 additions & 0 deletions assets/i18n/app.zh_CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ zh_CN:

proxy_http: HTTP 代理
proxy_https: HTTPS 代理
proxy_socks: SOCKS 代理

dmm_proxy_http: DMM HTTP 代理
dmm_proxy_https: DMM HTTPS 代理
dmm_proxy_socks: DMM SOCKS 代理

window_scaling: 窐口缩放比例
debug_window: 显示调试窗口
Expand Down
6 changes: 6 additions & 0 deletions assets/i18n/app.zh_TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,14 @@ zh_TW:
lang: 語言
theme: 主題
appearance: 外貌

proxy_http: HTTP 代理
proxy_https: HTTPS 代理
proxy_socks: SOCKS 代理

dmm_proxy_http: DMM HTTP 代理
dmm_proxy_https: DMM HTTPS 代理
dmm_proxy_socks: DMM SOCKS 代理

window_scaling: 窐口縮放比例
debug_window: 顯示除錯窗口
Expand Down
Binary file modified requirements.txt
Binary file not shown.
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.2.3"
#define MyAppVersion "5.3.0"
#define MyAppPublisher "yuki"
#define MyAppURL "https://github.com/fa0311/DMMGamePlayerFastLauncher"
#define MyAppExeName "DMMGamePlayerFastLauncher.exe"
Expand Down

0 comments on commit 9badc38

Please sign in to comment.