Skip to content

Commit

Permalink
Add standalone build, remove VS dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ndabas committed Nov 22, 2022
1 parent 4d7eea7 commit 7e13fbf
Show file tree
Hide file tree
Showing 15 changed files with 388 additions and 101 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Downloaded installers
installers/
# Downloaded files
downloads/

# Generated NSIS scripts
*.nsi

# Built installers
bin/

# Build tools
# Builds/staging
build/
41 changes: 41 additions & 0 deletions build-picotool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

set -euo pipefail

BITNESS=$1
ARCH=$2

export PICO_SDK_PATH="$PWD/pico-sdk"
export LIBUSB_ROOT="/mingw$BITNESS"
export LDFLAGS="-static -static-libgcc -static-libstdc++"

cd pico-sdk/tools/elf2uf2
mkdir -p build
cd build
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release -Wno-dev
cmake --build .

cd ../../pioasm
mkdir -p build
cd build
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release -Wno-dev
cmake --build .

cd ../../../..
INSTALLDIR="pico-sdk-tools/mingw$BITNESS"
mkdir -p $INSTALLDIR
cp pico-sdk/tools/elf2uf2/build/elf2uf2.exe $INSTALLDIR
cp pico-sdk/tools/pioasm/build/pioasm.exe $INSTALLDIR
cp ../packages/pico-sdk-tools/pico-sdk-tools-config.cmake $INSTALLDIR

cd picotool
mkdir -p build
cd build
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release
cmake --build .

cd ../..
INSTALLDIR="picotool-install/mingw$BITNESS"
mkdir -p $INSTALLDIR
cp picotool/build/picotool.exe $INSTALLDIR
cp "/mingw$BITNESS/bin/libusb-1.0.dll" $INSTALLDIR
Loading

0 comments on commit 7e13fbf

Please sign in to comment.