mirror of
https://github.com/open-goal/launcher.git
synced 2024-10-20 04:57:38 -04:00
getting the iso file from the user and extracting the assets working properly
This commit is contained in:
parent
5b3db5ef61
commit
a80414adb9
8
src/assets/scripts/batch/extract-iso.bat
Normal file
8
src/assets/scripts/batch/extract-iso.bat
Normal file
|
@ -0,0 +1,8 @@
|
|||
:: mount the ISO File
|
||||
PowerShell Mount-DiskImage -ImagePath "%USERPROFILE%\AppData\Roaming\opengoal-launcher\iso\jak.iso"
|
||||
|
||||
:: extract the folders & files from the ISO File
|
||||
xcopy G:\*.* %USERPROFILE%\AppData\Roaming\opengoal-launcher\iso\jak1\. /E /Y
|
||||
|
||||
:: unmount the ISO File
|
||||
PowerShell Dismount-DiskImage -ImagePath "%USERPROFILE%\AppData\Roaming\opengoal-launcher\iso\jak.iso"
|
|
@ -35,7 +35,7 @@
|
|||
<!-- buttons -->
|
||||
<div id="buttons" class="row justify-content-center">
|
||||
<!-- config button -->
|
||||
<button id="config" type="button" class="btn btn-success">CONFIG</button>
|
||||
<button id="config" type="button" class="btn btn-success" onclick="config()">CONFIG</button>
|
||||
<!-- play button -->
|
||||
<button id="play" type="button" class="btn btn-success">PLAY</button>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,7 @@ const { app, BrowserWindow, ipcMain } = require('electron');
|
|||
const path = require('path');
|
||||
const isDev = !app.isPackaged;
|
||||
const { launchGame, buildGame, isoSeries, fetchLatestCommit } = require('./js/utils/utils.js');
|
||||
let mainWindow;
|
||||
|
||||
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
|
||||
if (require('electron-squirrel-startup')) {
|
||||
|
@ -11,7 +12,7 @@ if (require('electron-squirrel-startup')) {
|
|||
|
||||
const createWindow = () => {
|
||||
// Create the browser window.
|
||||
const mainWindow = new BrowserWindow({
|
||||
mainWindow = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
resizable: false,
|
||||
|
@ -71,5 +72,5 @@ ipcMain.on('build', buildGame);
|
|||
ipcMain.on('launch', launchGame);
|
||||
|
||||
app.on('status', (status) => {
|
||||
win.webContents.send('status', status);
|
||||
mainWindow.webContents.send('status', status);
|
||||
});
|
|
@ -9,6 +9,7 @@ const offcanvas = document.querySelector(".offcanvas-start");
|
|||
let backdrop = document.querySelector('.offcanvas-backdrop');
|
||||
const background = document.querySelector('#background');
|
||||
const logo = document.querySelector('#logo');
|
||||
const configButton = document.querySelector("#config");
|
||||
|
||||
const { recieve, send } = window.api;
|
||||
|
||||
|
@ -57,4 +58,8 @@ function changeGame(game) {
|
|||
logo.src = "../assets/images/jak1-logo.png";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function config() {
|
||||
send('getISO');
|
||||
}
|
|
@ -70,7 +70,7 @@ function extractISOFile(callback) {
|
|||
// }
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
const extractISOScript = path.join(__dirname, '../../src/assets/scripts/batch/extract-iso.bat');
|
||||
const extractISOScript = path.join(__dirname, '../../assets/scripts/batch/extract-iso.bat');
|
||||
shell.openPath(extractISOScript);
|
||||
|
||||
// copy the iso contents to the jak1 folder created above
|
||||
|
|
Loading…
Reference in a new issue