Skip to content

Commit

Permalink
Merge pull request #129 from HiveGamesOSS/develop
Browse files Browse the repository at this point in the history
1.4.0
  • Loading branch information
clankstar authored Nov 13, 2024
2 parents b157b5c + 8cad6be commit 86becbf
Show file tree
Hide file tree
Showing 123 changed files with 1,576,554 additions and 207 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:

- name: Sign files with Trusted Signing
uses: azure/[email protected]
if: github.repository == 'HiveGamesOSS/Chunker'
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:

- name: Sign files with Trusted Signing
uses: azure/[email protected]
if: github.repository == 'HiveGamesOSS/Chunker'
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
Expand Down Expand Up @@ -139,12 +140,26 @@ jobs:
cd artifacts && zip -r "chunker-cli-linux-amd64.zip" "chunker-cli" && cd ..
rm -rf "artifacts/chunker-cli"
- name: Compress Linux Unpacked
run: |
version="${{ github.event.inputs.version }}"
cd artifacts/linux-unpacked && zip -r "../Chunker-$version-amd64-linux.zip" . && cd ../..
rm -rf "artifacts/linux-unpacked"
- name: Rename AppImage files
run: |
for file in artifacts/*.AppImage; do
mv "$file" "${file%.AppImage}-amd64-linux.AppImage"
done
- name: Rename deb files
run: |
for file in artifacts/*.deb; do
new_file="${file//chunker-electron_/Chunker-}"
new_file="${new_file//_/-}"
mv "$file" "${new_file%.deb}-linux.deb"
done
- name: Download Windows artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -156,6 +171,12 @@ jobs:
cd artifacts && zip -r "chunker-cli-windows-x86.zip" "chunker-cli" && cd ..
rm -rf "artifacts/chunker-cli"
- name: Compress Windows Unpacked
run: |
version="${{ github.event.inputs.version }}"
cd artifacts/win-unpacked && zip -r "../Chunker-$version-windows-x86.zip" . && cd ../..
rm -rf "artifacts/win-unpacked"
- name: Rename exe files
run: |
for file in artifacts/*.exe; do
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Supported Formats:
- 1.18.0 - 1.18.30
- 1.19.0 - 1.19.80
- 1.20.0 - 1.20.80
- 1.21.0 - 1.21.40
- 1.21.0 - 1.21.50
- Java
- 1.8.8
- 1.9.0 - 1.9.3
Expand All @@ -32,7 +32,7 @@ Supported Formats:
- 1.18.0 - 1.18.2
- 1.19.0 - 1.19.4
- 1.20.0 - 1.20.6
- 1.21.0 - 1.21.3
- 1.21.0 - 1.21.4

**Microsoft Creator Docs:**
https://learn.microsoft.com/en-us/minecraft/creator/documents/chunkeroverview?view=minecraft-bedrock-stable
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ tasks.register<NpmTask>("build") {
copy {
from(layout.projectDirectory.dir("electron").dir("dist"))
into(rootProject.projectDir.resolve("build").resolve("libs").resolve(buildType))
include("chunker*", "Chunker*")
include("chunker*", "Chunker*", "*-unpacked/**")
}
}
}
Expand Down
18 changes: 11 additions & 7 deletions app/electron/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "chunker-electron",
"version": "1.3.1",
"description": "Convert worlds between Java and Bedrock.",
"private": true,
"version": "1.4.0",
"description": "Convert worlds between Java and Bedrock.",
"main": "src/index.js",
"type": "module",
"scripts": {
Expand All @@ -11,10 +11,11 @@
"publish": "node src/hook/pre-build.js && electron-builder"
},
"keywords": [],
"author": "Hive Games Limited",
"author": "Hive Games Limited <[email protected]>",
"homepage": "https://github.com/HiveGamesOSS/Chunker",
"license": "MIT",
"devDependencies": {
"electron": "33.0.2",
"electron": "33.2.0",
"electron-builder": "25.0.5",
"git-last-commit": "^1.0.1"
},
Expand All @@ -25,12 +26,15 @@
"icon": "../ui/build/favicon.png",
"win": {
"target": [
"portable"
"portable",
"dir"
]
},
"linux": {
"target": [
"AppImage"
"AppImage",
"deb",
"dir"
]
},
"extraResources": [
Expand All @@ -54,7 +58,7 @@
"dependencies": {
"archiver": "^7.0.1",
"electron-dl": "^4.0.0",
"electron-log": "^5.2.0",
"electron-log": "^5.2.2",
"fs-extra": "^11.2.0",
"jszip": "^3.10.1"
}
Expand Down
48 changes: 30 additions & 18 deletions app/electron/src/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ export class Session {
this.sendMessage({
requestId: requestId,
type: "error",
error: "Failed to open selected file."
error: "Failed to open selected file, please ensure you don't have it open anywhere else."
});
return;
}
Expand All @@ -428,23 +428,35 @@ export class Session {
let totalFiles = await countFiles(inputPath);
let filesCopied = 0;
let lastProgress = 0;
await copyRecursive(inputPath, worldInputPath, (file) => {
// Update progress
filesCopied++;
let progress = filesCopied / totalFiles;

// Only update the client if the progress differs by 1%
if (progress - lastProgress > 0.01) {
// Update client
this.sendMessage({
requestId: requestId,
type: "progress",
percentage: progress,
continue: true
});
lastProgress = progress;
}
});
try {
await copyRecursive(inputPath, worldInputPath, (file) => {
// Update progress
filesCopied++;
let progress = filesCopied / totalFiles;

// Only update the client if the progress differs by 1%
if (progress - lastProgress > 0.01) {
// Update client
this.sendMessage({
requestId: requestId,
type: "progress",
percentage: progress,
continue: true
});
lastProgress = progress;
}
});
} catch (e) {
log.error("Failed to read input directory", e);

// Reply with error
this.sendMessage({
requestId: requestId,
type: "error",
error: "Failed to open selected folder, please ensure you don't have it open anywhere else."
});
return;
}
} else {
// Failed
log.error("Failed to find input", inputPath);
Expand Down
52 changes: 26 additions & 26 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "chunker-app",
"private": true,
"description": "Parent package of the Chunker Electron app and user interface.",
"author": "Hive Games Limited <[email protected]>",
"license": "MIT",
"homepage": "https://github.com/HiveGamesOSS/Chunker",
"scripts": {
"start": "concurrently \"cross-env BROWSER=none npm start --prefix ui\" \"npx wait-on http://127.0.0.1:3000 && cross-env DEV_UI_URL=http://localhost:3000 DEV_CLI_EXECUTABLE=../../cli/build/libs/ npm start --prefix electron\"",
"build": "npm run build --prefix ui && npm run publish --prefix electron"
Expand All @@ -12,10 +15,8 @@
"ui"
]
},
"author": "Hive Games Limited",
"license": "MIT",
"devDependencies": {
"concurrently": "^9.0.1",
"concurrently": "^9.1.0",
"cross-env": "^7.0.3",
"wait-on": "^8.0.1"
}
Expand Down
8 changes: 4 additions & 4 deletions app/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "chunker-ui",
"description": "React based interface for the Chunker electron app.",
"private": true,
"description": "React based interface for the Chunker electron app.",
"author": "Hive Games Limited <[email protected]>",
"license": "MIT",
"homepage": "./",
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"eslint": "eslint src/**/*.js",
"test": "react-scripts test"
},
"author": "Hive Games",
"license": "MIT",
"dependencies": {
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/react-fontawesome": "^0.2.2",
Expand All @@ -24,7 +24,7 @@
"leaflet-mouse-position": "^1.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.27.0",
"react-router-dom": "^6.28.0",
"react-scripts": "^5.0.1",
"react-select": "^5.8.2",
"react-syntax-highlighter": "^15.6.1",
Expand Down
Loading

0 comments on commit 86becbf

Please sign in to comment.