Skip to content

Commit

Permalink
Merge pull request #5 from ChenglongMa/dev-1.0.2
Browse files Browse the repository at this point in the history
Release v1.0.2
  • Loading branch information
ChenglongMa authored Jun 18, 2024
2 parents c2c3d9b + 319b199 commit 73c32b3
Show file tree
Hide file tree
Showing 19 changed files with 766 additions and 339 deletions.
3 changes: 3 additions & 0 deletions .idea/LOLauncher.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 17 additions & 16 deletions .idea/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions .idea/runConfigurations/build_ps1.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/runConfigurations/build_ps1_dev.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 0 additions & 25 deletions .idea/runConfigurations/main.xml

This file was deleted.

18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,23 @@ _谢谢关注!_

该程序会自动检测英雄联盟的相关目录修改配置并启动游戏。

## 版本比较

| 版本号 | [v1.0.1](https://github.com/ChenglongMa/LOLauncher/releases/tag/1.0.1) | [v1.0.2](https://github.com/ChenglongMa/LOLauncher/releases/tag/1.0.2) |
|-----------|------------------------------------------------------------------------|------------------------------------------------------------------------|
| Win 10 适用 |||
| Win 11 适用 | X ||
| 管理员权限 || X |
| 后台运行 | X ||
| 自动更新 |||


### 注意
1. 该程序需要**管理员权限**运行。这是因为需要将游戏的配置文件设置为只读,以防止游戏更新后恢复默认语言。
2. 游戏启动成功后**不需要**再次运行该程序,可按照您的习惯启动游戏。若之后游戏更新导致语言恢复,可重新运行该程序。
1. ~~该程序需要**管理员权限**运行。这是因为需要将游戏的配置文件设置为只读,以防止游戏更新后恢复默认语言。~~
* 自 1.0.2 版本开始,不再需要管理员权限。
2. ~~游戏启动成功后**不需要**再次运行该程序,可按照您的习惯启动游戏。若之后游戏更新导致语言恢复,可重新运行该程序。~~
* 自 1.0.2 版本开始,程序需要保持后台运行,直到游戏启动,以便在游戏更新后自动修改语言。
* 您依然可以按照您的习惯启动游戏,但是请不要关闭该程序。
3. 本程序会**自动检查更新**,如果有新版本会提示您下载。我会根据游戏的更新情况及时更新程序。

> [!TIP]
Expand Down
61 changes: 52 additions & 9 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
param (
[Parameter(Mandatory = $false)]
[switch]$Dev
)

Write-Output "Building LOLauncher..."
$ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
Expand All @@ -7,17 +12,55 @@ Write-Output "Cleaning Up..."
Remove-Item -Path .\build\* -Recurse -Force
Remove-Item -Path .\dist\* -Recurse -Force

Write-Output "Creating Version File..."
$CreateVersionFileApp = Join-Path -Path $UserDirectory -ChildPath "\anaconda3\envs\py312\Scripts\create-version-file.exe"
& $CreateVersionFileApp metadata.yml --outfile file_version_info.txt

Write-Output "Building..."
.\venv\Scripts\pyinstaller.exe --log-level WARN --onefile --clean --icon .\icon.ico --name LOLauncher .\main.py

Write-Output "Setting Version..."
.\venv\Scripts\pyi-set_version.exe ./file_version_info.txt ./dist/LOLauncher.exe
$InstallerArgsDebug = @(
"--noconsole",
"--add-data",
".\src\assets\*.png;.\assets",
"--add-data",
".\src\assets\*.ico;.\assets",
"--paths",
".\src",
"--clean",
"--icon",
".\src\assets\icon.ico",
"--name",
"LOLauncher",
".\src\main.py"
)

$InstallerArgs = $InstallerArgsDebug + @(
"--log-level",
"WARN",
"--onefile"
)

if ($Dev)
{
.\venv\Scripts\pyinstaller.exe $InstallerArgsDebug
}
else
{
.\venv\Scripts\pyinstaller.exe $InstallerArgs
}

if ($Dev)
{
Write-Output "Debug mode enabled, skipping compression..."
& .\dist\LOLauncher\LOLauncher.exe
}
else
{
Write-Output "Creating Version File..."
$CreateVersionFileApp = Join-Path -Path $UserDirectory -ChildPath "\anaconda3\envs\py312\Scripts\create-version-file.exe"
& $CreateVersionFileApp metadata.yml --outfile file_version_info.txt

Write-Output "Setting Version..."
.\venv\Scripts\pyi-set_version.exe ./file_version_info.txt ./dist/LOLauncher.exe

Write-Output "Compressing Files..."
Compress-Archive -Path .\dist\LOLauncher.exe -DestinationPath .\dist\LOLauncher.zip
Write-Output "Compressing Files..."
Compress-Archive -Path .\dist\LOLauncher.exe -DestinationPath .\dist\LOLauncher.zip
}

Write-Output "Done!"
Binary file added docs/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 73c32b3

Please sign in to comment.