Skip to content

Commit 84bc74e

Browse files
authored
Merge branch 'openframeworks:master' into fpscounter
2 parents 7b78d89 + 5f5c26a commit 84bc74e

File tree

23 files changed

+361
-99
lines changed

23 files changed

+361
-99
lines changed

.github/workflows/actions/build-vs2022.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
git
3939
unzip
4040
rsync
41+
wget2
4142
wget
4243
- name: Install dependencies
4344
shell: msys2 {0}

.github/workflows/clean-up-cache.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: cleanup caches by a branch
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
cleanup:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@v4
17+
- name: Cleanup
18+
run: |
19+
gh extension install actions/gh-actions-cache
20+
REPO=${{ github.repository }}
21+
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
22+
echo "Fetching list of cache key"
23+
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
24+
## Setting this to not fail the workflow while deleting cache keys.
25+
set +e
26+
echo "Deleting caches..."
27+
for cacheKey in $cacheKeysForPR
28+
do
29+
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
30+
done
31+
echo "Done"
32+
env:
33+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/of.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- 'examples/**'
1414

1515
concurrency:
16-
group: ${{ github.workflow }}-${{ github.ref }}
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
1717
cancel-in-progress: true
1818

1919
env:
@@ -201,7 +201,7 @@ jobs:
201201
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
202202

203203
build-linux64:
204-
runs-on: ubuntu-24.04
204+
runs-on: ubuntu-22.04
205205
strategy:
206206
matrix:
207207
cfg:
@@ -216,7 +216,7 @@ jobs:
216216
- name: Cache Packages
217217
uses: awalsh128/cache-apt-pkgs-action@latest
218218
with:
219-
packages: aptitude aptitude-common libboost-iostreams1.83.0 libcwidget4 libsigc++-2.0-0v5 libxapian30 fonts-wine{a} libasound2-plugins{a} libcapi20-3t64{a} libosmesa6{a} libpcsclite1{a} libspeexdsp1{a} libwine{a} libxkbregistry0{a} libz-mingw-w64{a} wine{a} wine64 wget2 make curl libjack-jackd2-0 libjack-jackd2-dev freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev libglew-dev libopenal-dev libsndfile1-dev libfreeimage-dev libcairo2-dev libfreetype6-dev libssl-dev libpulse-dev libusb-1.0-0-dev libgtk2.0-dev libopencv-dev libassimp-dev librtaudio-dev gdb libglfw3-dev liburiparser-dev libcurl4-openssl-dev libpugixml-dev libgconf-2-4 libgtk2.0-0 libpoco-dev libxcursor-dev libxi-dev libxinerama-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav gstreamer1.0-pulseaudio gstreamer1.0-x gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good
219+
packages: aptitude aptitude-common libboost-iostreams1.83.0 libcwidget4 libsigc++-2.0-0v5 libxapian30 fonts-wine{a} libasound2-plugins{a} libcapi20-3t64{a} libosmesa6{a} libpcsclite1{a} libspeexdsp1{a} libwine{a} libxkbregistry0{a} libz-mingw-w64{a} wine{a} wine64 wget2 make libjack-jackd2-0 libjack-jackd2-dev freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev libglew-dev libopenal-dev libsndfile1-dev libfreeimage-dev libcairo2-dev libfreetype6-dev libpulse-dev libusb-1.0-0-dev libgtk2.0-dev libopencv-dev libassimp-dev librtaudio-dev gdb libglfw3-dev liburiparser-dev libpugixml-dev libgconf-2-4 libgtk2.0-0 libpoco-dev libxcursor-dev libxi-dev libxinerama-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav gstreamer1.0-pulseaudio gstreamer1.0-x gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good
220220
version: 1.0
221221

222222
- uses: actions/checkout@v4

libs/openFrameworksCompiled/project/linux64/config.linux64.default.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@
2828
include $(OF_SHARED_MAKEFILES_PATH)/config.linux.common.mk
2929

3030
PLATFORM_LDFLAGS += -fuse-ld=gold
31-
PLATFORM_LDFLAGS += -lstdc++fs

libs/openFrameworksCompiled/project/linuxaarch64/config.linuxaarch64.default.mk

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@ include $(OF_SHARED_MAKEFILES_PATH)/config.linux.common.mk
3838
# Note: Leave a leading space when adding list items with the += operator
3939
################################################################################
4040

41-
#c++ 17 support - comment out two lines below to use c++11
42-
PLATFORM_CFLAGS += -std=c++17
43-
PLATFORM_LDFLAGS += -lstdc++fs
44-
PLATFORM_CXXVER = -std=c++17
45-
46-
47-
PLATFORM_LDFLAGS += -lstdc++fs
4841
PLATFORM_LDFLAGS += -no-pie
4942
# PLATFORM_LDFLAGS += -nostartfiles
5043

libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ OF_CORE_FRAMEWORKS = -framework Accelerate -framework AGL -framework AppKit -fra
5959

6060
ALWAYS_SEARCH_USER_PATHS = NO
6161
DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING = YES
62-
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) GL_SILENCE_DEPRECATION=1 GLES_SILENCE_DEPRECATION=1
62+
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) GL_SILENCE_DEPRECATION=1 GLES_SILENCE_DEPRECATION=1 COREVIDEO_SILENCE_GL_DEPRECATION=1
6363

6464

6565
//COMPILER SETTINGS WHICH CAN BE OVERRIDDEN BY XCODE BUILD SETTINGS

libs/openFrameworksCompiled/project/osx/config.osx.default.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,11 @@ endif
8585
PLATFORM_CFLAGS = -stdlib=$(MAC_OS_STD_LIB)
8686

8787
# Warning Flags (http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html)
88-
PLATFORM_CFLAGS += -Wall
88+
PLATFORM_CFLAGS += -Wall -Werror=return-type
8989

9090
# Code Generation Option Flags (http://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html)
9191
PLATFORM_CFLAGS += -fexceptions
9292

93-
PLATFORM_CFLAGS += -Werror=return-type
9493

9594
ifeq ($(shell xcode-select -print-path 2> /dev/null; echo $$?),0)
9695
MAC_OS_XCODE_ROOT=$(shell xcode-select -print-path)

scripts/ci/msys2/build.sh

100644100755
File mode changed.

scripts/ci/msys2/install.sh

100644100755
File mode changed.

scripts/ci/msys2/run_tests.sh

100644100755
File mode changed.

scripts/ci/vs/install.sh

100644100755
File mode changed.

scripts/ci/vs/run_tests.bat

100644100755
File mode changed.

scripts/dev/download_libs.sh

Lines changed: 98 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ PLATFORM=""
55
ARCH=""
66
OVERWRITE=1
77
SILENT_ARGS=""
8+
NO_SSL=""
89
BLEEDING_EDGE=0
10+
DL_VERSION=2.2
911

1012
printHelp(){
1113
cat << EOF
@@ -25,6 +27,7 @@ cat << EOF
2527
If not set deletes any existing libraries
2628
-s, --silent Silent download progress
2729
-h, --help Shows this message
30+
-k, --no-ssl Allow no SSL validation
2831
EOF
2932
}
3033

@@ -33,15 +36,21 @@ if [[ ! -d "$SCRIPT_DIR" ]]; then SCRIPT_DIR="$PWD"; fi
3336
. "$SCRIPT_DIR/downloader.sh"
3437

3538
download(){
36-
echo "Downloading $1"
39+
echo ' -----'
40+
#echo " Downloading $1"
3741
# downloader ci.openframeworks.cc/libs/$1 $SILENT_ARGS
42+
43+
COMMAND=" "
44+
REPO="nightly"
3845
if [[ $BLEEDING_EDGE = 1 ]] ; then
39-
echo downloader https://github.com/openframeworks/apothecary/releases/download/bleeding/$1 $SILENT_ARGS
40-
downloader https://github.com/openframeworks/apothecary/releases/download/bleeding/$1 $SILENT_ARGS
41-
else
42-
echo downloader https://github.com/openframeworks/apothecary/releases/download/nightly/$1 $SILENT_ARGS
43-
downloader https://github.com/openframeworks/apothecary/releases/download/nightly/$1 $SILENT_ARGS
46+
REPO="bleeding"
4447
fi
48+
49+
for PKG in $1; do
50+
COMMAND+="https://github.com/openframeworks/apothecary/releases/download/$REPO/$PKG "
51+
done
52+
# echo $COMMAND;
53+
downloader $COMMAND $SILENT_ARGS $NO_SSL
4554
}
4655

4756
# trap any script errors and exit
@@ -89,7 +98,10 @@ while [[ $# -gt 0 ]]; do
8998
BLEEDING_EDGE=1
9099
;;
91100
-s|--silent)
92-
SILENT_ARGS=-nv
101+
SILENT_ARGS=1
102+
;;
103+
-k|--no-ssl)
104+
NO_SSL=1
93105
;;
94106
-h|--help)
95107
printHelp
@@ -104,6 +116,10 @@ while [[ $# -gt 0 ]]; do
104116
shift # past argument or value
105117
done
106118

119+
if [[ "$TARGET" != "" ]] && [[ "$PLATFORM" == "" ]]; then
120+
PLATFORM=$TARGET
121+
fi
122+
107123
if [ "$PLATFORM" == "" ]; then
108124
OS=$(uname)
109125
if [ "$OS" == "Linux" ]; then
@@ -176,6 +192,8 @@ if [ "$PLATFORM" == "linux" ] && [ "$ARCH" == "64" ]; then
176192
fi
177193
fi
178194

195+
echo " openFrameworks download_libs.sh v$DL_VERSION"
196+
179197
if [ "$PLATFORM" == "msys2" ]; then
180198
PKGS="openFrameworksLibs_${VER}_${PLATFORM}_${ARCH}.zip"
181199
elif [ "$ARCH" == "" ] && [ "$PLATFORM" == "vs" ]; then
@@ -207,9 +225,9 @@ elif [[ "$PLATFORM" =~ ^(osx|ios|tvos|xros|catos|watchos)$ ]]; then
207225
elif [ "$ARCH" == "" ] && [ "$PLATFORM" == "android" ]; then
208226
if [[ $BLEEDING_EDGE = 1 ]] ; then
209227
PKGS="openFrameworksLibs_${VER}_${PLATFORM}_armv7.tar.bz2 \
210-
openFrameworksLibs_${VER}_${PLATFORM}_arm64.tar.bz2 \
211-
openFrameworksLibs_${VER}_${PLATFORM}_x86_64.tar.bz2
212-
openFrameworksLibs_${VER}_${PLATFORM}_x86.tar.bz2"
228+
openFrameworksLibs_${VER}_${PLATFORM}_arm64.tar.bz2 \
229+
openFrameworksLibs_${VER}_${PLATFORM}_x86_64.tar.bz2
230+
openFrameworksLibs_${VER}_${PLATFORM}_x86.tar.bz2"
213231
else
214232
PKGS="openFrameworksLibs_${VER}_${PLATFORM}armv7.tar.bz2 \
215233
openFrameworksLibs_${VER}_${PLATFORM}arm64.tar.bz2 \
@@ -223,33 +241,63 @@ else # Linux
223241
fi
224242
fi
225243

226-
for PKG in $PKGS; do
227-
download $PKG
228-
done
229-
230244
cd ../../
231245
mkdir -p libs
232246
cd libs
233247

248+
mkdir -p download
249+
cd download
250+
251+
# IFS=' ' read -r -a PKGS_DATA <<< "$PKGS"
252+
# if [ $OVERWRITE -eq 1 ]; then
253+
# for ((i = 0; i < ${#PKGS_DATA[@]}; i++)); do
254+
# FILE_CHECK="${PKGS_DATA[$i]}"
255+
# # Check if the file exists
256+
# if [ -e "${FILE_CHECK}" ]; then
257+
# echo " Removing Prior Download:[${FILE_CHECK}]"
258+
# # Remove the file or directory
259+
# rm -rf "${FILE_CHECK}"
260+
# fi
261+
# done
262+
# fi
263+
264+
download "${PKGS[@]}"
265+
266+
cd ../ # back to libs
267+
234268
if [ $OVERWRITE -eq 1 ]; then
235-
echo "Removing old libraries"
236-
libs=("boost" "cairo" "curl" "FreeImage" "freetype" "glew" "glfw" "json" "libpng" "openssl" "pixman" "poco" "rtAudio" "tess2" "uriparser" "utf8" "videoInput" "zlib" "opencv" "ippicv" "assimp" "libxml2" "svgtiny" "README.md")
237-
for lib in $libs; do
238-
if [ -e $lib ]; then
239-
rm -rf $lib
269+
echo " "
270+
echo " Overwrite - Removing prior libraries for [$PLATFORM]"
271+
libs=("boost" "cairo" "curl" "FreeImage" "brotli" "fmod" "freetype" "glew" "glfw" "json" "libpng" "openssl" "pixman" "poco" "rtAudio" "tess2" "uriparser" "utf8" "videoInput" "zlib" "opencv" "ippicv" "assimp" "libxml2" "svgtiny" "fmt")
272+
for ((i=0;i<${#libs[@]};++i)); do
273+
if [ -e "${libs[i]}/lib/$PLATFORM" ]; then
274+
echo " Removing: [${libs[i]}/lib/$PLATFORM]"
275+
rm -rf "${libs[i]}/lib/$PLATFORM"
240276
fi
277+
if [ "$PLATFORM" == "msys2" ] || [ "$PLATFORM" == "vs" ]; then
278+
if [ -e "${libs[i]}/bin" ]; then
279+
echo " Removing: [${libs[i]}/bin]"
280+
rm -rf "${libs[i]}/bin"
281+
fi
282+
fi
283+
# if [ -e "${libs[i]}/include" ]; then
284+
# echo " Removing: [${libs[i]}/include]"
285+
# rm -rf "${libs[i]}/include"
286+
# fi
241287
done
242288
fi
243289

290+
echo " ------ "
244291
for PKG in $PKGS; do
245-
echo "Uncompressing libraries ${PLATFORM}${ARCH} from $PKG"
292+
echo " Uncompressing libraries [${PLATFORM}] from [$PKG]"
246293
if [ "$PLATFORM" == "msys2" ] || [ "$PLATFORM" == "vs" ]; then
247-
unzip -qo ../scripts/dev/$PKG
248-
rm ../scripts/dev/$PKG
294+
unzip -qo download/$PKG
295+
# rm -r download/$PKG
249296
else
250-
tar xjf ../scripts/dev/$PKG
251-
rm ../scripts/dev/$PKG
297+
tar xjf download/$PKG
298+
# rm -r download/$PKG
252299
fi
300+
echo " Deployed libraries from [download/$PKG]to [/libs]"
253301
done
254302

255303
if [ "$PLATFORM" == "osx" ]; then
@@ -266,13 +314,31 @@ else
266314
addons=("ofxOpenCv" "ofxOpenCv" "ofxAssimpModelLoader" "ofxSvg" "ofxSvg" "ofxPoco")
267315
fi
268316

269-
for ((i=0;i<${#addonslibs[@]};++i)); do
270-
if [ -e ${addonslibs[i]} ]; then
271-
echo "Copying ${addonslibs[i]} to ${addons[i]}"
272-
if [ $OVERWRITE -eq 1 ] && [ -e ../addons/${addons[i]}/libs/${addonslibs[i]} ]; then
273-
echo "Removing old opencv libraries"
274-
rm -rf ../addons/${addons[i]}/libs/${addonslibs[i]}
317+
echo " ------ "
318+
if [ $OVERWRITE -eq 1 ]; then
319+
for ((i=0;i<${#addonslibs[@]};++i)); do
320+
if [ -e ${addonslibs[i]} ] ; then
321+
echo " Overwrite - addon: [${addons[i]} - ${addonslibs[i]}]"
322+
if [ -e ../addons/${addons[i]}/libs/${addonslibs[i]}/lib/$PLATFORM ]; then
323+
echo " Remove binaries: [${addons[i]}/libs/${addonslibs[i]}/lib/$PLATFORM]"
324+
rm -rf ../addons/${addons[i]}/libs/${addonslibs[i]}/lib/$PLATFORM
325+
fi
326+
if [ -e ../addons/${addons[i]}/libs/${addonslibs[i]}/bin ]; then
327+
echo " Remove binaries: [${addons[i]}/libs/${addonslibs[i]}/bin]"
328+
rm -rf ../addons/${addons[i]}/libs/${addonslibs[i]}/bin
329+
fi
330+
# if [ -e ../addons/${addons[i]}/libs/${addonslibs[i]}/include ]; then
331+
# echo " Remove include: [${addons[i]}/libs/include]"
332+
# rm -rf ../addons/${addons[i]}/libs/${addonslibs[i]}/include
333+
# fi
275334
fi
335+
done
336+
echo " ------ "
337+
fi
338+
339+
for ((i=0;i<${#addonslibs[@]};++i)); do
340+
if [ -e "${addonslibs[i]}" ]; then
341+
echo " Deploying [${addonslibs[i]}] to [../addons/${addons[i]}/libs]"
276342
mkdir -p ../addons/${addons[i]}/libs/${addonslibs[i]}
277343
if ! command -v rsync &> /dev/null
278344
then
@@ -284,3 +350,5 @@ for ((i=0;i<${#addonslibs[@]};++i)); do
284350
fi
285351
done
286352

353+
echo " ------ "
354+
echo " openFrameworks download_libs and install complete!"

0 commit comments

Comments
 (0)