Skip to content

Commit 07dbee0

Browse files
committed
download_libs [2.8.3 ~ 2.8.4] VS arm64 also pulls 64
1 parent 7997f47 commit 07dbee0

3 files changed

Lines changed: 48 additions & 7 deletions

File tree

scripts/dev/download_libs.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LEGACY=0
1414
SILENT_ARGS=""
1515
NO_SSL=""
1616
BLEEDING_EDGE=0
17-
DL_VERSION=2.8.3
17+
DL_VERSION=2.8.4
1818
GCC_VERSION=0
1919
TAG=""
2020
REPO="latest"
@@ -33,7 +33,8 @@ cat << EOF
3333
-p, --platform PLATFORM Platorm among: android, emscritpen, ios, linux, linux64, linuxarmv6l, linuxarmv7l, msys2, osx, tvos, vs
3434
If not specified tries to autodetect the platform.
3535
-a, --arch ARCH Architecture:
36-
vs: 64
36+
vs: 64, arm64, arm64ec, all
37+
arm64 also pulls 64 (and arm64ec) for now
3738
msys2: 64
3839
android: armv7, arm64, and x86 (if not specified will download all)
3940
linux: 64, arm64, aarch64, armv6l or armv7l
@@ -582,9 +583,11 @@ elif [ "$PLATFORM" == "vs" ]; then
582583
openFrameworksLibs_${VER}_${VS_PLATFORM}_arm64ec_1.zip \
583584
openFrameworksLibs_${VER}_${VS_PLATFORM}_arm64ec_2.zip"
584585
elif [[ "$ARCH" == "arm64" ]]; then
585-
# Windows on ARM: native arm64 + arm64ec (x64-compat) for Win11 ARM
586-
echo " VS packages: arm64 + arm64ec (Windows on ARM host)"
587-
PKGS="openFrameworksLibs_${VER}_${VS_PLATFORM}_arm64_1.zip \
586+
# Windows on ARM: native arm64 + arm64ec + x64 (x64-compat / VS x64 tools)
587+
echo " VS packages: 64 + arm64 + arm64ec (arm64 also downloads 64 for now)"
588+
PKGS="openFrameworksLibs_${VER}_${VS_PLATFORM}_64_1.zip \
589+
openFrameworksLibs_${VER}_${VS_PLATFORM}_64_2.zip \
590+
openFrameworksLibs_${VER}_${VS_PLATFORM}_arm64_1.zip \
588591
openFrameworksLibs_${VER}_${VS_PLATFORM}_arm64_2.zip \
589592
openFrameworksLibs_${VER}_${VS_PLATFORM}_arm64ec_1.zip \
590593
openFrameworksLibs_${VER}_${VS_PLATFORM}_arm64ec_2.zip"
@@ -602,6 +605,16 @@ elif [ "$PLATFORM" == "vs" ]; then
602605
openFrameworksLibs_${VER}_${PLATFORM}_64_2.zip \
603606
openFrameworksLibs_${VER}_${PLATFORM}_64_3.zip \
604607
openFrameworksLibs_${VER}_${PLATFORM}_64_4.zip"
608+
elif [[ "$ARCH" == "arm64" ]]; then
609+
echo " VS packages: 64 + arm64 (arm64 also downloads 64 for now)"
610+
PKGS="openFrameworksLibs_${VER}_${PLATFORM}_64_1.zip \
611+
openFrameworksLibs_${VER}_${PLATFORM}_64_2.zip \
612+
openFrameworksLibs_${VER}_${PLATFORM}_64_3.zip \
613+
openFrameworksLibs_${VER}_${PLATFORM}_64_4.zip \
614+
openFrameworksLibs_${VER}_${PLATFORM}_arm64_1.zip \
615+
openFrameworksLibs_${VER}_${PLATFORM}_arm64_2.zip \
616+
openFrameworksLibs_${VER}_${PLATFORM}_arm64_3.zip \
617+
openFrameworksLibs_${VER}_${PLATFORM}_arm64_4.zip"
605618
else
606619
PKGS="openFrameworksLibs_${VER}_${PLATFORM}_${ARCH}_1.zip \
607620
openFrameworksLibs_${VER}_${PLATFORM}_${ARCH}_2.zip \

scripts/dev/lib_sources.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,13 @@ downloadApothecaryLibs(){
126126
local platformDir="$1"
127127
local scriptsRoot="${OF_CORE_SCRIPT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
128128
local script="${scriptsRoot}/${platformDir}/download_libs.sh"
129+
local arch="${LIB_ARCH:-}"
129130
if [[ ! -f "$script" ]]; then
130131
echo "download script missing: $script" >&2
131132
return 1
132133
fi
133134
[[ -x "$script" ]] || chmod +x "$script" 2>/dev/null || true
134-
local -a args=()
135+
local -a args=() extra=()
135136
# -b bleeding-edge → "latest" packages; -t TAG for a specific release tag
136137
if [[ -n "$LIB_TAG" && "$LIB_TAG" != "latest" && "$LIB_TAG" != "nightly" ]]; then
137138
args+=( -t "$LIB_TAG" )
@@ -144,6 +145,23 @@ downloadApothecaryLibs(){
144145
full|full-clean) args+=( --full-clean ) ;;
145146
platform|*) ;; # default platform-scoped clean in download_libs.sh
146147
esac
148+
# Arch: LIB_ARCH, else OF_ARCH for vs (linux/msys2 wrappers pick host arch).
149+
# Extra flags via DOWNLOAD_LIBS_ARGS.
150+
if [[ -z "$arch" && -n "${OF_ARCH:-}" && "$platformDir" == "vs" ]]; then
151+
arch="$OF_ARCH"
152+
fi
153+
if [[ -n "$arch" ]]; then
154+
args+=( -a "$arch" )
155+
fi
156+
if [[ "$platformDir" == "vs" && "${OF_VS_2026:-}" == "1" ]]; then
157+
args+=( -vs )
158+
fi
159+
if [[ -n "${DOWNLOAD_LIBS_ARGS:-}" ]]; then
160+
# shellcheck disable=SC2206
161+
extra=( $DOWNLOAD_LIBS_ARGS )
162+
args+=( "${extra[@]}" )
163+
fi
164+
echo " download_libs ${platformDir}${arch:+ -a ${arch}} ${args[*]}"
147165
"$script" "${args[@]}"
148166
}
149167

scripts/of.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,10 @@ printHelp(){
963963
LIB_SOURCE=apothecary|oflibs|archive
964964
LIB_TAG=latest|v12.1.0|v0.11.2
965965
LIB_LIBS=core|all|"glfw glm"
966+
LIB_ARCH=64|arm64|arm64ec|all passed as -a to download_libs (vs/linux/msys2)
966967
LIB_CLEAN_MODE=platform|merge|full # default platform: only lib/<plat>
968+
DOWNLOAD_LIBS_ARGS="-vs --full-clean" extra flags to download_libs.sh
969+
OF_VS_2026=1 VS 2026 package names (_vs_2026_)
967970
OF_LINUX_DISTRO=ubuntu Force linux distro scripts
968971
OF_APO_VS_VER=18 apothecary VS toolchain (18=VS2026, 17=VS2022, 16=VS2019)
969972
OF_JOBS=8 Parallel build jobs
@@ -973,6 +976,8 @@ printHelp(){
973976
${prog}
974977
${prog} status
975978
${prog} update libs
979+
${prog} update libs vs arm64
980+
LIB_ARCH=arm64 ${prog} update libs vs
976981
LIB_SOURCE=oflibs LIB_LIBS=core ${prog} update libs
977982
${prog} build core Debug
978983
${prog} build project apps/myApps/mySketch
@@ -1367,6 +1372,11 @@ cmdUpdatePG(){
13671372
cmdUpdate(){
13681373
local subcmd="$1"
13691374
local platformDir="${2:-$OF_PLATFORM}"
1375+
local arch="${3:-}"
1376+
if [[ -n "$arch" ]]; then
1377+
export LIB_ARCH="$arch"
1378+
export OF_ARCH="$arch"
1379+
fi
13701380
case "$subcmd" in
13711381
""|libs)
13721382
# interactive: always prompt source; then state-aware download
@@ -2622,7 +2632,7 @@ runCommand(){
26222632
menu) cmdMenu ;;
26232633
status|check|doctor|installed|libs-status) cmdStatus ;;
26242634
setup|install) cmdSetup "${subcmd:-$OF_PLATFORM}" ;;
2625-
update) cmdUpdate "$subcmd" "$subcmd2" ;;
2635+
update) cmdUpdate "$subcmd" "$subcmd2" "$subcmd3" ;;
26262636
build)
26272637
shift
26282638
cmdBuild "$@"

0 commit comments

Comments
 (0)