Skip to content

Commit 5737fa8

Browse files
fix: according to suggestion
1 parent a8d395f commit 5737fa8

File tree

2 files changed

+64
-1
lines changed

2 files changed

+64
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pacman -S --noconfirm --needed mingw-w64-x86_64-python
8787
#### 3. Build Wakunode
8888
- Open Git Bash as administrator
8989
- clone nwaku and cd nwaku
90-
- Execute: `./scripts/build_wakunode_windows.sh`
90+
- Execute: `./scripts/build_windows.sh`
9191

9292
#### 4. Troubleshooting
9393
If `wakunode2.exe` isn't generated:

scripts/build_windows.sh

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/bin/sh
2+
3+
echo "- - - - - - - - - - Windows Setup Script - - - - - - - - - -"
4+
5+
success_count=0
6+
failure_count=0
7+
8+
# Function to execute a command and check its status
9+
execute_command() {
10+
echo "Executing: $1"
11+
if eval "$1"; then
12+
echo -e "✓ Command succeeded \n"
13+
((success_count++))
14+
else
15+
echo -e "✗ Command failed \n"
16+
((failure_count++))
17+
fi
18+
}
19+
20+
echo "1. -.-.-.-- Set PATH -.-.-.-"
21+
export PATH="/c/msys64/usr/bin:/c/msys64/mingw64/bin:/c/msys64/usr/lib:/c/msys64/mingw64/lib:$PATH"
22+
23+
echo "2. -.-.-.- Verify dependencies -.-.-.-"
24+
execute_command "which gcc g++ make cmake cargo upx rustc python"
25+
26+
echo "3. -.-.-.- Updating submodules -.-.-.-"
27+
execute_command "git submodule update --init --recursive"
28+
29+
echo "4. -.-.-.- Creating tmp directory -.-.-.-"
30+
execute_command "mkdir -p tmp"
31+
32+
echo "5. -.-.-.- Building Nim -.-.-.-"
33+
cd vendor/nimbus-build-system/vendor/Nim
34+
execute_command "./build_all.bat"
35+
cd ../../../..
36+
37+
echo "6. -.-.-.- Building libunwind -.-.-.-"
38+
cd vendor/nim-libbacktrace
39+
execute_command "make all V=1 -j"
40+
execute_command "make install/usr/lib/libunwind.a V=1 -j"
41+
cp ./vendor/libunwind/build/lib/libunwind.a install/usr/lib
42+
cd ../../
43+
44+
echo "7. -.-.-.- Building miniupnpc -.-.-.- "
45+
cd vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc
46+
execute_command "git checkout little_chore_windows_support"
47+
execute_command "make -f Makefile.mingw CC=gcc CXX=g++ libminiupnpc.a V=1 -j"
48+
cd ../../../../..
49+
50+
echo "8. -.-.-.- Building libnatpmp -.-.-.- "
51+
cd ./vendor/nim-nat-traversal/vendor/libnatpmp-upstream
52+
make CC="gcc -fPIC -D_WIN32_WINNT=0x0600 -DNATPMP_STATICLIB" libnatpmp.a V=1 -j
53+
cd ../../../../
54+
55+
echo "9. -.-.-.- Building wakunode2 -.-.-.- "
56+
execute_command "make wakunode2 LOG_LEVEL=DEBUG V=1 -j"
57+
58+
echo "10. -.-.-.- Building libwaku -.-.-.- "
59+
execute_command "make libwaku STATIC=0 LOG_LEVEL=DEBUG V=1 -j"
60+
61+
echo "Windows setup completed successfully!"
62+
echo "✓ Successful commands: $success_count"
63+
echo "✗ Failed commands: $failure_count"

0 commit comments

Comments
 (0)