Skip to content

Commit

Permalink
v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
froquede committed Feb 10, 2024
1 parent b628411 commit 08c75c8
Show file tree
Hide file tree
Showing 16 changed files with 815 additions and 66 deletions.
32 changes: 20 additions & 12 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,42 @@ require('node-netstat')({
require("request")("http://localhost:420/internal/maximize");
setTimeout(() => {
process.exit();
}, 1e3);
}, 200);
}
});

require("./config.js");

const steamPath = require("steam-path");
let searching = false;
function findGameSteam() {
function findGameSteam(menu) {
if (global.config.gamePath) {
getGameVersion();
getGameVersion(menu);
}

searching = true;
steamPath.getAppPath(962730).then(result => {
global.set('gamePath', result.path);

getGameVersion();
getGameVersion(menu);
searching = false;
}).catch(err => {
console.log(err, "Game not found via steam");
searching = false;
menu.getMenuItemById('actions').enabled = false;
menu.getMenuItemById('folders').enabled = false;
});
}

function getGameVersion() {
function getGameVersion(menu) {
require('child_process').exec(`wmic datafile where name='${global.config.gamePath.split('\\').join('\\\\')}\\\\SkaterXL.exe' get Version`, (err, stdout) => {
if(!err) {
if(stdout.split('2019.4.40').length > 1) return global.set('gameVersion', '1.2.6.0');
console.log(stdout);
menu.getMenuItemById('umm').enabled = true;
if(stdout.split('2019.4.40.50731').length > 1) return global.set('gameVersion', '1.2.7.8');
if(stdout.split('2019.3.15').length > 1) return global.set('gameVersion', '1.2.2.8');
global.set('gameVersion', 'unknown');
menu.getMenuItemById('umm').enabled = false;
}
else console.log(err);
})
Expand All @@ -79,8 +84,6 @@ function getMods(menu) {
}
});
}

findGameSteam();

function init() {
const app_path = app.getAppPath();
Expand All @@ -96,14 +99,14 @@ function init() {
function createWindow () {
mainWindow = new BrowserWindow({
width: 900,
height: 600,
frame:false,
height: 642,
frame: false,
show: true,
webPreferences: {},
icon: nativeImage.createFromPath(path.resolve(app_path, './webapp/XLhubIcon.ico'))
});
mainWindow.webContents.setFrameRate(60);
mainWindow.resizable = false;
//mainWindow.resizable = false;
mainWindow.loadURL('http://localhost:420')
mainWindow.setMenuBarVisibility(false);

Expand All @@ -130,9 +133,11 @@ function init() {
click() { show(); }
},
{
id: 'actions',
label: 'Actions',
submenu: [
{
id: 'umm',
label: 'Install UnityModManager',
click() {
show();
Expand All @@ -143,11 +148,13 @@ function init() {
console.log(err);
mainWindow.webContents.executeJavaScript('UMMInstallError()');
});
}
},
enabled: false
}
]
},
{
id: 'folders',
label: 'Folders',
submenu: [
{
Expand Down Expand Up @@ -200,6 +207,7 @@ function init() {
tray.setToolTip('XLhub')
tray.setContextMenu(menu)

findGameSteam(menu);
getMods(menu);

tray.on('double-click', (e) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "XLhub",
"keywords": [],
"main": "./main.js",
"version": "1.3.0",
"version": "1.4.0",
"author": "froquede",
"scripts": {
"start": "electron-forge start",
Expand Down
Binary file added resources/UMM_1278/Assembly-CSharp.dll
Binary file not shown.
Binary file not shown.
Binary file added resources/UMM_1278/UnityModManager/0Harmony.dll
Binary file not shown.
Binary file not shown.
9 changes: 9 additions & 0 deletions resources/UMM_1278/UnityModManager/Config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Config xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="Skater XL">
<Folder>Skater XL</Folder>
<ModsDirectory>Mods</ModsDirectory>
<ModInfo>Info.json</ModInfo>
<EntryPoint>[Assembly-CSharp.dll]TitleScreen.OnEnter:After</EntryPoint>
<StartingPoint>[Assembly-CSharp.dll]TitleScreen.OnEnter:After</StartingPoint>
<MinimalManagerVersion>0.12.5</MinimalManagerVersion>
</Config>
35 changes: 35 additions & 0 deletions resources/UMM_1278/UnityModManager/Params.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Param xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Hotkey>
<keyCode>None</keyCode>
<modifiers>0</modifiers>
</Hotkey>
<CheckUpdates>1</CheckUpdates>
<ShowOnStart>0</ShowOnStart>
<WindowWidth>960</WindowWidth>
<WindowHeight>720</WindowHeight>
<UIScale>0.938829839</UIScale>
<UIFont>Arial</UIFont>
<ModParams>
<Mod Id="XXLMod3" Enabled="true" />
<Mod Id="better-replay" Enabled="true" />
<Mod Id="BetterObjectDropperV2" Enabled="true" />
<Mod Id="BillORumble" Enabled="true" />
<Mod Id="BonedOllieMod" Enabled="true" />
<Mod Id="BreakFX" Enabled="true" />
<Mod Id="DeckFX" Enabled="true" />
<Mod Id="DeckFXMenuFix" Enabled="true" />
<Mod Id="fro-mod" Enabled="true" />
<Mod Id="grabs-customizer" Enabled="true" />
<Mod Id="multimod" Enabled="true" />
<Mod Id="multiplayer-admin" Enabled="true" />
<Mod Id="MultiplayerPlusPlusMod" Enabled="true" />
<Mod Id="SoundMod" Enabled="true" />
<Mod Id="TransitionModifier" Enabled="true" />
<Mod Id="XLGearModifier" Enabled="true" />
<Mod Id="walking-mod" Enabled="true" />
<Mod Id="XLGraphics" Enabled="true" />
<Mod Id="XLMenuMod" Enabled="true" />
<Mod Id="XLWeather" Enabled="true" />
</ModParams>
</Param>
Binary file not shown.
Loading

0 comments on commit 08c75c8

Please sign in to comment.