Merge branch 'main' of lane/an-anime-game-launcher into main

This commit is contained in:
Observer KRypt0n_ 2021-11-25 11:15:48 +00:00 committed by Gogs
commit 73d407cdb0
18 changed files with 49 additions and 1 deletions

View file

@ -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> <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>
</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> <br>
</div> </div>

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "Verwenden Sie die Home-Taste (POS 1), um Shader im Spiel ein/aus-zuschalten", "ToggleShadersText": "Verwenden Sie die Home-Taste (POS 1), um Shader im Spiel ein/aus-zuschalten",
"Shaders": "Shadern", "Shaders": "Shadern",
"ReshadeNotInstalled": "Sie haben vkBasalt und Reshade-Shader nicht installiert", "ReshadeNotInstalled": "Sie haben vkBasalt und Reshade-Shader nicht installiert",
"GameModeNotInstalled": "Sie haben GameMode nicht installiert",
"Author": "Autor", "Author": "Autor",
"NoImages": "Bilder sind nicht verfügbar", "NoImages": "Bilder sind nicht verfügbar",
"SettingsTitle": "Einstellungen", "SettingsTitle": "Einstellungen",

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "Use Home button to toggle shaders in the game", "ToggleShadersText": "Use Home button to toggle shaders in the game",
"Shaders": "Shaders", "Shaders": "Shaders",
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library", "ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"Author": "Author", "Author": "Author",
"NoImages": "No images added", "NoImages": "No images added",
"SettingsTitle": "Settings", "SettingsTitle": "Settings",

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "Use Home button to toggle shaders in the game", "ToggleShadersText": "Use Home button to toggle shaders in the game",
"Shaders": "Shaders", "Shaders": "Shaders",
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library", "ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"Author": "Author", "Author": "Author",
"NoImages": "No images added", "NoImages": "No images added",
"SettingsTitle": "Settings", "SettingsTitle": "Settings",

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "Use Home button to toggle shaders in the game", "ToggleShadersText": "Use Home button to toggle shaders in the game",
"Shaders": "Shaders", "Shaders": "Shaders",
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library", "ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"Author": "Author", "Author": "Author",
"NoImages": "No images added", "NoImages": "No images added",
"SettingsTitle": "Settings", "SettingsTitle": "Settings",

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "Use Home button to toggle shaders in the game", "ToggleShadersText": "Use Home button to toggle shaders in the game",
"Shaders": "Shaders", "Shaders": "Shaders",
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library", "ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"Author": "Author", "Author": "Author",
"NoImages": "No images added", "NoImages": "No images added",
"SettingsTitle": "Settings", "SettingsTitle": "Settings",

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "Gunakan tombol Home untuk menyalakan/mematikan shader di dalam Game", "ToggleShadersText": "Gunakan tombol Home untuk menyalakan/mematikan shader di dalam Game",
"Shaders": "Shader", "Shaders": "Shader",
"ReshadeNotInstalled": "Kamu belum memasang vkBasalt dan library reshade-shaders", "ReshadeNotInstalled": "Kamu belum memasang vkBasalt dan library reshade-shaders",
"GameModeNotInstalled": "You don't have GameMode installed",
"Author": "Pembuat", "Author": "Pembuat",
"NoImages": "Tidak ada gambar ditambahkan", "NoImages": "Tidak ada gambar ditambahkan",
"SettingsTitle": "Pengaturan", "SettingsTitle": "Pengaturan",

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "ホームボタンを使用してゲーム内のシェーダを切り替えます", "ToggleShadersText": "ホームボタンを使用してゲーム内のシェーダを切り替えます",
"Shaders": "シェーダ", "Shaders": "シェーダ",
"ReshadeNotInstalled": "vkBasaltとreshade-shadersライブラリをインストールしていません", "ReshadeNotInstalled": "vkBasaltとreshade-shadersライブラリをインストールしていません",
"GameModeNotInstalled": "You don't have GameMode installed",
"Author": "著者", "Author": "著者",
"NoImages": "画像は追加されていません", "NoImages": "画像は追加されていません",
"SettingsTitle": "設定", "SettingsTitle": "設定",

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "홈 버튼을 사용하여 게임에서 쉐이더를 전환하십시오", "ToggleShadersText": "홈 버튼을 사용하여 게임에서 쉐이더를 전환하십시오",
"Shaders": "쉐이더", "Shaders": "쉐이더",
"ReshadeNotInstalled": "vkBasalt 및 reshade-shaders 라이브러리를 설치하지 않았습니다", "ReshadeNotInstalled": "vkBasalt 및 reshade-shaders 라이브러리를 설치하지 않았습니다",
"GameModeNotInstalled": "You don't have GameMode installed",
"Author": "저자", "Author": "저자",
"NoImages": "추가 된 이미지 없음", "NoImages": "추가 된 이미지 없음",
"SettingsTitle": "설정", "SettingsTitle": "설정",

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "Use Home button to toggle shaders in the game", "ToggleShadersText": "Use Home button to toggle shaders in the game",
"Shaders": "Shaders", "Shaders": "Shaders",
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library", "ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"Author": "Author", "Author": "Author",
"NoImages": "No images added", "NoImages": "No images added",
"SettingsTitle": "Settings", "SettingsTitle": "Settings",

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "Используйте кнопку Home для переключения шейдеров в игре", "ToggleShadersText": "Используйте кнопку Home для переключения шейдеров в игре",
"Shaders": "Шейдеры", "Shaders": "Шейдеры",
"ReshadeNotInstalled": "Вы не установили vkBasalt и библиотеку reshade-shaders", "ReshadeNotInstalled": "Вы не установили vkBasalt и библиотеку reshade-shaders",
"GameModeNotInstalled": "You don't have GameMode installed",
"Author": "Автор", "Author": "Автор",
"NoImages": "Изображения не добавлены", "NoImages": "Изображения не добавлены",
"SettingsTitle": "Настройки", "SettingsTitle": "Настройки",

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "Use Home button to toggle shaders in the game", "ToggleShadersText": "Use Home button to toggle shaders in the game",
"Shaders": "Shaders", "Shaders": "Shaders",
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library", "ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"Author": "Author", "Author": "Author",
"NoImages": "No images added", "NoImages": "No images added",
"SettingsTitle": "Settings", "SettingsTitle": "Settings",

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "Use Home button to toggle shaders in the game", "ToggleShadersText": "Use Home button to toggle shaders in the game",
"Shaders": "Shaders", "Shaders": "Shaders",
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library", "ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"Author": "Author", "Author": "Author",
"NoImages": "No images added", "NoImages": "No images added",
"SettingsTitle": "Settings", "SettingsTitle": "Settings",

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "Use Home button to toggle shaders in the game", "ToggleShadersText": "Use Home button to toggle shaders in the game",
"Shaders": "Shaders", "Shaders": "Shaders",
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library", "ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"Author": "Author", "Author": "Author",
"NoImages": "No images added", "NoImages": "No images added",
"SettingsTitle": "设置", "SettingsTitle": "设置",

View file

@ -10,6 +10,7 @@
"ToggleShadersText": "Use Home button to toggle shaders in the game", "ToggleShadersText": "Use Home button to toggle shaders in the game",
"Shaders": "Shaders", "Shaders": "Shaders",
"ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library", "ReshadeNotInstalled": "You haven't installed vkBasalt and reshade-shaders library",
"GameModeNotInstalled": "You don't have GameMode installed",
"Author": "Author", "Author": "Author",
"NoImages": "No images added", "NoImages": "No images added",
"SettingsTitle": "設定", "SettingsTitle": "設定",

View file

@ -177,11 +177,17 @@ $(() => {
fs.writeFileSync(launcherShadersFile, fs.readFileSync(userShadersFile)); fs.writeFileSync(launcherShadersFile, fs.readFileSync(userShadersFile));
} }
let cmd = `${wineExeutable} launcher.bat`;
if (LauncherLib.getConfig('gamemode')) {
cmd = `gamemoderun ${cmd}`;
}
// Starting the game // Starting the game
const startTime = Date.now(); const startTime = Date.now();
exec(`${wineExeutable} launcher.bat`, { exec(cmd, {
cwd: constants.gameDir, cwd: constants.gameDir,
env: { env: {
...process.env, ...process.env,

View file

@ -32,6 +32,7 @@ const config = new store ({
playtime: 0, // Number of seconds user spent in game playtime: 0, // Number of seconds user spent in game
hud: 'none', // none / dxvk / mangohud hud: 'none', // none / dxvk / mangohud
shaders: 'none', // none / shader's folder shaders: 'none', // none / shader's folder
gamemode: false,
// Version of the game we asked about analytics last time, // Version of the game we asked about analytics last time,
// or null if user said don't ask him again // or null if user said don't ask him again

View file

@ -107,6 +107,23 @@ $(() => {
ipcRenderer.send('rpc-toggle'); 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 * Shaders
*/ */