-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d80c9b
commit 6422474
Showing
41 changed files
with
921 additions
and
22,687 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,8 @@ node_modules/ | |
dist/ | ||
build/ | ||
bin/ | ||
ui | ||
ui | ||
electron-build/ | ||
nmb-electron/ | ||
package-lock.json | ||
package.json.md5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,26 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "cleaning out the bin directory" | ||
echo "🚀 Starting optimized build process..." | ||
|
||
rm -rf bin | ||
# Clean up old builds | ||
echo "🧹 Cleaning up old builds..." | ||
rm -rf bin/* | ||
rm -rf ui-core/build | ||
rm -rf build | ||
|
||
cd nmb-electron | ||
# Optimize React build | ||
echo "⚡ Optimizing React build..." | ||
cd ui-core | ||
GENERATE_SOURCEMAP=false REACT_APP_ENV=production npm run build | ||
cd .. | ||
|
||
# Build the Electron app | ||
npm run build:all | ||
# Build for Linux with optimizations | ||
echo "🐧 Building for Linux..." | ||
CGO_ENABLED=1 ~/go/bin/wails build -platform linux/amd64 -o ../bin/nmb -ldflags="-s -w" | ||
|
||
cd dist | ||
# Build for Windows with optimizations | ||
echo "🪟 Building for Windows..." | ||
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 ~/go/bin/wails build -platform windows/amd64 -o ../bin/nmb.exe -ldflags="-s -w" | ||
|
||
mv NMB-Electron-1.0.0.AppImage ../../cmd/ui/linux/ui | ||
mv "NMB-Electron 1.0.0.exe" ../../cmd/ui/windows/ui.exe | ||
|
||
printf "Electron Build completed" | ||
|
||
cd ../../ | ||
|
||
# Build the Go binary | ||
echo "" | ||
printf "Building the Go binary" | ||
echo "" | ||
# For Windows | ||
GOOS=windows go build -o bin/nmb.exe ./cmd | ||
|
||
# For Linux | ||
GOOS=linux go build -o bin/nmb ./cmd | ||
|
||
echo "" | ||
printf "Go binary build completed" | ||
echo "✅ Build complete!" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.