Skip to content

Commit

Permalink
Merge pull request #31 from HiveGamesOSS/develop
Browse files Browse the repository at this point in the history
1.1.1
  • Loading branch information
clankstar authored Sep 6, 2024
2 parents 3de8fa0 + 35e1d7a commit 79e9191
Show file tree
Hide file tree
Showing 7 changed files with 1,337 additions and 335 deletions.
5 changes: 5 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ tasks.register<NpmTask>("build") {
description = "Run npm build"
args.set(listOf("run", "build"))

// Clean dist folder
doFirst {
delete(layout.projectDirectory.dir("electron").dir("dist"))
}

// Ensure dependencies are installed and we have a packagedChunker
val jpackage = project(":cli").tasks.named("jpackage");
dependsOn("installDependencies", jpackage)
Expand Down
8 changes: 4 additions & 4 deletions app/electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chunker-electron",
"version": "1.1.0",
"version": "1.1.1",
"description": "Convert worlds between Java and Bedrock.",
"private": true,
"main": "src/index.js",
Expand All @@ -14,8 +14,8 @@
"author": "Hive Games Limited",
"license": "MIT",
"devDependencies": {
"electron": "32.0.1",
"electron-builder": "24.13.3",
"electron": "32.0.2",
"electron-builder": "25.0.5",
"git-last-commit": "^1.0.1"
},
"build": {
Expand Down Expand Up @@ -54,7 +54,7 @@
"dependencies": {
"archiver": "^7.0.1",
"electron-dl": "^4.0.0",
"electron-log": "^5.1.7",
"electron-log": "^5.2.0",
"fs-extra": "^11.2.0",
"jszip": "^3.10.1"
}
Expand Down
6 changes: 6 additions & 0 deletions app/electron/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const createWindow = () => {
minWidth: 560,
webPreferences: {
devTools: true,
partition: "window-" + crypto.randomUUID(),
preload: path.join(__dirname, "preload.js")
}
});
Expand Down Expand Up @@ -300,6 +301,11 @@ app.whenReady().then(() => {

// Create window
createWindow();

// Handle creating more windows
app.on("activate", function () {
createWindow();
});
})

// Quit when all windows are closed.
Expand Down
5 changes: 5 additions & 0 deletions app/electron/src/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ export class Session {
if (!executable || executable.endsWith("/")) {
let cliDirectory = executable ?? path.join(path.dirname(app.getAppPath()), "chunker-cli");

// If the cli directory isn't found, try using .app on the end
if (!fs.existsSync(cliDirectory) && fs.existsSync(cliDirectory + ".app")) {
cliDirectory = path.join(cliDirectory + ".app", "Contents", "MacOS");
}

// Use the bin directory if it's present for the executable
if (fs.existsSync(path.join(cliDirectory, "bin"))) {
cliDirectory = path.join(cliDirectory, "bin");
Expand Down
Loading

0 comments on commit 79e9191

Please sign in to comment.