diff --git a/console/package.json b/console/package.json index 5dcb444..767cc98 100644 --- a/console/package.json +++ b/console/package.json @@ -17,7 +17,11 @@ "preview:test": "vite preview --mode test", "test": "vitest", "test:run": "node --max-old-space-size=4096 ./node_modules/vitest/vitest.mjs run", - "test:coverage": "node --max-old-space-size=4096 ./node_modules/vitest/vitest.mjs run --coverage" + "test:coverage": "node --max-old-space-size=4096 ./node_modules/vitest/vitest.mjs run --coverage", + "tauri:dev": "tauri dev", + "tauri:build": "tauri build", + "tauri:build:mac": "tauri build --bundles app,dmg", + "tauri:build:mac:debug": "tauri build --debug --bundles app,dmg" }, "dependencies": { "3d-force-graph": "1.80.0", @@ -97,6 +101,7 @@ "repository": "https://github.com/agentscope-ai/agentscope-runtime.git", "packageManager": "yarn@4.18.0", "resolutions": { - "@types/react": "18.3.31" + "@types/react": "18.3.31", + "@agentscope-ai/design@npm:1.0.32": "patch:@agentscope-ai/design@npm%3A1.0.32#./.yarn/patches/@agentscope-ai-design-1.0.32.patch" } -} +} \ No newline at end of file diff --git a/console/src-tauri/tauri.conf.json b/console/src-tauri/tauri.conf.json index 1fc4319..0d6c313 100644 --- a/console/src-tauri/tauri.conf.json +++ b/console/src-tauri/tauri.conf.json @@ -65,7 +65,14 @@ } }, "macOS": { - "minimumSystemVersion": "14.0" + "minimumSystemVersion": "14.0", + "dmg": { + "windowSize": [ + 640, + 440 + ], + "applicationFolder": true + } }, "createUpdaterArtifacts": true }, diff --git a/scripts/pack-tauri/build_macos_pyinstaller.sh b/scripts/pack-tauri/build_macos_pyinstaller.sh index 371eac8..8add491 100755 --- a/scripts/pack-tauri/build_macos_pyinstaller.sh +++ b/scripts/pack-tauri/build_macos_pyinstaller.sh @@ -128,7 +128,7 @@ cd console echo "Building for macOS..." npm exec -- tauri build \ --config src-tauri/tauri.version.conf.json \ - --bundles app + --bundles app,dmg cd .. echo "Tauri app built" echo "" @@ -190,6 +190,22 @@ else fi echo "" +# Collect DMG disk image (Tauri dmg bundle target) +DMG_GLOB="${BUNDLE_DIR}/dmg"/*.dmg +DMG_FILES=(${DMG_GLOB}) +if [ ${#DMG_FILES[@]} -gt 0 ] && [ -f "${DMG_FILES[0]}" ]; then + DMG_SRC="${DMG_FILES[0]}" + DMG_NAME="YunOPC-Hub-${VERSION}-macOS.dmg" + DMG_DEST="${DIST_ROOT}/${DMG_NAME}" + cp -f "${DMG_SRC}" "${DMG_DEST}" + DMG_SIZE=$(du -sh "${DMG_DEST}" | cut -f1) + echo "Created ${DMG_DEST} (${DMG_SIZE})" +else + echo "WARNING: No DMG file found at ${BUNDLE_DIR}/dmg/*.dmg" + echo " Tauri dmg bundle may have been skipped. Check that hdiutil is available." +fi +echo "" + UPDATER_NAME="${DIST_ROOT}/YunOPC-Hub-${VERSION}-macOS.app.tar.gz" case "$(uname -m)" in arm64 | aarch64) UPDATER_TARGET="darwin-aarch64" ;; @@ -215,6 +231,7 @@ echo "=========================================" echo "App: ${APP_PATH}" echo "Distribution: ${DIST_DIR}" echo "Archive: ${ZIP_NAME}" +echo "DMG: ${DMG_DEST:-not generated}" echo "Updater: ${UPDATER_NAME}" echo "" echo "Test: open \"${STAGED_APP_PATH}\""