- added forgotten xdelta3 requirement
- added GPU selection (thanks to Laurin Neff)
- added DXVK logs auto-deletion option
- added winetricks and default wine version
  auto-installation so they're no more required
- some settings were moved to "Enhancements"
- updated statistics
- added execution command log before game launch
This commit is contained in:
Observer KRypt0n_ 2021-11-25 21:40:54 +02:00
parent b8b79b0000
commit 85cfcde86f
No known key found for this signature in database
GPG key ID: DC5D4EC1303465DA
25 changed files with 307 additions and 132 deletions

View file

@ -14,7 +14,7 @@
| Game version | Launcher version | Patch version |
| :---: | :---: | :---: |
| 2.3.0 | 1.5.9 | 2.3.0 testing ⚠️ |
| 2.3.0 | 1.6.0 | 2.3.0 testing ⚠️ |
We have our own [An Anime Game](https://discord.gg/ck37X6UWBp) discord server where you can ask any questions
@ -46,24 +46,23 @@ This launcher also available as the [an-anime-game-launcher](https://aur.archlin
To work this launcher requires
* wine
* winetricks
* unzip
* tar
* git
* xdelta3
## Install
### apt-get
```sh
sudo apt-get install wine winetricks unzip tar git
sudo apt-get install unzip tar git xdelta3
```
### pacman
```sh
sudo pacman -Syu wine winetricks unzip tar git
sudo pacman -Syu unzip tar git xdelta3
```
# Additional requirements
@ -73,6 +72,7 @@ sudo pacman -Syu wine winetricks unzip tar git
| [MangoHud](https://github.com/flightlessmango/MangoHud) | To use MangoHud |
| [vkBasalt](https://github.com/DadSchoorse/vkBasalt) | To use shaders |
| [GameMode](https://github.com/FeralInteractive/gamemode) | To use GameMode (performance optimisation) |
| [switcheroo-control](https://gitlab.freedesktop.org/hadess/switcheroo-control/) | To select the GPU launcher should use to run the game |
These requirements can't be easily installed so you should do it manually
@ -123,18 +123,19 @@ npm start
* <s>Make shaders manager hidden if vkBasalt is not installed</s> *(1.5.4)*
* <s>Make MangoHud option hidden if it is not installed</s> *(1.5.4)*
* <s>GameMode integration ([issue 28](https://notabug.org/nobody/an-anime-game-launcher/issues/28), [pull request 30](https://notabug.org/nobody/an-anime-game-launcher/pulls/30))</s> *(1.5.8)*
* DXVK logs auto-deletion option
* <s>Hybrid GPU integration ([issue 29](https://notabug.org/nobody/an-anime-game-launcher/issues/29), [pull request 33](https://notabug.org/nobody/an-anime-game-launcher/pulls/33))</s> *(1.6.0)*
* <s>Add winetricks auto-downloading when new prefix creates so it is no longer required</s> *(1.6.0)*
* <s>DXVK logs auto-deletion option</s> *(1.6.0)*
* <s>Add default wine version to download</s> (Proton-6.20-GE-1) *(1.6.0)*
* Fix button flickering at start when the launcher's state updates
* Wine prefix folder selection *(symlinks?)*
* Game's update pre-installation
* Screenshots explorer
* Make force launch button when the launcher's repository is unavailable *(waiting for the repository's unavailability lmao)*
* Set default wine version to download so the wine install requirement is no longer needed
* Add Patch category in settings menu with
- Always participate in patches testing
- Applying anti login crash patch
- Remove patch
* Hybrid GPU integration ([issue 29](https://notabug.org/nobody/an-anime-game-launcher/issues/29))
> Now I'm working on moving the project to the Tauri. Also for some personal reasons I, like the patch's author, will be busy, but until Christmas, so it's a bit more than a month. I will make some critical updates if they will be required, but the development will be frozen for this period. I hope you will enjoy playing the game, and I will enjoy continuing the development of this project
>

View file

@ -1,6 +1,6 @@
{
"name": "an-anime-game-launcher",
"version": "1.5.9",
"version": "1.6.0",
"description": "An Anime Game Linux Launcher",
"author": "Nikita Podvirnyy <suimin.tu.mu.ga.mi@gmail.com>",
"contributors": [
@ -43,9 +43,9 @@
"@types/command-exists": "^1.2.0",
"@types/discord-rpc": "^4.0.0",
"@types/semver": "^7.3.9",
"electron": "^16.0.1",
"electron": "^16.0.2",
"electron-builder": "^22.14.5",
"sass": "^1.43.4",
"sass": "^1.43.5",
"typescript": "^4.5.2"
},
"dependencies": {

View file

@ -19,7 +19,8 @@
<body>
<div class="menu">
<div class="menu-item menu-item-active" anchor="general" i18id="GeneralSettings">General</div>
<div class="menu-item menu-item-active" anchor="general" i18id="General">General</div>
<div class="menu-item" anchor="enhancements" i18id="Enhancements">Enhancements</div>
<div class="menu-item" anchor="runners" i18id="WineVersion">Wine version</div>
<div class="menu-item" anchor="dxvks" i18id="DXVK">DXVK</div>
<div class="menu-item" anchor="shaders" i18id="Shaders">Shaders</div>
@ -29,7 +30,7 @@
<div class="settings">
<div class="settings-item" id="general">
<h2 i18id="GeneralSettings">General</h2>
<h2 i18id="General">General</h2>
<div class="select" id="language">
<span i18id="Language">Language</span>
@ -55,7 +56,7 @@
<div class="selected-item">
<span>English (US)</span>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 330.002 330.002" xml:space="preserve"><path id="XMLID_226_" d="M233.252,155.997L120.752,6.001c-4.972-6.628-14.372-7.97-21-3c-6.628,4.971-7.971,14.373-3,21 l105.75,140.997L96.752,306.001c-4.971,6.627-3.627,16.03,3,21c2.698,2.024,5.856,3.001,8.988,3.001 c4.561,0,9.065-2.072,12.012-6.001l112.5-150.004C237.252,168.664,237.252,161.33,233.252,155.997z"/></svg>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 330.002 330.002" xml:space="preserve"><path d="M233.252,155.997L120.752,6.001c-4.972-6.628-14.372-7.97-21-3c-6.628,4.971-7.971,14.373-3,21 l105.75,140.997L96.752,306.001c-4.971,6.627-3.627,16.03,3,21c2.698,2.024,5.856,3.001,8.988,3.001 c4.561,0,9.065-2.072,12.012-6.001l112.5-150.004C237.252,168.664,237.252,161.33,233.252,155.997z"/></svg>
</div>
</div>
@ -76,12 +77,44 @@
<div class="selected-item hint--top hint--medium">
<span>English (US)</span>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 330.002 330.002" xml:space="preserve"><path id="XMLID_226_" d="M233.252,155.997L120.752,6.001c-4.972-6.628-14.372-7.97-21-3c-6.628,4.971-7.971,14.373-3,21 l105.75,140.997L96.752,306.001c-4.971,6.627-3.627,16.03,3,21c2.698,2.024,5.856,3.001,8.988,3.001 c4.561,0,9.065-2.072,12.012-6.001l112.5-150.004C237.252,168.664,237.252,161.33,233.252,155.997z"/></svg>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 330.002 330.002" xml:space="preserve"><path d="M233.252,155.997L120.752,6.001c-4.972-6.628-14.372-7.97-21-3c-6.628,4.971-7.971,14.373-3,21 l105.75,140.997L96.752,306.001c-4.971,6.627-3.627,16.03,3,21c2.698,2.024,5.856,3.001,8.988,3.001 c4.561,0,9.065-2.072,12.012-6.001l112.5-150.004C237.252,168.664,237.252,161.33,233.252,155.997z"/></svg>
</div>
</div>
<br>
<div class="select" id="gpu">
<span>GPU</span>
<div class="select-options">
<ul>
<li value="default">Default</li>
</ul>
</div>
<div class="selected-item">
<span>Default</span>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 330.002 330.002" xml:space="preserve"><path d="M233.252,155.997L120.752,6.001c-4.972-6.628-14.372-7.97-21-3c-6.628,4.971-7.971,14.373-3,21 l105.75,140.997L96.752,306.001c-4.971,6.627-3.627,16.03,3,21c2.698,2.024,5.856,3.001,8.988,3.001 c4.561,0,9.065-2.072,12.012-6.001l112.5-150.004C237.252,168.664,237.252,161.33,233.252,155.997z"/></svg>
</div>
</div>
<br>
<div class="checkbox" id="discord-rpc">
Discord RPC
<div class="checkbox-mark">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="45.701px" height="45.7px" viewBox="0 0 45.701 45.7" xml:space="preserve"><g><g><path d="M20.687,38.332c-2.072,2.072-5.434,2.072-7.505,0L1.554,26.704c-2.072-2.071-2.072-5.433,0-7.504 c2.071-2.072,5.433-2.072,7.505,0l6.928,6.927c0.523,0.522,1.372,0.522,1.896,0L36.642,7.368c2.071-2.072,5.433-2.072,7.505,0 c0.995,0.995,1.554,2.345,1.554,3.752c0,1.407-0.559,2.757-1.554,3.752L20.687,38.332z"/></g></g></svg>
</div>
</div>
<br>
</div>
<div class="settings-item" id="enhancements">
<h2 i18id="Enhancements">Enhancements</h2>
<div class="select" id="hud">
<span>HUD</span>
@ -96,17 +129,7 @@
<div class="selected-item">
<span>None</span>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 330.002 330.002" xml:space="preserve"><path id="XMLID_226_" d="M233.252,155.997L120.752,6.001c-4.972-6.628-14.372-7.97-21-3c-6.628,4.971-7.971,14.373-3,21 l105.75,140.997L96.752,306.001c-4.971,6.627-3.627,16.03,3,21c2.698,2.024,5.856,3.001,8.988,3.001 c4.561,0,9.065-2.072,12.012-6.001l112.5-150.004C237.252,168.664,237.252,161.33,233.252,155.997z"/></svg>
</div>
</div>
<br>
<div class="checkbox" id="discord-rpc">
Discord RPC
<div class="checkbox-mark">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="45.701px" height="45.7px" viewBox="0 0 45.701 45.7" xml:space="preserve"><g><g><path d="M20.687,38.332c-2.072,2.072-5.434,2.072-7.505,0L1.554,26.704c-2.072-2.071-2.072-5.433,0-7.504 c2.071-2.072,5.433-2.072,7.505,0l6.928,6.927c0.523,0.522,1.372,0.522,1.896,0L36.642,7.368c2.071-2.072,5.433-2.072,7.505,0 c0.995,0.995,1.554,2.345,1.554,3.752c0,1.407-0.559,2.757-1.554,3.752L20.687,38.332z"/></g></g></svg>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 330.002 330.002" xml:space="preserve"><path d="M233.252,155.997L120.752,6.001c-4.972-6.628-14.372-7.97-21-3c-6.628,4.971-7.971,14.373-3,21 l105.75,140.997L96.752,306.001c-4.971,6.627-3.627,16.03,3,21c2.698,2.024,5.856,3.001,8.988,3.001 c4.561,0,9.065-2.072,12.012-6.001l112.5-150.004C237.252,168.664,237.252,161.33,233.252,155.997z"/></svg>
</div>
</div>
@ -118,25 +141,15 @@
<div class="checkbox-mark">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="45.701px" height="45.7px" viewBox="0 0 45.701 45.7" xml:space="preserve"><g><g><path d="M20.687,38.332c-2.072,2.072-5.434,2.072-7.505,0L1.554,26.704c-2.072-2.071-2.072-5.433,0-7.504 c2.071-2.072,5.433-2.072,7.505,0l6.928,6.927c0.523,0.522,1.372,0.522,1.896,0L36.642,7.368c2.071-2.072,5.433-2.072,7.505,0 c0.995,0.995,1.554,2.345,1.554,3.752c0,1.407-0.559,2.757-1.554,3.752L20.687,38.332z"/></g></g></svg>
</div>
</div><br>
</div>
<div class="select" id="gpu">
<span>GPU</span>
<div class="select-options">
<ul>
<li value="default">Default</li>
</ul>
</div>
<div class="selected-item">
<span>Default</span>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 330.002 330.002" xml:space="preserve">
<path id="XMLID_226_"
d="M233.252,155.997L120.752,6.001c-4.972-6.628-14.372-7.97-21-3c-6.628,4.971-7.971,14.373-3,21 l105.75,140.997L96.752,306.001c-4.971,6.627-3.627,16.03,3,21c2.698,2.024,5.856,3.001,8.988,3.001 c4.561,0,9.065-2.072,12.012-6.001l112.5-150.004C237.252,168.664,237.252,161.33,233.252,155.997z" />
</svg>
<br>
<div class="checkbox" id="autodelete-dxvk-logs">
<span i18id="AutoDeleteDXVKLogs">Auto-delete DXVK logs</span>
<div class="checkbox-mark">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="45.701px" height="45.7px" viewBox="0 0 45.701 45.7" xml:space="preserve"><g><g><path d="M20.687,38.332c-2.072,2.072-5.434,2.072-7.505,0L1.554,26.704c-2.072-2.071-2.072-5.433,0-7.504 c2.071-2.072,5.433-2.072,7.505,0l6.928,6.927c0.523,0.522,1.372,0.522,1.896,0L36.642,7.368c2.071-2.072,5.433-2.072,7.505,0 c0.995,0.995,1.554,2.345,1.554,3.752c0,1.407-0.559,2.757-1.554,3.752L20.687,38.332z"/></g></g></svg>
</div>
</div>
@ -144,7 +157,7 @@
</div>
<div class="settings-item" id="runners">
<h2 i18id="WineVersion"></h2>
<h2 i18id="WineVersion">Wine version</h2>
<div class="list" id="runners-list"></div>
</div>
@ -170,7 +183,7 @@
<div class="selected-item hint--top hint--small">
<span>None</span>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 330.002 330.002" xml:space="preserve"><path id="XMLID_226_" d="M233.252,155.997L120.752,6.001c-4.972-6.628-14.372-7.97-21-3c-6.628,4.971-7.971,14.373-3,21 l105.75,140.997L96.752,306.001c-4.971,6.627-3.627,16.03,3,21c2.698,2.024,5.856,3.001,8.988,3.001 c4.561,0,9.065-2.072,12.012-6.001l112.5-150.004C237.252,168.664,237.252,161.33,233.252,155.997z"/></svg>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 330.002 330.002" xml:space="preserve"><path d="M233.252,155.997L120.752,6.001c-4.972-6.628-14.372-7.97-21-3c-6.628,4.971-7.971,14.373-3,21 l105.75,140.997L96.752,306.001c-4.971,6.627-3.627,16.03,3,21c2.698,2.024,5.856,3.001,8.988,3.001 c4.561,0,9.065-2.072,12.012-6.001l112.5-150.004C237.252,168.664,237.252,161.33,233.252,155.997z"/></svg>
</div>
</div>

View file

@ -2,6 +2,7 @@
"Install": "Installieren",
"Update": "Updaten",
"Launch": "Starten",
"DownloadWine": "Wine Herunterladen",
"Runners": "Runners",
"Language": "Sprache",
"Voice": "Sprachpaket",
@ -12,10 +13,12 @@
"ReshadeNotInstalled": "Sie haben vkBasalt und Reshade-Shader nicht installiert",
"GameModeNotInstalled": "Sie haben GameMode nicht installiert",
"SwitcherooNotInstalled": "Sie haben switcheroo-control nicht installiert",
"AutoDeleteDXVKLogs": "DXVK-Logs automatisch löschen",
"Author": "Autor",
"NoImages": "Bilder sind nicht verfügbar",
"SettingsTitle": "Einstellungen",
"GeneralSettings": "Generell",
"General": "Generell",
"Enhancements": "Verbesserung",
"WineVersion": "Wine Version",
"Environment": "Umgebung",
"EnvironmentalVariables": "Umgebungsvariablen",

View file

@ -2,6 +2,7 @@
"Install": "Install",
"Update": "Update",
"Launch": "Launch",
"DownloadWine": "Download wine",
"Runners": "Runners",
"Language": "Language",
"Voice": "Voice Pack",
@ -12,10 +13,12 @@
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"SwitcherooNotInstalled": "You don't have switcheroo-control installed",
"AutoDeleteDXVKLogs": "Auto-delete DXVK logs",
"Author": "Author",
"NoImages": "No images added",
"SettingsTitle": "Settings",
"GeneralSettings": "General",
"General": "General",
"Enhancements": "Enhancements",
"Downloading": "Downloading",
"WineVersion": "Wine version",
"Environment": "Environment",

View file

@ -2,6 +2,7 @@
"Install": "Install",
"Update": "Update",
"Launch": "Launch",
"DownloadWine": "Download wine",
"Runners": "Runners",
"Language": "Language",
"Voice": "Voice Pack",
@ -12,10 +13,12 @@
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"SwitcherooNotInstalled": "You don't have switcheroo-control installed",
"AutoDeleteDXVKLogs": "Auto-delete DXVK logs",
"Author": "Author",
"NoImages": "No images added",
"SettingsTitle": "Settings",
"GeneralSettings": "General",
"General": "General",
"Enhancements": "Enhancements",
"WineVersion": "Wine version",
"Environment": "Environment",
"EnvironmentalVariables": "Environmental variables",

View file

@ -2,6 +2,7 @@
"Install": "Install",
"Update": "Update",
"Launch": "Launch",
"DownloadWine": "Download wine",
"Runners": "Runners",
"Language": "Language",
"Voice": "Voice Pack",
@ -12,10 +13,12 @@
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"SwitcherooNotInstalled": "You don't have switcheroo-control installed",
"AutoDeleteDXVKLogs": "Auto-delete DXVK logs",
"Author": "Author",
"NoImages": "No images added",
"SettingsTitle": "Settings",
"GeneralSettings": "General",
"General": "General",
"Enhancements": "Enhancements",
"WineVersion": "Wine version",
"Environment": "Environment",
"EnvironmentalVariables": "Environmental variables",

View file

@ -2,6 +2,7 @@
"Install": "Install",
"Update": "Update",
"Launch": "Launch",
"DownloadWine": "Download wine",
"Runners": "Runners",
"Language": "Language",
"Voice": "Voice Pack",
@ -12,10 +13,12 @@
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"SwitcherooNotInstalled": "You don't have switcheroo-control installed",
"AutoDeleteDXVKLogs": "Auto-delete DXVK logs",
"Author": "Author",
"NoImages": "No images added",
"SettingsTitle": "Settings",
"GeneralSettings": "General",
"General": "General",
"Enhancements": "Enhancements",
"WineVersion": "Wine version",
"Environment": "Environment",
"EnvironmentalVariables": "Environmental variables",

View file

@ -2,6 +2,7 @@
"Install": "Pasang",
"Update": "Perbarui",
"Launch": "Luncurkan",
"DownloadWine": "Download wine",
"Runners": "Runners",
"Language": "Bahasa",
"Voice": "Paket Suara",
@ -11,11 +12,13 @@
"Shaders": "Shader",
"ReshadeNotInstalled": "Kamu belum memasang vkBasalt dan library reshade-shaders",
"GameModeNotInstalled": "Kamu belum memasang GameMode",
"SwitcherooNotInstalled": "You don't have switcheroo-control installed",
"SwitcherooNotInstalled": "Kamu belum memasang switcheroo-control",
"AutoDeleteDXVKLogs": "Otomatis hapus log DXVK",
"Author": "Pembuat",
"NoImages": "Tidak ada gambar ditambahkan",
"SettingsTitle": "Pengaturan",
"GeneralSettings": "Umum",
"General": "Umum",
"Enhancements": "Enhancements",
"WineVersion": "Versi Wine",
"Environment": "Lingkungan",
"EnvironmentalVariables": "Variabel Lingkungan",

View file

@ -2,6 +2,7 @@
"Install": "インストール",
"Update": "アップデート",
"Launch": "打ち上げ",
"DownloadWine": "ダウンロードwine",
"Runners": "Runners",
"Language": "言語",
"Voice": "ボイスパック",
@ -11,11 +12,13 @@
"Shaders": "シェーダ",
"ReshadeNotInstalled": "vkBasaltとreshade-shadersライブラリをインストールしていません",
"GameModeNotInstalled": "GameModeドがインストールされていません",
"SwitcherooNotInstalled": "You don't have switcheroo-control installed",
"SwitcherooNotInstalled": "Switcheroo-controlがインストールされていません",
"AutoDeleteDXVKLogs": "DXVKログの自動削除",
"Author": "著者",
"NoImages": "画像は追加されていません",
"SettingsTitle": "設定",
"GeneralSettings": "一般",
"General": "一般",
"Enhancements": "拡張機能",
"Downloading": "ダウンロード中",
"WineVersion": "ワインバージョン",
"Environment": "環境",

View file

@ -2,6 +2,7 @@
"Install": "설치",
"Update": "업데이트",
"Launch": "발사",
"DownloadWine": "Wine 다운로드",
"Runners": "주자",
"Language": "언어",
"Voice": "음성 팩",
@ -11,11 +12,13 @@
"Shaders": "쉐이더",
"ReshadeNotInstalled": "vkBasalt 및 reshade-shaders 라이브러리를 설치하지 않았습니다",
"GameModeNotInstalled": "GameMode 가 설치되어 있지 않습니다",
"SwitcherooNotInstalled": "You don't have switcheroo-control installed",
"SwitcherooNotInstalled": "Switcheroo-control 이 설치되어 있지 않습니다",
"AutoDeleteDXVKLogs": "DXVK 로그 자동 삭제",
"Author": "저자",
"NoImages": "추가 된 이미지 없음",
"SettingsTitle": "설정",
"GeneralSettings": "일반",
"General": "일반",
"Enhancements": "향상된 기능",
"WineVersion": "와인 버전",
"Environment": "환경",
"EnvironmentalVariables": "환경 변수",

View file

@ -2,6 +2,7 @@
"Install": "Install",
"Update": "Update",
"Launch": "Launch",
"DownloadWine": "Download wine",
"Runners": "Runners",
"Language": "Language",
"Voice": "Voice Pack",
@ -12,10 +13,12 @@
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"SwitcherooNotInstalled": "You don't have switcheroo-control installed",
"AutoDeleteDXVKLogs": "Auto-delete DXVK logs",
"Author": "Author",
"NoImages": "No images added",
"SettingsTitle": "Settings",
"GeneralSettings": "General",
"General": "General",
"Enhancements": "Enhancements",
"WineVersion": "Wine version",
"Environment": "Environment",
"EnvironmentalVariables": "Environmental variables",

View file

@ -2,6 +2,7 @@
"Install": "Установить",
"Update": "Обновить",
"Launch": "Запустить",
"DownloadWine": "Скачать wine",
"Runners": "Версии Wine",
"Language": "Язык",
"Voice": "Озвучка",
@ -11,11 +12,13 @@
"Shaders": "Шейдеры",
"ReshadeNotInstalled": "Вы не установили vkBasalt и библиотеку reshade-shaders",
"GameModeNotInstalled": "Вы не установили GameMode",
"SwitcherooNotInstalled": "You don't have switcheroo-control installed",
"SwitcherooNotInstalled": "Вы не установили switcheroo-control",
"AutoDeleteDXVKLogs": "Автоудаление логов DXVK",
"Author": "Автор",
"NoImages": "Изображения не добавлены",
"SettingsTitle": "Настройки",
"GeneralSettings": "Общее",
"General": "Общее",
"Enhancements": "Улучшения",
"WineVersion": "Версии Wine",
"Environment": "Окружение",
"EnvironmentalVariables": "Переменные окружения",

View file

@ -2,6 +2,7 @@
"Install": "Install",
"Update": "Update",
"Launch": "Launch",
"DownloadWine": "Download wine",
"Runners": "Runners",
"Language": "Language",
"Voice": "Voice Pack",
@ -12,10 +13,12 @@
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"SwitcherooNotInstalled": "You don't have switcheroo-control installed",
"AutoDeleteDXVKLogs": "Auto-delete DXVK logs",
"Author": "Author",
"NoImages": "No images added",
"SettingsTitle": "Settings",
"GeneralSettings": "General",
"General": "General",
"Enhancements": "Enhancements",
"WineVersion": "Wine version",
"Environment": "Environment",
"EnvironmentalVariables": "Environmental variables",

View file

@ -2,6 +2,7 @@
"Install": "Install",
"Update": "Update",
"Launch": "Launch",
"DownloadWine": "Download wine",
"Runners": "Runners",
"Language": "Language",
"Voice": "Voice Pack",
@ -12,10 +13,12 @@
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"SwitcherooNotInstalled": "You don't have switcheroo-control installed",
"AutoDeleteDXVKLogs": "Auto-delete DXVK logs",
"Author": "Author",
"NoImages": "No images added",
"SettingsTitle": "Settings",
"GeneralSettings": "General",
"General": "General",
"Enhancements": "Enhancements",
"WineVersion": "Wine version",
"Environment": "Environment",
"EnvironmentalVariables": "Environmental variables",

View file

@ -2,6 +2,7 @@
"Install": "安装",
"Update": "更新",
"Launch": "发射",
"DownloadWine": "Download wine",
"Runners": "Runners",
"Language": "语言",
"Voice": "语音包",
@ -12,10 +13,12 @@
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"SwitcherooNotInstalled": "You don't have switcheroo-control installed",
"AutoDeleteDXVKLogs": "Auto-delete DXVK logs",
"Author": "Author",
"NoImages": "No images added",
"SettingsTitle": "设置",
"GeneralSettings": "一般的",
"General": "一般的",
"Enhancements": "Enhancements",
"Downloading": "下载",
"WineVersion": "葡萄酒版",
"Environment": "Environment",

View file

@ -2,6 +2,7 @@
"Install": "安裝",
"Update": "更新",
"Launch": "啟動遊戲",
"DownloadWine": "Download wine",
"Runners": "執行器",
"Language": "界面語言",
"Voice": "語音包",
@ -12,10 +13,12 @@
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"SwitcherooNotInstalled": "You don't have switcheroo-control installed",
"AutoDeleteDXVKLogs": "Auto-delete DXVK logs",
"Author": "Author",
"NoImages": "No images added",
"SettingsTitle": "設定",
"GeneralSettings": "一般設定",
"General": "一般設定",
"Enhancements": "Enhancements",
"Downloading": "下載",
"WineVersion": "Wine 版本",
"Environment": "Environment",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View file

@ -250,7 +250,9 @@ $secondary: #e1e7ff
font-size: smaller
border-radius: 8px
padding: 8px 12px
margin: 0 -4px
&:hover:not([disabled])
background-color: $light2

View file

@ -179,6 +179,24 @@ $(() => {
fs.writeFileSync(launcherShadersFile, fs.readFileSync(userShadersFile));
}
/**
* GPU selection
*/
if (LauncherLib.getConfig('gpu') != 'default')
{
const gpu = await SwitcherooControl.getGpuByName(LauncherLib.getConfig('gpu'));
if (gpu)
{
env = {
...env,
...SwitcherooControl.getEnvAsObject(gpu)
};
}
else console.warn(`GPU ${LauncherLib.getConfig('gpu')} not found. Launching on the default GPU`);
}
let command = `${wineExeutable} launcher.bat`;
/**
@ -186,16 +204,8 @@ $(() => {
*/
if (LauncherLib.getConfig('gamemode'))
command = `gamemoderun ${command}`;
// GPU
if (LauncherLib.getConfig('gpu') != 'default') {
const gpu = await SwitcherooControl.getGpuByName(LauncherLib.getConfig('gpu'));
if (gpu) {
env = { ...env, ...SwitcherooControl.getEnvAsObject(gpu) };
} else {
console.warn(`GPU ${LauncherLib.getConfig('gpu')} not found. Launching on the default GPU.`);
}
}
console.log(`Execution command: ${command}`);
// Starting the game
const startTime = Date.now();
@ -225,10 +235,23 @@ $(() => {
largeImageText: 'An Anime Game Launcher'
});
}
console.log(err);
if (LauncherLib.getConfig('autodelete_dxvk_logs'))
{
fs.readdirSync(constants.gameDir).forEach((file: string) => {
if (path.extname(file) == '.log')
{
fs.unlinkSync(path.join(constants.gameDir, file));
console.log(`Removed log file: ${file}`);
}
});
}
console.log(stdout);
console.log(stderr);
if (err)
console.error(stderr);
});
ipcRenderer.invoke('hide-window');
@ -247,6 +270,44 @@ $(() => {
}, data => console.log(data.toString()));
}
// Download default wine because we don't have it
else if (LauncherUI.launcherState == 'wine-installation-required')
{
const runners = await LauncherLib.getRunners();
let defaultRunner = runners[0].runners[0];
// Search defaul runner to download (Proton-6.20-GE-1)
runners.forEach(category => {
category.runners.forEach(runner => {
if (runner.name == 'Proton-6.20-GE-1')
defaultRunner = runner;
});
});
LauncherUI.setState('wine-installing');
Tools.downloadFile(defaultRunner.uri, path.join(constants.launcherDir, defaultRunner.name)).then(() => {
const unpacker = defaultRunner.archive === 'tar' ?
Tools.untar : Tools.unzip;
unpacker(
path.join(constants.launcherDir, defaultRunner.name),
defaultRunner.makeFolder ?
path.join(constants.runnersDir, defaultRunner.folder) :
constants.runnersDir
).then(() => {
fs.unlinkSync(path.join(constants.launcherDir, defaultRunner.name));
LauncherLib.updateConfig('runner.name', defaultRunner.name);
LauncherLib.updateConfig('runner.folder', defaultRunner.folder);
LauncherLib.updateConfig('runner.executable', defaultRunner.executable);
LauncherUI.updateLauncherState();
});
});
}
// Voice pack update
else if (LauncherUI.launcherState == 'game-voice-update-required')
{

View file

@ -32,8 +32,9 @@ const config = new store ({
playtime: 0, // Number of seconds user spent in game
hud: 'none', // none / dxvk / mangohud
shaders: 'none', // none / shader's folder
gamemode: false,
gpu: 'default',
gamemode: false, // GameMode
gpu: 'default', // GPU
autodelete_dxvk_logs: false, // Auto-delete DXVK logs
// Version of the game we asked about analytics last time,
// or null if user said don't ask him again
@ -246,30 +247,38 @@ export default class LauncherLib
];
return new Promise((resolve) => {
let installationProgress = 0;
const winetricksSh = path.join(constants.launcherDir, 'winetricks.sh');
let installerProcess = spawn('winetricks', ['corefonts', 'usetakefocus=n'], {
env: {
...process.env,
WINEPREFIX: prefixpath
}
});
Tools.downloadFile(constants.uri.winetricks, winetricksSh).then(() => {
let installationProgress = 0;
installerProcess.stdout.on('data', (data: string) => {
let str = data.toString();
for (let i = 0; i < installationSteps.length; ++i)
if (str.includes(installationSteps[i]))
{
installationProgress = i + 1;
break;
let installerProcess = spawn('bash', [winetricksSh, 'corefonts', 'usetakefocus=n'], {
env: {
...process.env,
WINEPREFIX: prefixpath
}
progress(str, installationProgress, installationSteps.length);
});
});
installerProcess.on('close', () => resolve());
installerProcess.stdout.on('data', (data: string) => {
let str = data.toString();
for (let i = 0; i < installationSteps.length; ++i)
if (str.includes(installationSteps[i]))
{
installationProgress = i + 1;
break;
}
progress(str, installationProgress, installationSteps.length);
});
installerProcess.on('close', () => {
fs.unlinkSync(winetricksSh);
resolve();
});
});
});
}

View file

@ -6,6 +6,8 @@ import i18n from './i18n';
import Tools from './Tools';
import Colors from './Colors';
const commandExists = require('command-exists').sync;
type LauncherState =
'patch-unavailable' |
'test-patch-available' |
@ -13,6 +15,8 @@ type LauncherState =
'game-update-available' |
'game-installation-available' |
'game-voice-update-required' |
'wine-installation-required' |
'wine-installing' |
'game-launch-available';
export default class LauncherUI
@ -83,6 +87,17 @@ export default class LauncherUI
break;
case 'wine-installation-required':
$('#launch').text(this.i18n.translate('DownloadWine'));
break;
case 'wine-installing':
$('#launch').text(this.i18n.translate('Downloading'));
$('#launch').attr('disabled', 'disabled');
break;
case 'game-launch-available':
$('#launch').removeAttr('disabled')
.removeAttr('data-hint');
@ -154,6 +169,10 @@ export default class LauncherUI
}, data => console.log(data.toString()));
}
// If we don't have wine or any runner installed
else if (LauncherLib.getConfig('runner') === null && !commandExists('wine'))
this.setState('wine-installation-required');
else this.setState('game-launch-available');
}

View file

@ -1,4 +1,5 @@
import * as dbus from 'dbus-next';
const bus = dbus.systemBus();
let switcherooProxy: dbus.ProxyObject,
@ -9,46 +10,58 @@ bus.getProxyObject('net.hadess.SwitcherooControl', '/net/hadess/SwitcherooContro
switcherooRunning = true;
}, () => switcherooRunning = false);
interface GPU {
interface GPU
{
Default: dbus.Variant<boolean>,
Environment: dbus.Variant<string[]>,
Name: dbus.Variant<string>
}
export default class SwitcherooControl {
public static waitReady() {
export default class SwitcherooControl
{
public static waitReady()
{
const poll = (resolve: () => void, reject: () => void) => {
if (switcherooRunning === false) reject();
if (switcherooProxy) resolve();
if (switcherooRunning === false)
reject();
else if (switcherooProxy)
resolve();
else setTimeout(poll, 100, resolve, reject);
};
return new Promise<void>(poll)
return new Promise<void>(poll);
}
public static getGpus() {
if (!switcherooRunning) return null;
public static getGpus()
{
if (!switcherooRunning)
return null;
const properties = switcherooProxy.getInterface("org.freedesktop.DBus.Properties");
const gpus: Promise<dbus.Variant<GPU[]>> = properties.Get('net.hadess.SwitcherooControl', 'GPUs');
return gpus;
}
public static async getGpuByName(name: string) {
public static async getGpuByName(name: string)
{
const gpus = await SwitcherooControl.getGpus();
if (!gpus) return null;
if (!gpus)
return null;
return gpus.value.find(gpu => gpu.Name.value === name);
}
//switcheroo-control returns env vars as an array like this: ["NAME1", "VALUE1", "NAME2", "VALUE2"], but we want them as an object
public static getEnvAsObject(gpu: GPU) {
public static getEnvAsObject(gpu: GPU)
{
const env: any = {};
for (let i = 0; i < gpu.Environment.value.length; i += 2) {
for (let i = 0; i < gpu.Environment.value.length; i += 2)
env[gpu.Environment.value[i]] = gpu.Environment.value[i + 1];
}
return env;
}
}
}

View file

@ -26,7 +26,8 @@ export default class constants
telemetry: [
`log-upload-os.${this.placeholders.lowercase.company}.com`,
'overseauspider.yuanshen.com'
]
],
winetricks: 'https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks'
};
// TODO: cache drops at that dates instead of the 7 days period

View file

@ -26,7 +26,7 @@ $(() => {
});
$('.settings').on('scroll', () => {
let anchor = $('.settings-item').filter((index, item) => $(item).offset()!.top < 180).last()[0]!.id; // 264
const anchor = $('.settings-item').filter((index, item) => $(item).offset()!.top < 180).last()[0]!.id; // 264
$('.menu-item').removeClass('menu-item-active');
$(`.menu-item[anchor=${anchor}]`).addClass('menu-item-active');
@ -40,9 +40,7 @@ $(() => {
$('#language .selected-item span').text($(`#language li[value=${LauncherLib.getConfig('lang.launcher')}]`).text());
$('#language').on('selectionChanged', (e, data: any) => {
let activeLang = LauncherLib.getConfig('lang.launcher');
if (activeLang != data.value)
if (LauncherLib.getConfig('lang.launcher') != data.value)
{
LauncherLib.updateConfig('lang.launcher', data.value);
LauncherLib.updateConfig('background.time', null);
@ -62,9 +60,7 @@ $(() => {
$('#voicepack .selected-item span').text($(`#voicepack li[value=${LauncherLib.getConfig('lang.voice.active')}]`).text());
$('#voicepack').on('selectionChanged', (e, data: any) => {
let activeLang = LauncherLib.getConfig('lang.voice.active');
if (activeLang != data.value)
if (LauncherLib.getConfig('lang.voice.active') != data.value)
{
LauncherLib.updateConfig('lang.voice.active', data.value);
@ -109,6 +105,17 @@ $(() => {
ipcRenderer.send('rpc-toggle');
});
/**
* Auto-delete DXVK logs
*/
if (LauncherLib.getConfig('rpc'))
$('#autodelete-dxvk-logs').addClass('checkbox-active');
$('#autodelete-dxvk-logs').on('classChange', () => {
LauncherLib.updateConfig('autodelete_dxvk_logs', $('#autodelete-dxvk-logs').hasClass('checkbox-active'));
});
/**
* GameMode
*/
@ -132,24 +139,31 @@ $(() => {
LauncherLib.updateConfig('gamemode', $('#gamemode').hasClass('checkbox-active'));
});
/**
* GPU selection
*/
SwitcherooControl.waitReady().then(async () => {
const gpus = await SwitcherooControl.getGpus()
if (gpus) {
const gpus = await SwitcherooControl.getGpus();
if (gpus)
{
console.log(gpus);
for (const gpu of gpus.value) {
$(`<li value="${gpu.Name.value}">${gpu.Name.value}</li>`).appendTo("#gpu .select-options ul");
}
for (const gpu of gpus.value)
$(`<li value="${gpu.Name.value}">${gpu.Name.value}</li>`).appendTo('#gpu .select-options ul');
}
}, () => {
console.log("switcheroo-control not running");
$("#gpu .selected-item")
.addClass("hint--top hint--medium")
.attr("data-hint", LauncherUI.i18n.translate("SwitcherooNotInstalled"));
console.log('switcheroo-control not running');
$('#gpu .selected-item')
.addClass('hint--top hint--medium')
.attr('data-hint', LauncherUI.i18n.translate('SwitcherooNotInstalled'));
});
$('#gpu').on('selectionChanged', (e, data: any) => {
LauncherLib.updateConfig('gpu', data.value);
})
});
/**
* Shaders
@ -317,7 +331,7 @@ $(() => {
Tools.downloadFile(runner.uri, path.join(constants.launcherDir, runner.name), (current: number, total: number, difference: number) => {
span.text(`${ Math.round(current / total * 100) }%`);
}).then(() => {
let unpacker = runner.archive === 'tar' ?
const unpacker = runner.archive === 'tar' ?
Tools.untar : Tools.unzip;
unpacker(