- fixed shader's work in the builded launcher
- changed env variables overwritings priority
This commit is contained in:
Observer KRypt0n_ 2021-11-12 22:58:39 +02:00
parent ccfafd9cc8
commit 51ef9abf37
No known key found for this signature in database
GPG key ID: DC5D4EC1303465DA
2 changed files with 20 additions and 15 deletions

View file

@ -1,6 +1,6 @@
{
"name": "an-anime-game-launcher",
"version": "1.5.0",
"version": "1.5.1",
"description": "An Anime Game Linux Launcher",
"author": "Nikita Podvirnyy <suimin.tu.mu.ga.mi@gmail.com>",
"contributors": [

View file

@ -117,6 +117,17 @@ $(() => {
else
{
// Initializing Discord RPC
if (DiscordRPC.isActive())
{
DiscordRPC.setActivity({
details: 'In-Game',
largeImageKey: 'game',
largeImageText: 'An Anime Game Launcher',
startTimestamp: Date.now()
});
}
// Selecting wine executable
let wineExeutable = 'wine';
@ -158,19 +169,13 @@ $(() => {
// Shaders
if (LauncherLib.getConfig('shaders') != 'none')
{
const userShadersFile = path.join(constants.shadersDir, LauncherLib.getConfig('shaders'), 'vkBasalt.conf');
const launcherShadersFile = path.join(constants.launcherDir, 'vkBasalt.conf');
env['ENABLE_VKBASALT'] = 1;
env['VKBASALT_CONFIG_FILE'] = path.join(constants.shadersDir, LauncherLib.getConfig('shaders'), 'vkBasalt.conf');
}
// Initializing Discord RPC
if (DiscordRPC.isActive())
{
DiscordRPC.setActivity({
details: 'In-Game',
largeImageKey: 'game',
largeImageText: 'An Anime Game Launcher',
startTimestamp: Date.now()
});
env['VKBASALT_CONFIG_FILE'] = launcherShadersFile;
fs.writeFileSync(launcherShadersFile, fs.readFileSync(userShadersFile));
}
// Starting the game
@ -181,8 +186,8 @@ $(() => {
env: {
...process.env,
WINEPREFIX: constants.prefixDir,
...LauncherLib.getConfig('env'),
...env
...env, // User-defined variables should be the most important
...LauncherLib.getConfig('env')
}
}, (err: any, stdout: any, stderr: any) => {
console.log(`%c> Game closed`, 'font-size: 16px');