mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-24 18:48:14 +03:00
Merge branch 'main' of lane/an-anime-game-launcher into main
This commit is contained in:
commit
73d407cdb0
18 changed files with 49 additions and 1 deletions
|
@ -109,6 +109,16 @@
|
|||
<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 class="checkbox" id="gamemode">
|
||||
GameMode
|
||||
|
||||
<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>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "Verwenden Sie die Home-Taste (POS 1), um Shader im Spiel ein/aus-zuschalten",
|
||||
"Shaders": "Shadern",
|
||||
"ReshadeNotInstalled": "Sie haben vkBasalt und Reshade-Shader nicht installiert",
|
||||
"GameModeNotInstalled": "Sie haben GameMode nicht installiert",
|
||||
"Author": "Autor",
|
||||
"NoImages": "Bilder sind nicht verfügbar",
|
||||
"SettingsTitle": "Einstellungen",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "Use Home button to toggle shaders in the game",
|
||||
"Shaders": "Shaders",
|
||||
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
|
||||
"GameModeNotInstalled": "You don't have GameMode installed",
|
||||
"Author": "Author",
|
||||
"NoImages": "No images added",
|
||||
"SettingsTitle": "Settings",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "Use Home button to toggle shaders in the game",
|
||||
"Shaders": "Shaders",
|
||||
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
|
||||
"GameModeNotInstalled": "You don't have GameMode installed",
|
||||
"Author": "Author",
|
||||
"NoImages": "No images added",
|
||||
"SettingsTitle": "Settings",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "Use Home button to toggle shaders in the game",
|
||||
"Shaders": "Shaders",
|
||||
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
|
||||
"GameModeNotInstalled": "You don't have GameMode installed",
|
||||
"Author": "Author",
|
||||
"NoImages": "No images added",
|
||||
"SettingsTitle": "Settings",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "Use Home button to toggle shaders in the game",
|
||||
"Shaders": "Shaders",
|
||||
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
|
||||
"GameModeNotInstalled": "You don't have GameMode installed",
|
||||
"Author": "Author",
|
||||
"NoImages": "No images added",
|
||||
"SettingsTitle": "Settings",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "Gunakan tombol Home untuk menyalakan/mematikan shader di dalam Game",
|
||||
"Shaders": "Shader",
|
||||
"ReshadeNotInstalled": "Kamu belum memasang vkBasalt dan library reshade-shaders",
|
||||
"GameModeNotInstalled": "You don't have GameMode installed",
|
||||
"Author": "Pembuat",
|
||||
"NoImages": "Tidak ada gambar ditambahkan",
|
||||
"SettingsTitle": "Pengaturan",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "ホームボタンを使用してゲーム内のシェーダを切り替えます",
|
||||
"Shaders": "シェーダ",
|
||||
"ReshadeNotInstalled": "vkBasaltとreshade-shadersライブラリをインストールしていません",
|
||||
"GameModeNotInstalled": "You don't have GameMode installed",
|
||||
"Author": "著者",
|
||||
"NoImages": "画像は追加されていません",
|
||||
"SettingsTitle": "設定",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "홈 버튼을 사용하여 게임에서 쉐이더를 전환하십시오",
|
||||
"Shaders": "쉐이더",
|
||||
"ReshadeNotInstalled": "vkBasalt 및 reshade-shaders 라이브러리를 설치하지 않았습니다",
|
||||
"GameModeNotInstalled": "You don't have GameMode installed",
|
||||
"Author": "저자",
|
||||
"NoImages": "추가 된 이미지 없음",
|
||||
"SettingsTitle": "설정",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "Use Home button to toggle shaders in the game",
|
||||
"Shaders": "Shaders",
|
||||
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
|
||||
"GameModeNotInstalled": "You don't have GameMode installed",
|
||||
"Author": "Author",
|
||||
"NoImages": "No images added",
|
||||
"SettingsTitle": "Settings",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "Используйте кнопку Home для переключения шейдеров в игре",
|
||||
"Shaders": "Шейдеры",
|
||||
"ReshadeNotInstalled": "Вы не установили vkBasalt и библиотеку reshade-shaders",
|
||||
"GameModeNotInstalled": "You don't have GameMode installed",
|
||||
"Author": "Автор",
|
||||
"NoImages": "Изображения не добавлены",
|
||||
"SettingsTitle": "Настройки",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "Use Home button to toggle shaders in the game",
|
||||
"Shaders": "Shaders",
|
||||
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
|
||||
"GameModeNotInstalled": "You don't have GameMode installed",
|
||||
"Author": "Author",
|
||||
"NoImages": "No images added",
|
||||
"SettingsTitle": "Settings",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "Use Home button to toggle shaders in the game",
|
||||
"Shaders": "Shaders",
|
||||
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
|
||||
"GameModeNotInstalled": "You don't have GameMode installed",
|
||||
"Author": "Author",
|
||||
"NoImages": "No images added",
|
||||
"SettingsTitle": "Settings",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "Use Home button to toggle shaders in the game",
|
||||
"Shaders": "Shaders",
|
||||
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
|
||||
"GameModeNotInstalled": "You don't have GameMode installed",
|
||||
"Author": "Author",
|
||||
"NoImages": "No images added",
|
||||
"SettingsTitle": "设置",
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"ToggleShadersText": "Use Home button to toggle shaders in the game",
|
||||
"Shaders": "Shaders",
|
||||
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
|
||||
"GameModeNotInstalled": "You don't have GameMode installed",
|
||||
"Author": "Author",
|
||||
"NoImages": "No images added",
|
||||
"SettingsTitle": "設定",
|
||||
|
|
|
@ -177,11 +177,17 @@ $(() => {
|
|||
|
||||
fs.writeFileSync(launcherShadersFile, fs.readFileSync(userShadersFile));
|
||||
}
|
||||
|
||||
let cmd = `${wineExeutable} launcher.bat`;
|
||||
|
||||
if (LauncherLib.getConfig('gamemode')) {
|
||||
cmd = `gamemoderun ${cmd}`;
|
||||
}
|
||||
|
||||
// Starting the game
|
||||
const startTime = Date.now();
|
||||
|
||||
exec(`${wineExeutable} launcher.bat`, {
|
||||
exec(cmd, {
|
||||
cwd: constants.gameDir,
|
||||
env: {
|
||||
...process.env,
|
||||
|
|
|
@ -32,6 +32,7 @@ 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,
|
||||
|
||||
// Version of the game we asked about analytics last time,
|
||||
// or null if user said don't ask him again
|
||||
|
|
|
@ -107,6 +107,23 @@ $(() => {
|
|||
ipcRenderer.send('rpc-toggle');
|
||||
});
|
||||
|
||||
/**
|
||||
* GameMode
|
||||
*/
|
||||
|
||||
let gameModeAvailable = 0;
|
||||
process.env.PATH?.split(':').forEach(path => gameModeAvailable |= fs.existsSync(`${path}/gamemoderun`));
|
||||
|
||||
if(!gameModeAvailable)
|
||||
$(`<p>⚠️ ${LauncherUI.i18n.translate('GameModeNotInstalled')}</p>`).insertAfter('#gamemode');
|
||||
|
||||
if (LauncherLib.getConfig("gamemode"))
|
||||
$("#gamemode").addClass("checkbox-active");
|
||||
|
||||
$("#gamemode").on("classChange", () => {
|
||||
LauncherLib.updateConfig("gamemode",$("#gamemode").hasClass("checkbox-active"));
|
||||
});
|
||||
|
||||
/**
|
||||
* Shaders
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue