Skip to content

Linux 2025 #8255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
1bfb841
Submodule fixes.
danoli3 Jan 15, 2025
e8877e9
Updates nightly
danoli3 Jan 15, 2025
0771ced
Download libs [ 2.6.4 ~ 2.7.0] - Added GCC / Linux updates
danoli3 Jan 15, 2025
18c0933
remove gold linux binutils ?
danoli3 Jan 15, 2025
9270712
Linux Workflow updates / mkfile
danoli3 Jan 15, 2025
7a8806c
Script moving oh no
danoli3 Jan 15, 2025
cc58ecf
Linux Script Updates
danoli3 Jan 15, 2025
43bbc21
Gold LD if found
danoli3 Jan 15, 2025
682a8c1
Downloader [2.7.1 ~ 2.7.2] exit error if fail on download of library …
danoli3 Jan 15, 2025
bead770
Downloader [2.7.2 ~ 2.7.3]
danoli3 Jan 15, 2025
8a91eca
Linux Actions
danoli3 Jan 15, 2025
73e9518
download_libs [2.7.3 ~ 2.7.4] fix opt args for downloads Linux
danoli3 Jan 15, 2025
d5a29a8
downloader set linux aarch64 to 64 for testing on arm64 linux
danoli3 Jan 15, 2025
af321ae
Makefile Linux subpath
danoli3 Jan 15, 2025
ddab37a
makefile subpath
danoli3 Jan 15, 2025
655092a
Linux subpath
danoli3 Jan 15, 2025
d4f5f35
download libs validate downloads before overrwite and 2.8.0. wget2 di…
danoli3 Jan 15, 2025
478b762
Makefiles
danoli3 Jan 15, 2025
7eba8bf
downloadlibs [2.8.0 ~ 2.8.1] valid bool to int
danoli3 Jan 15, 2025
40a6beb
ci linux
danoli3 Jan 15, 2025
e75e03c
Workflow ci optimisation VS single ARCH downloads
danoli3 Jan 15, 2025
3029efb
Linux 22.04 Test
danoli3 Jan 15, 2025
d48af34
VS download optimisation
danoli3 Jan 15, 2025
094abb3
VS Download fix
danoli3 Jan 15, 2025
c92b886
Makefile fixes / vs arch
danoli3 Jan 15, 2025
78217a1
Makefile depth fix
danoli3 Jan 16, 2025
8ad6d29
Makefile strict tab
danoli3 Jan 16, 2025
8eee1c6
Github Actions Test needs
danoli3 Jan 16, 2025
c61d5d2
Addons linux path ofxSvg make
danoli3 Jan 16, 2025
74b6993
Actions needs use ubuntu as quick
danoli3 Jan 16, 2025
0ef2280
Actions rename Linux-64 to linux
danoli3 Jan 16, 2025
887935d
Makefiles spaces to tabs
danoli3 Jan 16, 2025
ffcc9d6
Makefile debug
danoli3 Jan 16, 2025
688ed3b
Reset file
danoli3 Jan 16, 2025
7643dd4
Spaces to Tabs
danoli3 Jan 16, 2025
8d7acf5
no debug flags
danoli3 Jan 16, 2025
851a70e
Actions
danoli3 Jan 16, 2025
daa9bd4
22.04 disabled
danoli3 Jan 16, 2025
d870448
ci build 64
danoli3 Jan 16, 2025
b10d1f3
Line spaces to tabs
danoli3 Jan 16, 2025
19afe0e
gold
danoli3 Jan 16, 2025
71f8bf2
Fix Linux string issue
danoli3 Jan 16, 2025
14df16f
debug off
danoli3 Jan 16, 2025
8d14302
gold linker on command
danoli3 Jan 16, 2025
ad32c5f
gold linker comments disabled
danoli3 Jan 16, 2025
96fe3c7
Update addon_config
danoli3 Jan 16, 2025
35b31dc
Actions Linux 22.04 Enabled
danoli3 Jan 17, 2025
4acc8a8
Actions Linux 22.04 GCC 10
danoli3 Jan 17, 2025
09bce48
downloader [4.4.0 ~ 4.5.0] - fix close connection for zero urls.
danoli3 Jan 17, 2025
3444c51
Actions update
danoli3 Jan 17, 2025
7f4e563
Linux script updates
danoli3 Jan 17, 2025
6ec622f
osx / ios remove defined .a
danoli3 Jan 18, 2025
f94ae80
osx addon mk
danoli3 Jan 18, 2025
886d467
binutils-gold to depends
danoli3 Jan 20, 2025
0486e20
apothecary d5cb2e24b30e50e908280b99285746e7beaf0ff4
danoli3 Feb 25, 2025
3fd42d3
oF script / linux downloader
danoli3 Feb 25, 2025
f354351
Linux Wayland support
danoli3 Feb 26, 2025
83cf2fb
glfw
danoli3 Feb 26, 2025
1ddf619
linux pg downloader
danoli3 Feb 26, 2025
4305c34
linux makefile update arm64 / jetson / rpi
danoli3 Feb 26, 2025
8855368
Linux rasbian to folder
danoli3 Feb 27, 2025
45a60f9
make shell
danoli3 Feb 27, 2025
c0e0ee1
makefiles must use tabs
danoli3 Mar 3, 2025
3481e8d
Linux arm64 fix
danoli3 Mar 3, 2025
887b8a1
Setup GCC.sh
danoli3 Mar 4, 2025
70e5cb6
download libs linux minimum gcc 10
danoli3 Mar 4, 2025
79feff5
nightly arm64 linux
danoli3 Mar 4, 2025
6d12e9b
testing nightly
danoli3 Mar 4, 2025
2c2b9b9
Merge branch 'master' into linux2025
danoli3 Mar 4, 2025
3021df0
Merge commit '5630d2034d835e81225a225355e97f4144b21179' into linux2025
danoli3 Mar 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 78 additions & 71 deletions .github/workflows/of.yml
Original file line number Diff line number Diff line change
@@ -23,14 +23,15 @@ env:
jobs:
build-emscripten:
runs-on: ubuntu-24.04
needs: build-linux
strategy:
matrix:
cfg:
- { target: emscripten }
env:
TARGET: ${{matrix.cfg.target}}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.2
- name: Docker Step
run: "docker run -di --name emscripten -v $PWD:/src emscripten/emsdk:4.0.4 bash"
# - name: Determine Release
@@ -75,7 +76,7 @@ jobs:
- name: Check system
shell: bash
run: gcc -v
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.2
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.14
with:
@@ -117,11 +118,14 @@ jobs:

build-vs2022:
runs-on: windows-2022
needs: build-linux
strategy:
matrix:
platform: [x64, ARM64, ARM64EC]
env:
BITS: ${{ matrix.bits }}
BITS: ${{ matrix.platform }}
ARCH: ${{ matrix.platform }}

steps:
- name: Clone repository
uses: actions/checkout@v4
@@ -163,6 +167,7 @@ jobs:
build-vs2019:
runs-on: windows-2019
needs: build-linux
strategy:
matrix:
platform: [x64]
@@ -221,6 +226,8 @@ jobs:

rpi-build:
runs-on: ubuntu-24.04
needs: build-linux
if: ${{ false }} # DISABLED
strategy:
matrix:
cfg:
@@ -252,7 +259,7 @@ jobs:
with:
packages: multistrap unzip gcc-${{matrix.cfg.suffix}} g++-${{matrix.cfg.suffix}}
version: 1.0
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.2
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.14
with:
@@ -273,17 +280,18 @@ jobs:
- name: Download libs
run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.libs}}
- name: Install dependencies
run: ./scripts/ci/linuxrpi/install.sh;
run: ./scripts/ci/linux/rpi/install.sh;
- name: LS
shell: bash
run: ls -alfR
- name: Build
run: ./scripts/ci/linuxrpi/build.sh;
run: ./scripts/ci/linux/rpi/build.sh;

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

build-ios-tvos:
runs-on: macos-15
needs: build-linux
strategy:
matrix:
cfg:
@@ -292,7 +300,7 @@ jobs:
env:
TARGET: ${{matrix.cfg.target}}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.2
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.14
with:
@@ -322,105 +330,104 @@ jobs:

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

build-linux64:
build-linux:
runs-on: ubuntu-24.04
strategy:
matrix:
cfg:
- { target: linux64, libs: 64gcc6 }
# - {target: linux, arch: 64, gcc: 6}
- {target: linux, arch: 64, gcc: 14}
- {target: linux, arch: 64, gcc: 10}
env:
TARGET: ${{matrix.cfg.target}}
GCC: ${{matrix.cfg.gcc}}
ARCH: ${{matrix.cfg.arch}}
steps:
- name: Remove Old lib-unwind
run: if [ "$TARGET" = "linux64" ]; then
run: if [ "$TARGET" = "linux" ]; then
sudo apt-get remove libunwind-14 -y;
fi

- name: Cache Packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
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
version: 1.0
# - name: Determine Release
# id: vars
# shell: bash
# run: |
# if [[ "${{ github.ref }}" == refs/tags/* ]]; then
# echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
# elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
# echo "RELEASE=nightly" >> $GITHUB_ENV
# elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then
# echo "RELEASE=latest" >> $GITHUB_ENV
# else
# echo "RELEASE=latest" >> $GITHUB_ENV
# fi
- uses: actions/checkout@v4

- uses: actions/checkout@v4.2.2
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.14
with:
key: ${{ matrix.cfg.target }}-${{ matrix.cfg.libs }}
key: ${{ matrix.cfg.target }}

- name: Download libs
run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.libs}}
- name: Install dependencies
run: ./scripts/ci/$TARGET/install.sh;
run: ./scripts/ci/$TARGET/$ARCH/install.sh;

- name: Download libs
run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.arch}} -g ${{matrix.cfg.GCC}}

- name: Build
run: if [ "$TARGET" = "linux64" ]; then
scripts/ci/linux64/build.sh;
scripts/ci/$TARGET/run_tests.sh;
run: |
if [ "$TARGET" = "linux" ]; then
scripts/ci/$TARGET/$ARCH/build.sh;
scripts/ci/$TARGET/$ARCH/run_tests.sh;
else
scripts/ci/$TARGET/build.sh;
scripts/ci/$TARGET/$ARCH/build.sh;
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
build-linux-22:
runs-on: ubuntu-22.04
strategy:
matrix:
cfg:
- {target: linux, arch: 64, gcc: 10}
env:
TARGET: ${{matrix.cfg.target}}
GCC: ${{matrix.cfg.gcc}}
ARCH: ${{matrix.cfg.arch}}
steps:
- name: Remove Old lib-unwind
run: if [ "$TARGET" = "linux" ]; then
sudo apt-get remove libunwind-14 -y;
fi

# build-linux64-2204:
# runs-on: ubuntu-22.04
# strategy:
# matrix:
# cfg:
# - {target: linux64, libs: 64gcc6}
# env:
# TARGET: ${{matrix.cfg.target}}
# steps:
# - name: Remove Old lib-unwind
# run: if [ "$TARGET" = "linux64" ]; then
# sudo apt-get remove libunwind-14 -y;
# fi
# - name: Cache Packages
# uses: awalsh128/cache-apt-pkgs-action@latest
# with:
# 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
# version: 1.0

# - uses: actions/checkout@v4
# - name: ccache
# uses: hendrikmuhs/ccache-action@v1.2.14
# with:
# key: ${{ matrix.cfg.target }}-${{ matrix.cfg.libs }}

# - name: Download libs
# run: ./scripts/linux/download_libs.sh -a ${{matrix.cfg.libs}}
# - name: Install dependencies
# run: ./scripts/ci/$TARGET/install.sh;
# - name: Build
# run: if [ "$TARGET" = "linux64" ]; then
# scripts/ci/linux64/build.sh;
# scripts/ci/$TARGET/run_tests.sh;
# else
# scripts/ci/$TARGET/build.sh;
# fi
# - name: Cache Packages
# uses: awalsh128/cache-apt-pkgs-action@latest
# with:
# 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
# version: 1.0

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- uses: actions/checkout@v4.2.2
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.14
with:
key: ${{ matrix.cfg.target }}

- name: Install dependencies
run: ./scripts/ci/$TARGET/$ARCH/install.sh;

- name: Download libs
run: ./scripts/linux/download_libs.sh -t $RELEASE -a ${{matrix.cfg.arch}} -g ${{matrix.cfg.GCC}}

- name: Build
run: |
if [ "$TARGET" = "linux" ]; then
scripts/ci/$TARGET/$ARCH/build.sh;
scripts/ci/$TARGET/$ARCH/run_tests.sh;
else
scripts/ci/$TARGET/$ARCH/build.sh;
fi
build-macos:
runs-on: macos-15
needs: build-linux
strategy:
matrix:
cfg:
- { target: osx, opt: "xcode" }
- { target: osx, opt: "makefiles" }
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.2
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2.14
with:
9 changes: 4 additions & 5 deletions addons/ofxAssimp/addon_config.mk
Original file line number Diff line number Diff line change
@@ -62,17 +62,17 @@ common:
# a specific platform
# ADDON_LIBS_EXCLUDE =

linuxarmv6l:
linux/armv6l:
ADDON_PKG_CONFIG_LIBRARIES = assimp
ADDON_LIBS_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp
ADDON_INCLUDES_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp/%

linuxarmv7l:
linux/armv7l:
ADDON_PKG_CONFIG_LIBRARIES = assimp
ADDON_LIBS_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp
ADDON_INCLUDES_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp/%

linuxaarch64:
linux/aarch64:
ADDON_PKG_CONFIG_LIBRARIES = assimp
ADDON_LIBS_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp
ADDON_INCLUDES_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp/%
@@ -82,7 +82,7 @@ linux:
ADDON_LIBS_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp
ADDON_INCLUDES_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp/%

linux64:
linux/64:
ADDON_PKG_CONFIG_LIBRARIES = assimp
ADDON_LIBS_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp
ADDON_INCLUDES_EXCLUDE = ../ofxAssimpModelLoader/libs/assimp/%
@@ -101,7 +101,6 @@ android/x86:
ADDON_LIBS=
ADDON_LIBS+=../ofxAssimpModelLoader/libs/assimp/lib/android/x86/libassimp.a
ADDON_LIBS+=../ofxAssimpModelLoader/libs/assimp/lib/android/x86/libIrrXML.a

osx:
ADDON_LIBS=
ADDON_LIBS=../ofxAssimpModelLoader/libs/assimp/lib/macos/assimp.xcframework/macos-arm64_x86_64/assimp.a
13 changes: 7 additions & 6 deletions addons/ofxAssimpModelLoader/addon_config.mk
Original file line number Diff line number Diff line change
@@ -60,17 +60,17 @@ common:
# a specific platform
# ADDON_LIBS_EXCLUDE =

linuxarmv6l:
linux/armv6l:
ADDON_PKG_CONFIG_LIBRARIES = assimp
ADDON_LIBS_EXCLUDE = libs/assimp
ADDON_INCLUDES_EXCLUDE = libs/assimp/%

linuxarmv7l:
linux/armv7l:
ADDON_PKG_CONFIG_LIBRARIES = assimp
ADDON_LIBS_EXCLUDE = libs/assimp
ADDON_INCLUDES_EXCLUDE = libs/assimp/%

linuxaarch64:
linux/aarch64:
ADDON_PKG_CONFIG_LIBRARIES = assimp
ADDON_LIBS_EXCLUDE = libs/assimp
ADDON_INCLUDES_EXCLUDE = libs/assimp/%
@@ -80,7 +80,7 @@ linux:
ADDON_LIBS_EXCLUDE = libs/assimp
ADDON_INCLUDES_EXCLUDE = libs/assimp/%

linux64:
linux/64:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the old linux64 and linuxarmv6l still work for PG etc?

ADDON_PKG_CONFIG_LIBRARIES = assimp
ADDON_LIBS_EXCLUDE = libs/assimp
ADDON_INCLUDES_EXCLUDE = libs/assimp/%
@@ -99,10 +99,11 @@ android/x86:
ADDON_LIBS=
ADDON_LIBS+=libs/assimp/lib/android/x86/libassimp.a
ADDON_LIBS+=libs/assimp/lib/android/x86/libIrrXML.a

ios:
ADDON_INCLUDES_EXCLUDE = libs/assimp/include/%
osx:
ADDON_INCLUDES_EXCLUDE = libs/assimp/include/%
ADDON_LIBS=
ADDON_LIBS=libs/assimp/lib/macos/assimp.xcframework/macos-arm64_x86_64/assimp.a

emscripten:
ADDON_LIBS=
8 changes: 4 additions & 4 deletions addons/ofxKinect/addon_config.mk
Original file line number Diff line number Diff line change
@@ -68,7 +68,7 @@ common:
# a specific platform
# ADDON_INCLUDES_EXCLUDE =

linux64:
linux/64:
# linux only, any library that should be included in the project using
# pkg-config
ADDON_PKG_CONFIG_LIBRARIES = libusb-1.0
@@ -127,7 +127,7 @@ vs:
# when parsing the file system looking for include paths exclude this for all or
# a specific platform

linuxarmv6l:
linux/armv6l:
# linux only, any library that should be included in the project using
# pkg-config
ADDON_PKG_CONFIG_LIBRARIES = libusb-1.0
@@ -143,7 +143,7 @@ linuxarmv6l:
ADDON_INCLUDES_EXCLUDE += libs/libusb-1.0/%


linuxarmv7l:
linux/armv7l:
# linux only, any library that should be included in the project using
# pkg-config
ADDON_PKG_CONFIG_LIBRARIES = libusb-1.0
@@ -158,7 +158,7 @@ linuxarmv7l:
ADDON_INCLUDES_EXCLUDE = libs/libfreenect/platform/%
ADDON_INCLUDES_EXCLUDE += libs/libusb-1.0/%

linuxaarch64:
linuxa/arch64:
# linux only, any library that should be included in the project using
# pkg-config
ADDON_PKG_CONFIG_LIBRARIES = libusb-1.0
3 changes: 3 additions & 0 deletions addons/ofxKinect/libs/libfreenect/platform/windows/unistd.h
Original file line number Diff line number Diff line change
@@ -26,6 +26,8 @@

#pragma once

#ifdef _WIN32

#include <stdint.h>
#include <windows.h>

@@ -53,3 +55,4 @@ static void usleep(__int64 usec)
WaitForSingleObject(timer, INFINITE);
CloseHandle(timer);
}
#endif
8 changes: 4 additions & 4 deletions addons/ofxOpenCv/addon_config.mk
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ common:
# a specific platform
# ADDON_LIBS_EXCLUDE =

linux64:
linux/64:
ADDON_PKG_CONFIG_LIBRARIES = opencv4 harfbuzz
ADDON_LIBS_EXCLUDE = libs/opencv/%
ADDON_INCLUDES_EXCLUDE = libs/opencv
@@ -72,19 +72,19 @@ linux:
ADDON_INCLUDES_EXCLUDE = libs/opencv
ADDON_INCLUDES_EXCLUDE += libs/opencv/%

linuxarmv6l:
linux/armv6l:
ADDON_PKG_CONFIG_LIBRARIES = opencv4
ADDON_LIBS_EXCLUDE = libs/opencv/%
ADDON_INCLUDES_EXCLUDE = libs/opencv
ADDON_INCLUDES_EXCLUDE += libs/opencv/%

linuxarmv7l:
linux/armv7l:
ADDON_PKG_CONFIG_LIBRARIES = opencv4
ADDON_LIBS_EXCLUDE = libs/opencv/%
ADDON_INCLUDES_EXCLUDE = libs/opencv
ADDON_INCLUDES_EXCLUDE += libs/opencv/%

linuxaarch64:
linux/aarch64:
ADDON_PKG_CONFIG_LIBRARIES = opencv4
ADDON_LIBS_EXCLUDE = libs/opencv/%
ADDON_INCLUDES_EXCLUDE = libs/opencv
8 changes: 4 additions & 4 deletions addons/ofxOsc/addon_config.mk
Original file line number Diff line number Diff line change
@@ -68,23 +68,23 @@ common:
# a specific platform
# ADDON_INCLUDES_EXCLUDE =

linuxarmv6l:
linux/armv6l:
ADDON_SOURCES_EXCLUDE = libs/oscpack/src/ip/win32/%
ADDON_INCLUDES_EXCLUDE = libs/oscpack/src/ip/win32

linuxarmv7l:
linux/armv7l:
ADDON_SOURCES_EXCLUDE = libs/oscpack/src/ip/win32/%
ADDON_INCLUDES_EXCLUDE = libs/oscpack/src/ip/win32

linuxaarch64:
linux/aarch64:
ADDON_SOURCES_EXCLUDE = libs/oscpack/src/ip/win32/%
ADDON_INCLUDES_EXCLUDE = libs/oscpack/src/ip/win32

linux:
ADDON_SOURCES_EXCLUDE = libs/oscpack/src/ip/win32/%
ADDON_INCLUDES_EXCLUDE = libs/oscpack/src/ip/win32

linux64:
linux/64:
ADDON_SOURCES_EXCLUDE = libs/oscpack/src/ip/win32/%
ADDON_INCLUDES_EXCLUDE = libs/oscpack/src/ip/win32

7 changes: 4 additions & 3 deletions addons/ofxPoco/addon_config.mk
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ common:

ADDON_SOURCES_EXCLUDE = libs/poco/include/%

linux64:
linux/64:
ADDON_LDFLAGS = -lPocoNetSSL
ADDON_LDFLAGS += -lPocoNet
ADDON_LDFLAGS += -lPocoCrypto
@@ -74,7 +74,7 @@ linux64:
ADDON_LDFLAGS += -lcrypto
ADDON_LDFLAGS += -lssl

linuxarmv6l:
linux/armv6l:
ADDON_LDFLAGS = -lPocoNetSSL
ADDON_LDFLAGS += -lPocoNet
ADDON_LDFLAGS += -lPocoCrypto
@@ -84,7 +84,7 @@ linuxarmv6l:
ADDON_LDFLAGS += -lcrypto
ADDON_LDFLAGS += -lssl

linuxarmv7l:
linux/armv7l:
ADDON_LDFLAGS = -lPocoNetSSL
ADDON_LDFLAGS += -lPocoNet
ADDON_LDFLAGS += -lPocoCrypto
@@ -95,6 +95,7 @@ linuxarmv7l:
ADDON_LDFLAGS += -lcrypto
ADDON_LDFLAGS += -lssl


msys2:
ADDON_LDFLAGS = -lPocoNetSSL
ADDON_LDFLAGS += -lPocoNet
31 changes: 12 additions & 19 deletions addons/ofxSvg/addon_config.mk
Original file line number Diff line number Diff line change
@@ -60,29 +60,22 @@ common:
# a specific platform
# ADDON_LIBS_EXCLUDE =

osx:
ADDON_LIBS = libs/svgtiny/lib/macos/svgtiny.xcframework/macos-arm64_x86_64/libsvgtiny.a
ADDON_LIBS += libs/libxml2/lib/macos/libxml2.xcframework/macos-arm64_x86_64/libxml2.a

ios:
ADDON_LIBS = libs/svgtiny/lib/ios/svgtiny.a
ADDON_LIBS += libs/libxml2/lib/ios/xml2.a
linux/64:
ADDON_LIBS = libs/svgtiny/lib/linux/64/libsvgtiny.a
ADDON_LIBS += libs/libxml2/lib/linux/64/libxml2.a

linux64:
ADDON_LIBS = libs/svgtiny/lib/linux64/libsvgtiny.a
ADDON_LIBS += libs/libxml2/lib/linux64/libxml2.a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise will libs still get picked up in older addons from lib/linux64

linux/armv6l:
ADDON_LIBS = libs/svgtiny/lib/linux/armv6l/libsvgtiny.a
ADDON_LIBS += libs/libxml2/lib/linux/armv6l/libxml2.a

linuxarmv6l:
ADDON_LIBS = libs/svgtiny/lib/linuxarmv6l/libsvgtiny.a
ADDON_LIBS += libs/libxml2/lib/linuxarmv6l/libxml2.a
linux/armv7l:
ADDON_LIBS = libs/svgtiny/lib/linux/armv7l/libsvgtiny.a
ADDON_LIBS += libs/libxml2/lib/linux/armv7l/libxml2.a

linuxarmv7l:
ADDON_LIBS = libs/svgtiny/lib/linuxarmv7l/libsvgtiny.a
ADDON_LIBS += libs/libxml2/lib/linuxarmv7l/libxml2.a

linuxaarch64:
ADDON_LIBS = libs/svgtiny/lib/linuxaarch64/libsvgtiny.a
ADDON_LIBS += libs/libxml2/lib/linuxaarch64/libxml2.a
linux/aarch64:
ADDON_LIBS = libs/svgtiny/lib/linux/aarch64/libsvgtiny.a
ADDON_LIBS += libs/libxml2/lib/linux/aarch64/libxml2.a

msys2:
ADDON_PKG_CONFIG_LIBRARIES = libxml-2.0
328 changes: 187 additions & 141 deletions libs/openFrameworks/app/ofAppGLFWWindow.cpp
Original file line number Diff line number Diff line change
@@ -11,15 +11,18 @@
#include "ofIcon.h"
#include "ofImage.h"
#define GLFW_EXPOSE_NATIVE_X11
#define GLFW_EXPOSE_NATIVE_WAYLAND
#ifndef TARGET_OPENGLES
#define GLFW_EXPOSE_NATIVE_GLX
#else
#define GLFW_EXPOSE_NATIVE_EGL
#endif
#include <GLFW/glfw3native.h>
#include <X11/XKBlib.h>
#include <X11/Xatom.h>
#include <X11/extensions/Xrandr.h>
#ifdef GLFW_EXPOSE_NATIVE_X11
#include <X11/XKBlib.h>
#include <X11/Xatom.h>
#include <X11/extensions/Xrandr.h>
#endif
#include <xcb/xcb.h>
#include <xcb/xcbext.h>
#elif defined(TARGET_OSX)
@@ -59,6 +62,10 @@ ofAppGLFWWindow::ofAppGLFWWindow()
currentW = 0;
currentH = 0;

#if defined(TARGET_LINUX) && !defined(TARGET_RASPBERRY_PI_LEGACY)
usingWayland = false;
#endif

glfwSetErrorCallback(error_cb);
}

@@ -160,6 +167,11 @@ void ofAppGLFWWindow::setup(const ofGLESWindowSettings & settings) {
ofLogError("ofAppGLFWWindow") << "couldn't init GLFW";
return;
}

#if defined(TARGET_LINUX) && !defined(TARGET_RASPBERRY_PI_LEGACY)
usingWayland = (glfwGetPlatform() == GLFW_PLATFORM_WAYLAND);
ofLogVerbose("ofAppGLFWWindow") << "Running under " << (usingWayland ? "Wayland" : "X11");
#endif

// ofLogNotice("ofAppGLFWWindow") << "WINDOW MODE IS " << screenMode;

@@ -399,31 +411,45 @@ void ofAppGLFWWindow::setup(const ofGLESWindowSettings & settings) {
glfwSetWindowRefreshCallback(windowP, refresh_cb);

#ifdef TARGET_LINUX
XSetLocaleModifiers("");
xim = XOpenIM(getX11Display(), 0, 0, 0);
if (!xim) {
// fallback to internal input method
XSetLocaleModifiers("@im=none");
xim = XOpenIM(getX11Display(), 0, 0, 0);
}
xic = XCreateIC(xim,
XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
XNClientWindow, getX11Window(),
XNFocusWindow, getX11Window(),
NULL);
#endif
if (!usingWayland) {
XSetLocaleModifiers("");
xim = XOpenIM(getX11Display(), 0, 0, 0);
if (!xim) {
// fallback to internal input method
XSetLocaleModifiers("@im=none");
xim = XOpenIM(getX11Display(), 0, 0, 0);
}
xic = XCreateIC(xim,
XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
XNClientWindow, getX11Window(),
XNFocusWindow, getX11Window(),
NULL);
} else {
// Wayland input is handled by GLFW directly
ofLogVerbose("ofAppGLFWWindow") << "Using Wayland native input handling";
}

#endif
}

#ifdef TARGET_LINUX
//------------------------------------------------------------
void ofAppGLFWWindow::setWindowIcon(const of::filesystem::path & path) {
if (usingWayland) {
ofLogWarning("ofAppGLFWWindow") << "Setting window icon is not supported on Wayland";
return;
}
ofPixels iconPixels;
ofLoadImage(iconPixels, path);
setWindowIcon(iconPixels);
}

//------------------------------------------------------------
void ofAppGLFWWindow::setWindowIcon(const ofPixels & iconPixels) {
if (usingWayland) {
ofLogWarning("ofAppGLFWWindow") << "Setting window icon is not supported on Wayland";
return;
}
iconSet = true;
int length = 2 + iconPixels.getWidth() * iconPixels.getHeight();
vector<unsigned long> buffer(length);
@@ -744,127 +770,135 @@ void ofAppGLFWWindow::setup(const ofGLESWindowSettings & settings) {
}

#ifdef TARGET_LINUX
#include <X11/Xatom.h>

Window nativeWin = glfwGetX11Window(windowP);
Display * display = glfwGetX11Display();
if (targetWindowMode == OF_FULLSCREEN) {

#ifdef TARGET_RASPBERRY_PI
// save window shape before going fullscreen
if (windowP) {
int tmpW, tmpH;
glfwGetWindowSize(windowP, &tmpW, &tmpH);
windowRect.setSize(tmpW, tmpH);
}
#endif

int monitorCount;
GLFWmonitor ** monitors = glfwGetMonitors(&monitorCount);
if (settings.multiMonitorFullScreen && monitorCount > 1) {
// find the monitors at the edges of the virtual desktop
int minx = numeric_limits<int>::max();
int miny = numeric_limits<int>::max();
int maxx = numeric_limits<int>::min();
int maxy = numeric_limits<int>::min();
int x, y, w, h;
int monitorLeft = 0, monitorRight = 0, monitorTop = 0, monitorBottom = 0;
for (int i = 0; i < monitorCount; i++) {
glfwGetMonitorPos(monitors[i], &x, &y);
auto videoMode = glfwGetVideoMode(monitors[i]);
w = videoMode->width;
h = videoMode->height;
if (x < minx) {
monitorLeft = i;
minx = x;
}
if (y < miny) {
monitorTop = i;
miny = y;
}
if (x + w > maxx) {
monitorRight = i;
maxx = x + w;
}
if (y + h > maxy) {
monitorBottom = i;
maxy = y + h;
}
}

// send fullscreen_monitors event with the edges monitors
Atom m_net_fullscreen_monitors = XInternAtom(display, "_NET_WM_FULLSCREEN_MONITORS", false);

XEvent xev;

xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
xev.xclient.send_event = True;
xev.xclient.window = nativeWin;
xev.xclient.message_type = m_net_fullscreen_monitors;
xev.xclient.format = 32;

xev.xclient.data.l[0] = monitorTop;
xev.xclient.data.l[1] = monitorBottom;
xev.xclient.data.l[2] = monitorLeft;
xev.xclient.data.l[3] = monitorRight;
xev.xclient.data.l[4] = 1;
XSendEvent(display, RootWindow(display, DefaultScreen(display)),
False, SubstructureRedirectMask | SubstructureNotifyMask, &xev);
currentW = maxx - minx;
currentH = maxy - minx;
} else {
auto monitor = glfwGetWindowMonitor(windowP);
if (monitor) {
auto videoMode = glfwGetVideoMode(monitor);
if (videoMode) {
currentW = videoMode->width;
currentH = videoMode->height;
}
}
}
}

// send fullscreen event
Atom m_net_state = XInternAtom(display, "_NET_WM_STATE", false);
Atom m_net_fullscreen = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", false);

XEvent xev;

xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
xev.xclient.send_event = True;
xev.xclient.window = nativeWin;
xev.xclient.message_type = m_net_state;
xev.xclient.format = 32;

if (fullscreen)
xev.xclient.data.l[0] = 1;
else
xev.xclient.data.l[0] = 0;

xev.xclient.data.l[1] = m_net_fullscreen;
xev.xclient.data.l[2] = 0;
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0;
XSendEvent(display, RootWindow(display, DefaultScreen(display)),
False, SubstructureRedirectMask | SubstructureNotifyMask, &xev);

// tell the window manager to bypass composition for this window in fullscreen for speed
// it'll probably help solving vsync issues
Atom m_bypass_compositor = XInternAtom(display, "_NET_WM_BYPASS_COMPOSITOR", False);
unsigned long value = fullscreen ? 1 : 0;
XChangeProperty(display, nativeWin, m_bypass_compositor, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&value, 1);

XFlush(display);

#ifdef TARGET_RASPBERRY_PI
if (!fullscreen) {
needsResizeCheck = true;
}
#endif

// setWindowShape(windowW, windowH);
if (!usingWayland) {
Window nativeWin = glfwGetX11Window(windowP);
Display * display = glfwGetX11Display();
if (targetWindowMode == OF_FULLSCREEN) {

#ifdef TARGET_RASPBERRY_PI
// save window shape before going fullscreen
if (windowP) {
int tmpW, tmpH;
glfwGetWindowSize(windowP, &tmpW, &tmpH);
windowRect.setSize(tmpW, tmpH);
}
#endif

int monitorCount;
GLFWmonitor ** monitors = glfwGetMonitors(&monitorCount);
if (settings.multiMonitorFullScreen && monitorCount > 1) {
// find the monitors at the edges of the virtual desktop
int minx = numeric_limits<int>::max();
int miny = numeric_limits<int>::max();
int maxx = numeric_limits<int>::min();
int maxy = numeric_limits<int>::min();
int x, y, w, h;
int monitorLeft = 0, monitorRight = 0, monitorTop = 0, monitorBottom = 0;
for (int i = 0; i < monitorCount; i++) {
glfwGetMonitorPos(monitors[i], &x, &y);
auto videoMode = glfwGetVideoMode(monitors[i]);
w = videoMode->width;
h = videoMode->height;
if (x < minx) {
monitorLeft = i;
minx = x;
}
if (y < miny) {
monitorTop = i;
miny = y;
}
if (x + w > maxx) {
monitorRight = i;
maxx = x + w;
}
if (y + h > maxy) {
monitorBottom = i;
maxy = y + h;
}
}

// send fullscreen_monitors event with the edges monitors
Atom m_net_fullscreen_monitors = XInternAtom(display, "_NET_WM_FULLSCREEN_MONITORS", false);

XEvent xev;

xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
xev.xclient.send_event = True;
xev.xclient.window = nativeWin;
xev.xclient.message_type = m_net_fullscreen_monitors;
xev.xclient.format = 32;

xev.xclient.data.l[0] = monitorTop;
xev.xclient.data.l[1] = monitorBottom;
xev.xclient.data.l[2] = monitorLeft;
xev.xclient.data.l[3] = monitorRight;
xev.xclient.data.l[4] = 1;
XSendEvent(display, RootWindow(display, DefaultScreen(display)),
False, SubstructureRedirectMask | SubstructureNotifyMask, &xev);
currentW = maxx - minx;
currentH = maxy - minx;
} else {
auto monitor = glfwGetWindowMonitor(windowP);
if (monitor) {
auto videoMode = glfwGetVideoMode(monitor);
if (videoMode) {
currentW = videoMode->width;
currentH = videoMode->height;
}
}
}
}

// send fullscreen event
Atom m_net_state = XInternAtom(display, "_NET_WM_STATE", false);
Atom m_net_fullscreen = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", false);

XEvent xev;

xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
xev.xclient.send_event = True;
xev.xclient.window = nativeWin;
xev.xclient.message_type = m_net_state;
xev.xclient.format = 32;

if (fullscreen)
xev.xclient.data.l[0] = 1;
else
xev.xclient.data.l[0] = 0;

xev.xclient.data.l[1] = m_net_fullscreen;
xev.xclient.data.l[2] = 0;
xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0;
XSendEvent(display, RootWindow(display, DefaultScreen(display)),
False, SubstructureRedirectMask | SubstructureNotifyMask, &xev);

// tell the window manager to bypass composition for this window in fullscreen for speed
// it'll probably help solving vsync issues
Atom m_bypass_compositor = XInternAtom(display, "_NET_WM_BYPASS_COMPOSITOR", False);
unsigned long value = fullscreen ? 1 : 0;
XChangeProperty(display, nativeWin, m_bypass_compositor, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&value, 1);

XFlush(display);

#ifdef TARGET_RASPBERRY_PI
if (!fullscreen) {
needsResizeCheck = true;
}
#endif
} else {
int monitorCount;
GLFWmonitor ** monitors = glfwGetMonitors(&monitorCount);
int monitorIdx = getCurrentMonitor();
if (fullscreen) {
auto mode = glfwGetVideoMode(monitors[monitorIdx]);
glfwSetWindowMonitor(windowP, monitors[monitorIdx], 0, 0, mode->width, mode->height, mode->refreshRate);
} else {
glfwSetWindowMonitor(windowP, nullptr, windowRect.x, windowRect.y, windowW, windowH, 0);
}
}

#elif defined(TARGET_OSX)

@@ -1738,17 +1772,29 @@ void ofAppGLFWWindow::setup(const ofGLESWindowSettings & settings) {

#if defined(TARGET_LINUX)
Display * ofAppGLFWWindow::getX11Display() {
return glfwGetX11Display();
return usingWayland ? nullptr : glfwGetX11Display();
}

Window ofAppGLFWWindow::getX11Window() {
return glfwGetX11Window(windowP);
return usingWayland ? 0 : glfwGetX11Window(windowP);
}

XIC ofAppGLFWWindow::getX11XIC() {
return xic;
return usingWayland ? nullptr : xic;
}
#endif

wl_display * ofAppGLFWWindow::getWaylandDisplay() {
return usingWayland ? glfwGetWaylandDisplay() : nullptr;
}

wl_surface * ofAppGLFWWindow::getWaylandSurface() {
return usingWayland ? glfwGetWaylandWindow(windowP) : nullptr;
}

bool ofAppGLFWWindow::isUsingWayland() const {
return usingWayland;
}
#endif

#if defined(TARGET_LINUX) && !defined(TARGET_OPENGLES)
GLXContext ofAppGLFWWindow::getGLXContext() {
9 changes: 9 additions & 0 deletions libs/openFrameworks/app/ofAppGLFWWindow.h
Original file line number Diff line number Diff line change
@@ -10,6 +10,8 @@
#if defined(TARGET_LINUX) && !defined(TARGET_RASPBERRY_PI_LEGACY)
typedef struct _XIM * XIM;
typedef struct _XIC * XIC;
typedef struct wl_display wl_display;
typedef struct wl_surface wl_surface;
#endif

class ofBaseApp;
@@ -171,6 +173,12 @@ class ofAppGLFWWindow : public ofAppBaseGLWindow {

void setWindowIcon(const of::filesystem::path & path);
void setWindowIcon(const ofPixels & iconPixels);

wl_display * getWaylandDisplay();
wl_surface * getWaylandSurface();

// Helper to detect the current backend
bool isUsingWayland() const;
#endif

#if defined(TARGET_LINUX) && !defined(TARGET_OPENGLES)
@@ -214,6 +222,7 @@ class ofAppGLFWWindow : public ofAppBaseGLWindow {
#if defined(TARGET_LINUX) && !defined(TARGET_RASPBERRY_PI_LEGACY)
XIM xim;
XIC xic;
bool usingWayland;
#endif

std::unique_ptr<ofCoreEvents> coreEvents;
Original file line number Diff line number Diff line change
@@ -27,4 +27,6 @@

include $(OF_SHARED_MAKEFILES_PATH)/config.linux.common.mk

PLATFORM_LDFLAGS += -fuse-ld=gold
ifneq ($(shell command -v ld.gold),)
PLATFORM_LDFLAGS += -fuse-ld=gold
endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
###############################################################################
# CONFIGURE CORE PLATFORM MAKEFILE
# This file is where we make platform and architecture specific
# configurations. This file can be specified for a generic architecture or can
# be defined as variants. For instance, normally this file will be located in
# a platform specific subpath such as
#
# $(OF_ROOT)/libs/openFrameworksComplied/linux64
#
# This file will then be a generic platform file like:
#
# configure.linux64.default.make
#
# Or it can specify a specific platform variant like:
#
# configure.linuxarmv6l.raspberrypi.make
#
################################################################################

################################################################################
# include common rules
#
# all linux systems have several rules in common so most of them are included
# from the following file
#
################################################################################

include $(OF_SHARED_MAKEFILES_PATH)/config.linux.common.mk


################################################################################
# PLATFORM CFLAGS
# This is a list of fully qualified CFLAGS required when compiling for this
# platform. These flags will always be added when compiling a project or the
# core library. These flags are presented to the compiler AFTER the
# PLATFORM_OPTIMIZATION_CFLAGS below.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################

PLATFORM_LDFLAGS += -no-pie
# PLATFORM_LDFLAGS += -nostartfiles

PLATFORM_CFLAGS += -march=armv8-a
PLATFORM_CFLAGS += -mcpu=cortex-a72
PLATFORM_CFLAGS += -mtune=cortex-a72
# PLATFORM_CFLAGS += -Wall
# PLATFORM_CFLAGS += -Werror
PLATFORM_CFLAGS += -fPIC
PLATFORM_CFLAGS += -ftree-vectorize
PLATFORM_CFLAGS += -Wno-psabi
PLATFORM_CFLAGS += -pipe

################################################################################
# PLATFORM LIBRARIES
# These are library names/paths that are platform specific and are specified
# using names or paths. The library flag (i.e. -l) is prefixed automatically.
#
# PLATFORM_LIBRARIES are libraries that can be found in the library search
# paths.
# PLATFORM_STATIC_LIBRARIES is a list of required static libraries.
# PLATFORM_SHARED_LIBRARIES is a list of required shared libraries.
# PLATFORM_PKG_CONFIG_LIBRARIES is a list of required libraries that are
# under system control and are easily accesible via the package
# configuration utility (i.e. pkg-config)
#
# See the helpfile for the -l flag here for more information:
# http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################

PLATFORM_PKG_CONFIG_LIBRARIES += glesv1_cm
PLATFORM_PKG_CONFIG_LIBRARIES += glesv2
PLATFORM_PKG_CONFIG_LIBRARIES += egl


################################################################################
# PLATFORM CORE EXCLUSIONS
# During compilation, these makefiles will generate lists of sources, headers
# and third party libraries to be compiled and linked into a program or core
# library. The PLATFORM_CORE_EXCLUSIONS is a list of fully qualified file
# paths that will be used to exclude matching paths and files during list
# generation.
#
# Each item in the PLATFORM_CORE_EXCLUSIONS list will be treated as a complete
# string unless teh user adds a wildcard (%) operator to match subdirectories.
# GNU make only allows one wildcard for matching. The second wildcard (%) is
# treated literally.
#
# Note: Leave a leading space when adding list items with the += operator
################################################################################

PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/sound/ofFmodSoundPlayer.cpp

ifeq ($(CROSS_COMPILING),1)
ifdef MAKEFILE_DEBUG
$(info detected cross compiling $(CROSS_COMPILING))
endif

ifdef GCC_PREFIX
#You have specified GCC_PREFIX with an environment variable
else
GCC_PREFIX = aarch64-linux-gnu
endif

PLATFORM_CXX = /usr/bin/$(GCC_PREFIX)-g++
PLATFORM_CC = /usr/bin/$(GCC_PREFIX)-gcc
PLATFORM_AR = /usr/bin/$(GCC_PREFIX)-ar
PLATFORM_LD = /usr/bin/$(GCC_PREFIX)-ld

SYSROOT=$(RPI_ROOT)

PLATFORM_CFLAGS += --sysroot=$(SYSROOT)

PLATFORM_LIBRARY_SEARCH_PATHS += /usr/lib/$(GCC_PREFIX)
PLATFORM_LIBRARY_SEARCH_PATHS += /lib/$(GCC_PREFIX)
PLATFORM_LIBRARY_SEARCH_PATHS += $(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/blas
PLATFORM_LIBRARY_SEARCH_PATHS += $(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/lapack

PLATFORM_LDFLAGS += --sysroot=$(SYSROOT)
PLATFORM_LDFLAGS += -lblas -llapack
PLATFORM_LDFLAGS += -Xlinker -rpath-link=/usr/lib/$(GCC_PREFIX)
PLATFORM_LDFLAGS += -Xlinker -rpath-link=/lib/$(GCC_PREFIX)
PLATFORM_LDFLAGS += -Xlinker -rpath-link=/usr/lib/$(GCC_PREFIX)/pulseaudio
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/lapack
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/blas

PKG_CONFIG_LIBDIR += /usr/lib/pkgconfig:/usr/lib/$(GCC_PREFIX)/pkgconfig:/usr/share/pkgconfig

endif
28 changes: 0 additions & 28 deletions libs/openFrameworksCompiled/project/linux/config.linux.default.mk

This file was deleted.

467 changes: 0 additions & 467 deletions libs/openFrameworksCompiled/project/linux/libopenFrameworks.cbp

This file was deleted.

Original file line number Diff line number Diff line change
@@ -95,7 +95,7 @@ PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/sound/ofFmodSoundPlay

ifeq ($(CROSS_COMPILING),1)
ifdef MAKEFILE_DEBUG
$(info detected cross compiling $(CROSS_COMPILING))
$(info detected cross compiling $(CROSS_COMPILING))
endif

ifdef GCC_PREFIX
68 changes: 34 additions & 34 deletions libs/openFrameworksCompiled/project/makefileCommon/config.addons.mk
Original file line number Diff line number Diff line change
@@ -3,22 +3,22 @@
########################################################################

ifeq ($(PLATFORM_OS),Darwin)
PLATFORM_ALTERNATIVE := osx
else
PLATFORM_ALTERNATIVE := osx
else
PLATFORM_ALTERNATIVE := void
endif

# Variable containing all grep commands to exclude unwanted paths
EXCLUDE_PATHS_GREP = grep -v "/tvos-arm64" | \
grep -v "/tvos-arm64_x86_64-simulator" | \
grep -v "/ios-arm64" | \
grep -v "/ios-arm64_x86_64-simulator" | \
grep -v "/ios-arm64_x86_64-maccatalyst" | \
grep -v "/xros-arm64" | \
grep -v "/xros-arm64_x86_64-simulator" | \
grep -v "/watchos-arm64_32_armv7k" | \
grep -v "/watchos-arm64_i386-simulator" | \
grep -v "/\.[^\.]"
grep -v "/tvos-arm64_x86_64-simulator" | \
grep -v "/ios-arm64" | \
grep -v "/ios-arm64_x86_64-simulator" | \
grep -v "/ios-arm64_x86_64-maccatalyst" | \
grep -v "/xros-arm64" | \
grep -v "/xros-arm64_x86_64-simulator" | \
grep -v "/watchos-arm64_32_armv7k" | \
grep -v "/watchos-arm64_i386-simulator" | \
grep -v "/\.[^\.]"

# parses addons includes, in PARSED_ADDON_INCLUDES receives full PATHS to addons
define parse_addons_includes
@@ -232,7 +232,7 @@ define parse_addon
$(eval PROJECT_ADDONS += $(addon_dep)) \
$(call parse_addon,$(addon_dep)) \
) \
)
)
endef


@@ -271,26 +271,26 @@ OF_PROJECT_ADDONS_DEPS = $(patsubst %.o,%.d,$(PROJECT_ADDONS_OBJ_FILES))
########################################################################
# print debug information if so instructed
ifdef MAKEFILE_DEBUG
$(info ---PROJECT_ADDONS_PATHS---)
$(foreach v, $(PROJECT_ADDONS_PATHS),$(info $(v)))
$(info ---PROJECT_ADDONS_WITH_CONFIG---)
$(foreach v, $(PROJECT_ADDONS_WITH_CONFIG),$(info $(v)))
$(info ---PROJECT_ADDONS_INCLUDES---)
$(foreach v, $(PROJECT_ADDONS_INCLUDES),$(info $(v)))
$(info ---PROJECT_ADDONS_SOURCE_FILES---)
$(foreach v, $(PROJECT_ADDONS_SOURCE_FILES),$(info $(v)))
$(info ---PROJECT_ADDONS_LIBS---)
$(foreach v, $(PROJECT_ADDONS_LIBS),$(info $(v)))
$(info ---PROJECT_ADDONS_OBJFILES---)
$(foreach v, $(PROJECT_ADDONS_OBJFILES),$(info $(v)))
$(info ---PROJECT_ADDONS_BASE_CFLAGS---)
$(foreach v, $(PROJECT_ADDONS_BASE_CFLAGS),$(info $(v)))
$(info ---PROJECT_ADDONS_DEFINES_CFLAGS---)
$(foreach v, $(PROJECT_ADDONS_DEFINES_CFLAGS),$(info $(v)))
$(info ---PROJECT_ADDONS_INCLUDES_CFLAGS---)
$(foreach v, $(PROJECT_ADDONS_INCLUDES_CFLAGS),$(info $(v)))
$(info ---PROJECT_ADDONS_LDFLAGS---)
$(foreach v, $(PROJECT_ADDONS_LDFLAGS),$(info $(v)))
$(info ---PROJECT_ADDONS_DATA---)
$(foreach v, $(PROJECT_ADDONS_DATA),$(info $(v)))
$(info ---PROJECT_ADDONS_PATHS---)
$(foreach v, $(PROJECT_ADDONS_PATHS),$(info $(v)))
$(info ---PROJECT_ADDONS_WITH_CONFIG---)
$(foreach v, $(PROJECT_ADDONS_WITH_CONFIG),$(info $(v)))
$(info ---PROJECT_ADDONS_INCLUDES---)
$(foreach v, $(PROJECT_ADDONS_INCLUDES),$(info $(v)))
$(info ---PROJECT_ADDONS_SOURCE_FILES---)
$(foreach v, $(PROJECT_ADDONS_SOURCE_FILES),$(info $(v)))
$(info ---PROJECT_ADDONS_LIBS---)
$(foreach v, $(PROJECT_ADDONS_LIBS),$(info $(v)))
$(info ---PROJECT_ADDONS_OBJFILES---)
$(foreach v, $(PROJECT_ADDONS_OBJFILES),$(info $(v)))
$(info ---PROJECT_ADDONS_BASE_CFLAGS---)
$(foreach v, $(PROJECT_ADDONS_BASE_CFLAGS),$(info $(v)))
$(info ---PROJECT_ADDONS_DEFINES_CFLAGS---)
$(foreach v, $(PROJECT_ADDONS_DEFINES_CFLAGS),$(info $(v)))
$(info ---PROJECT_ADDONS_INCLUDES_CFLAGS---)
$(foreach v, $(PROJECT_ADDONS_INCLUDES_CFLAGS),$(info $(v)))
$(info ---PROJECT_ADDONS_LDFLAGS---)
$(foreach v, $(PROJECT_ADDONS_LDFLAGS),$(info $(v)))
$(info ---PROJECT_ADDONS_DATA---)
$(foreach v, $(PROJECT_ADDONS_DATA),$(info $(v)))
endif
Original file line number Diff line number Diff line change
@@ -44,13 +44,13 @@ ifndef GST_VERSION
ifeq ($(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?),0)
GST_VERSION = 1.0
ifdef MAKEFILE_DEBUG
$(info GSTVERSION=$(GST_VERSION))
$(info GSTVERSION=$(GST_VERSION))
endif
else
GST_VERSION = 0.10
ifdef MAKEFILE_DEBUG
$(info GSTVERSION=$(GST_VERSION))
$(info $(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?))
$(info GSTVERSION=$(GST_VERSION))
$(info $(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?))
endif
endif
else
@@ -248,6 +248,8 @@ endif
# core sources
PLATFORM_CORE_EXCLUSIONS += %.mm
PLATFORM_CORE_EXCLUSIONS += %.m
PLATFORM_CORE_EXCLUSIONS += %.swift
PLATFORM_CORE_EXCLUSIONS += %.kotlin
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/video/ofDirectShowGrabber.cpp
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/video/ofDirectShowPlayer.cpp
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/video/ofMediaFoundationPlayer.cpp
@@ -260,17 +262,19 @@ else
endif

# third party
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/glew/%
# PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/glew/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/cairo/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/videoInput/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/freetype/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/FreeImage/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/assimp/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/rtAudio/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openssl/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/glfw/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/boost/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/curl/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/uriparser/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/metalangle/%
#PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/glfw/%

ifeq ($(USE_FMOD),0)
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/fmod/%
@@ -345,7 +349,7 @@ PLATFORM_SHARED_LIBRARIES =

PLATFORM_PKG_CONFIG_LIBRARIES =
PLATFORM_PKG_CONFIG_LIBRARIES += cairo
PLATFORM_PKG_CONFIG_LIBRARIES += zlib
# PLATFORM_PKG_CONFIG_LIBRARIES += zlib
PLATFORM_PKG_CONFIG_LIBRARIES += gstreamer-app-$(GST_VERSION)
PLATFORM_PKG_CONFIG_LIBRARIES += gstreamer-$(GST_VERSION)
PLATFORM_PKG_CONFIG_LIBRARIES += gstreamer-video-$(GST_VERSION)
@@ -371,17 +375,17 @@ ifeq "$(shell pkg-config --exists libcurl4 && echo 1)" "1"
endif


ifeq ($(CROSS_COMPILING),1)
ifeq "$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); pkg-config --exists glfw3 && echo 1)" "1"
PLATFORM_PKG_CONFIG_LIBRARIES += glfw3
PLATFORM_LIBRARIES += Xinerama
endif
else
ifeq "$(shell pkg-config --exists glfw3 && echo 1)" "1"
PLATFORM_PKG_CONFIG_LIBRARIES += glfw3
PLATFORM_LIBRARIES += Xinerama
endif
endif
# ifeq ($(CROSS_COMPILING),1)
# ifeq "$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); pkg-config --exists glfw3 && echo 1)" "1"
# PLATFORM_PKG_CONFIG_LIBRARIES += glfw3
# PLATFORM_LIBRARIES += Xinerama
# endif
# else
# ifeq "$(shell pkg-config --exists glfw3 && echo 1)" "1"
# PLATFORM_PKG_CONFIG_LIBRARIES += glfw3
# PLATFORM_LIBRARIES += Xinerama
# endif
# endif

ifeq ($(CROSS_COMPILING),1)
ifeq "$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); pkg-config --exists rtaudio && echo 1)" "1"
112 changes: 56 additions & 56 deletions libs/openFrameworksCompiled/project/makefileCommon/config.project.mk
Original file line number Diff line number Diff line change
@@ -113,18 +113,18 @@ OF_CORE_LIBRARY_LDFLAGS += $(addprefix -L,$(PLATFORM_LIBRARY_SEARCH_PATHS))
# DEBUG INFO
################################################################################
ifdef MAKEFILE_DEBUG
$(info =============================configure.core.flags.make========================)
$(info ---OF_CORE_LIBS_LDFLAGS---)
$(foreach v, $(OF_CORE_LIBS_LDFLAGS),$(info $(v)))
$(info =============================configure.core.flags.make========================)
$(info ---OF_CORE_LIBS_LDFLAGS---)
$(foreach v, $(OF_CORE_LIBS_LDFLAGS),$(info $(v)))

$(info ---OF_CORE_LIBS---)
$(foreach v, $(OF_CORE_LIBS),$(info $(v)))
$(info ---OF_CORE_LIBS---)
$(foreach v, $(OF_CORE_LIBS),$(info $(v)))
endif

################################# ADDONS ######################################

ifdef MAKEFILE_DEBUG
$(info ===================ADDONS================)
$(info ===================ADDONS================)
endif

# check to make sure OF_ROOT is defined
@@ -215,9 +215,9 @@ ifdef B_PROCESS_ADDONS
PROJECT_ADDONS = $(filter-out $(INVALID_PROJECT_ADDONS),$(REQUESTED_PROJECT_ADDONS))

ifdef MAKEFILE_DEBUG
$(info ---PROJECT_ADDONS---)
$(foreach v, $(PROJECT_ADDONS),$(info $(v)))
$(info --------------------)
$(info ---PROJECT_ADDONS---)
$(foreach v, $(PROJECT_ADDONS),$(info $(v)))
$(info --------------------)
endif

############################################################################
@@ -309,11 +309,11 @@ endif
OF_PROJECT_SOURCE_PATHS = $(filter-out $(OF_PROJECT_EXCLUSIONS),$(ALL_OF_PROJECT_SOURCE_PATHS))

ifdef MAKEFILE_DEBUG
$(info ---OF_PROJECT_SOURCE_PATHS---)
$(foreach v, $(OF_PROJECT_SOURCE_PATHS),$(info $(v)))
$(info ---OF_PROJECT_SOURCE_PATHS---)
$(foreach v, $(OF_PROJECT_SOURCE_PATHS),$(info $(v)))

$(info ---OF_PROJECT_EXCLUSIONS---)
$(foreach v, $(OF_PROJECT_EXCLUSIONS),$(info $(v)))
$(info ---OF_PROJECT_EXCLUSIONS---)
$(foreach v, $(OF_PROJECT_EXCLUSIONS),$(info $(v)))
endif

# find all sources inside the project's source directory (recursively)
@@ -328,8 +328,8 @@ OF_PROJECT_INCLUDES_CFLAGS := $(addprefix -I,$(filter-out $(PROJECT_INCLUDE_EXCL
OF_ADDON_INCLUDES_CFLAGS += $(addprefix -I,$(filter-out $(PROJECT_INCLUDE_EXCLUSIONS),$(PROJECT_ADDONS_INCLUDES)))

ifdef MAKEFILE_DEBUG
$(info ---OF_PROJECT_INCLUDES_CFLAGS---)
$(foreach v, $(OF_PROJECT_INCLUDES_CFLAGS),$(info $(v)))
$(info ---OF_PROJECT_INCLUDES_CFLAGS---)
$(foreach v, $(OF_PROJECT_INCLUDES_CFLAGS),$(info $(v)))
endif

################################################################################
@@ -391,7 +391,7 @@ OF_PROJECT_LDFLAGS += $(addprefix -framework ,$(PROJECT_ADDONS_FRAMEWORKS))

################################################################################
ifdef MAKEFILE_DEBUG
$(info ===================compile.project.make=============================)
$(info ===================compile.project.make=============================)
endif

ifdef PROJECT_CXX
@@ -410,18 +410,18 @@ ifdef PLATFORM_CC
CC ?= $(PLATFORM_CC)
endif

ifdef ${ccache}
ifdef ${ccache}
$(info 💿 Using CCACHE -- config.project.mk )
CXX := ${ccache} $(CXX)
CC := ${ccache} $(CXX)
endif
endif

ifdef PROJECT_RESOURCE_COMPILER
RESOURCE_COMPILER ?= $(PROJECT_RESOURCE_COMPILER)
RESOURCE_COMPILER ?= $(PROJECT_RESOURCE_COMPILER)
endif

ifdef PLATFORM_RESOURCE_COMPILER
RESOURCE_COMPILER ?= $(PLATFORM_RESOURCE_COMPILER)
RESOURCE_COMPILER ?= $(PLATFORM_RESOURCE_COMPILER)
endif

# TODO: what is this for?
@@ -488,23 +488,23 @@ ifeq ($(findstring Debug,$(TARGET_NAME)),Debug)
OPTIMIZATION_LDFLAGS = $(PROJECT_OPTIMIZATION_LDFLAGS_DEBUG)
endif

# Executable Icon
#################
# if defined, use the project debug icon.
# if no debug icon defined for the project, use the project release icon
# if no icon defined for the project, use the OF default debug icon defined for the platform
# leave ICON empty for default system icon
ifdef PROJECT_DEBUG_ICON
ICON = $(PROJECT_DEBUG_ICON)
else
ifdef PROJECT_RELEASE_ICON
ICON = $(PROJECT_RELEASE_ICON)
else
ifdef PLATFORM_DEBUG_ICON
ICON = $(PLATFORM_DEBUG_ICON)
endif
endif
endif
# Executable Icon
#################
# if defined, use the project debug icon.
# if no debug icon defined for the project, use the project release icon
# if no icon defined for the project, use the OF default debug icon defined for the platform
# leave ICON empty for default system icon
ifdef PROJECT_DEBUG_ICON
ICON = $(PROJECT_DEBUG_ICON)
else
ifdef PROJECT_RELEASE_ICON
ICON = $(PROJECT_RELEASE_ICON)
else
ifdef PLATFORM_DEBUG_ICON
ICON = $(PLATFORM_DEBUG_ICON)
endif
endif
endif
endif

ifeq ($(findstring Release,$(TARGET_NAME)),Release)
@@ -526,18 +526,18 @@ ifeq ($(findstring Release,$(TARGET_NAME)),Release)
OPTIMIZATION_LDFLAGS = $(PROJECT_OPTIMIZATION_LDFLAGS_RELEASE)
endif

# Executable Icon
#################
# if defined, use the project release icon.
# if no icon defined for the project, use the OF default release icon defined for the platform
# leave ICON empty for default system icon
ifdef PROJECT_RELEASE_ICON
ICON = $(PROJECT_RELEASE_ICON)
else
ifdef PLATFORM_RELEASE_ICON
ICON = $(PLATFORM_RELEASE_ICON)
endif
endif
# Executable Icon
#################
# if defined, use the project release icon.
# if no icon defined for the project, use the OF default release icon defined for the platform
# leave ICON empty for default system icon
ifdef PROJECT_RELEASE_ICON
ICON = $(PROJECT_RELEASE_ICON)
else
ifdef PLATFORM_RELEASE_ICON
ICON = $(PLATFORM_RELEASE_ICON)
endif
endif
endif


@@ -553,12 +553,12 @@ endif
# define the subdirectory for our target name

ifdef MAKEFILE_DEBUG
$(info ---OF_PROJECT_SOURCE_FILES---)
$(foreach v, $(OF_PROJECT_SOURCE_FILES),$(info $(v)))
$(info ---OF_PROJECT_SOURCE_FILES---)
$(foreach v, $(OF_PROJECT_SOURCE_FILES),$(info $(v)))
endif
ifdef MAKEFILE_DEBUG
$(info ---OF_PROJECT_DEPENDENCY_FILES---)
$(foreach v, $(OF_PROJECT_DEPENDENCY_FILES),$(info $(v)))
$(info ---OF_PROJECT_DEPENDENCY_FILES---)
$(foreach v, $(OF_PROJECT_DEPENDENCY_FILES),$(info $(v)))
endif


@@ -571,7 +571,7 @@ OF_PROJECT_DEPS = $(patsubst %.o,%.d,$(OF_PROJECT_OBJS))
# Compiled resources (icon, ...) - msys2 only?
OF_PROJECT_RESOURCES =
ifeq ($(findstring msys2,$(PLATFORM_LIB_SUBPATH)),msys2)
OF_PROJECT_RESOURCES += $(addprefix $(OF_PROJECT_OBJ_OUTPUT_PATH), $(notdir $(patsubst %.ico, %.res, $(ICON))))
OF_PROJECT_RESOURCES += $(addprefix $(OF_PROJECT_OBJ_OUTPUT_PATH), $(notdir $(patsubst %.ico, %.res, $(ICON))))
endif

OF_PROJECT_DEPENDENCY_FILES = $(OF_PROJECT_DEPS) $(OF_PROJECT_ADDONS_DEPS)
@@ -580,6 +580,6 @@ OF_PROJECT_DEPENDENCY_FILES = $(OF_PROJECT_DEPS) $(OF_PROJECT_ADDONS_DEPS)


ifdef MAKEFILE_DEBUG
$(info ---OF_PROJECT_DEPENDENCY_FILES---)
$(foreach v, $(OF_PROJECT_DEPENDENCY_FILES),$(info $(v)))
$(info ---OF_PROJECT_DEPENDENCY_FILES---)
$(foreach v, $(OF_PROJECT_DEPENDENCY_FILES),$(info $(v)))
endif
145 changes: 88 additions & 57 deletions libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ PLATFORM_OS ?= $(shell uname -s)
HOST_OS=$(shell uname -s)

ifdef MAKEFILE_DEBUG
$(info HOST_OS=${HOST_OS})
$(info HOST_OS=${HOST_OS})
endif

ifneq (,$(findstring MSYS_NT,$(HOST_OS)))
@@ -40,6 +40,18 @@ else
FIND=find
endif

RPI_DETECTED := $(shell \
if [ -f /proc/device-tree/model ]; then file=/proc/device-tree/model; \
elif [ -f /sys/firmware/devicetree/base/model ]; then file=/sys/firmware/devicetree/base/model; \
else file=""; fi; \
if [ -n "$$file" ] && grep -qi 'Raspberry' $$file; then echo yes; else echo no; fi)

JETSON_DETECTED := $(shell \
if [ -f /proc/device-tree/model ]; then file=/proc/device-tree/model; \
elif [ -f /sys/firmware/devicetree/base/model ]; then file=/sys/firmware/devicetree/base/model; \
else file=""; fi; \
if [ -n "$$file" ] && grep -qi -e 'Jetson' -e 'Tegra' $$file; then echo yes; else echo no; fi)

#check for Raspbian as armv7l needs to use armv6l architecture
ifeq ($(wildcard $(RPI_ROOT)/etc/*-release), /etc/os-release)
ifeq ($(shell grep ID=raspbian $(RPI_ROOT)/etc/*-release),ID=raspbian)
@@ -66,37 +78,53 @@ else
CROSS_COMPILING=0
endif
endif
ifeq ($(PLATFORM_OS),Linux)
ifeq ($(PLATFORM_ARCH),aarch64)
PLATFORM_ARCH=arm64
endif
endif
endif


ifdef MAKEFILE_DEBUG
$(info PLATFORM_ARCH=$(PLATFORM_ARCH))
$(info PLATFORM_OS=$(PLATFORM_OS))
$(info HOST_ARCH=$(HOST_ARCH))
$(info HOST_OS=$(HOST_OS))
$(info CROSS_COMPILING=$(CROSS_COMPILING))
$(info PLATFORM_VARIANT=$(PLATFORM_VARIANT))
$(info IS_RASPBIAN=$(IS_RASPBIAN))
$(info PLATFORM_ARCH=$(PLATFORM_ARCH))
$(info PLATFORM_OS=$(PLATFORM_OS))
$(info HOST_ARCH=$(HOST_ARCH))
$(info HOST_OS=$(HOST_OS))
$(info CROSS_COMPILING=$(CROSS_COMPILING))
$(info PLATFORM_VARIANT=$(PLATFORM_VARIANT))
$(info IS_RASPBIAN=$(IS_RASPBIAN))
$(info JETSON_DETECTED=$(JETSON_DETECTED))
endif

# if not defined, construct the default PLATFORM_LIB_SUBPATH
ifndef PLATFORM_LIB_SUBPATH
# determine from the arch
ifeq ($(PLATFORM_OS),Linux)
ifeq ($(PLATFORM_ARCH),x86_64)
PLATFORM_LIB_SUBPATH=linux64
else ifeq ($(PLATFORM_ARCH),armv6l)
PLATFORM_LIB_SUBPATH=linuxarmv6l
else ifeq ($(PLATFORM_ARCH),armv7l)
PLATFORM_LIB_SUBPATH=linuxarmv7l
else ifeq ($(PLATFORM_ARCH),i386)
PLATFORM_LIB_SUBPATH=linux
else ifeq ($(PLATFORM_ARCH),i686)
PLATFORM_LIB_SUBPATH=linux
else ifeq ($(PLATFORM_ARCH),aarch64)
PLATFORM_LIB_SUBPATH=linuxaarch64
ifeq ($(RPI_DETECTED),yes)
else ifeq ($(PLATFORM_ARCH),armv6l)
PLATFORM_LIB_SUBPATH=linux/armv6l
else ifeq ($(PLATFORM_ARCH),armv7l)
PLATFORM_LIB_SUBPATH=linux/armv7l
else ifeq ($(PLATFORM_ARCH),armv8l)
PLATFORM_LIB_SUBPATH=linux/armv8l
else ifeq ($(PLATFORM_ARCH),aarch64)
PLATFORM_LIB_SUBPATH=linux/aarch64
else ifeq ($(JETSON_DETECTED),yes)
PLATFORM_LIB_SUBPATH=linux/jetson
else
$(error This makefile does not support your architecture $(PLATFORM_ARCH))
ifeq ($(PLATFORM_ARCH),x86_64)
PLATFORM_LIB_SUBPATH=linux/64
else ifeq ($(PLATFORM_ARCH),64)
PLATFORM_LIB_SUBPATH=linux/64
else ifeq ($(PLATFORM_ARCH),arm64)
PLATFORM_LIB_SUBPATH=linux/arm64
else ifeq ($(PLATFORM_ARCH),aarch64)
PLATFORM_LIB_SUBPATH=linux/arm64
else
PLATFORM_LIB_SUBPATH=linux
$(error This makefile does not support your architecture $(PLATFORM_ARCH))
endif
endif
SHARED_LIB_EXTENSION=so
else ifneq (,$(findstring MINGW32_NT,$(PLATFORM_OS)))
@@ -135,11 +163,11 @@ endif

# if desired, print the variables
ifdef MAKEFILE_DEBUG
$(info =================== config.mk platform detection ================)
$(info PLATFORM_ARCH=$(PLATFORM_ARCH))
$(info PLATFORM_OS=$(PLATFORM_OS))
$(info PLATFORM_VARIANT=$(PLATFORM_VARIANT))
$(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH))
$(info =================== config.mk platform detection ================)
$(info PLATFORM_ARCH=$(PLATFORM_ARCH))
$(info PLATFORM_OS=$(PLATFORM_OS))
$(info PLATFORM_VARIANT=$(PLATFORM_VARIANT))
$(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH))
endif


@@ -202,22 +230,23 @@ endif
################################################################################
# print debug information if needed
ifdef MAKEFILE_DEBUG
$(info =================== config.mk paths =============================)
$(info OF_ADDONS_PATH=$(OF_ADDONS_PATH))
$(info OF_EXAMPLES_PATH=$(OF_EXAMPLES_PATH))
$(info OF_APPS_PATH=$(OF_APPS_PATH))
$(info OF_LIBS_PATH=$(OF_LIBS_PATH))
$(info OF_LIBS_OPENFRAMEWORKS_PATH=$(OF_LIBS_OPENFRAMEWORKS_PATH))
$(info OF_LIBS_OF_COMPILED_PATH=$(OF_LIBS_OF_COMPILED_PATH))
$(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH))
$(info OF_SHARED_MAKEFILES_PATH=$(OF_SHARED_MAKEFILES_PATH))
$(info OF_PLATFORM_MAKEFILES=$(OF_PLATFORM_MAKEFILES))
$(info OF_CORE_LIB_PATH=$(OF_CORE_LIB_PATH))
$(info =================== config.mk paths =============================)
$(info OF_ADDONS_PATH=$(OF_ADDONS_PATH))
$(info OF_EXAMPLES_PATH=$(OF_EXAMPLES_PATH))
$(info OF_APPS_PATH=$(OF_APPS_PATH))
$(info OF_LIBS_PATH=$(OF_LIBS_PATH))
$(info OF_LIBS_OPENFRAMEWORKS_PATH=$(OF_LIBS_OPENFRAMEWORKS_PATH))
$(info OF_LIBS_OF_COMPILED_PATH=$(OF_LIBS_OF_COMPILED_PATH))
$(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH))
$(info OF_SHARED_MAKEFILES_PATH=$(OF_SHARED_MAKEFILES_PATH))
$(info OF_PLATFORM_MAKEFILES=$(OF_PLATFORM_MAKEFILES))
$(info OF_CORE_LIB_PATH=$(OF_CORE_LIB_PATH))
$(info PLATFORM_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH))
$(info OF_LIBS_OF_COMPILED_PROJECT_PATH=$(OF_LIBS_OF_COMPILED_PROJECT_PATH))
endif


ifeq ($(wildcard $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH)),)
$(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJECT_PATH) probably you downloaded the wrong package?)
$(error This package doesn't support your platform, $(OF_LIBS_OF_COMPILED_PROJECT_PATH)/$(PLATFORM_LIB_SUBPATH) probably you downloaded the wrong package?)
endif

# generate a list of valid core platform variants from the files in the platform makefiles directory
@@ -230,7 +259,9 @@ ifeq ($(findstring $(PLATFORM_VARIANT),$(AVAILABLE_PLATFORM_VARIANTS)),)
endif

# include the platform specific user and platform configuration files
include $(OF_PLATFORM_MAKEFILES)/config.$(PLATFORM_LIB_SUBPATH).$(PLATFORM_VARIANT).mk
PLATFORM_LIB_SUBPATH_FIXED := $(subst /,,$(PLATFORM_LIB_SUBPATH))
include $(OF_PLATFORM_MAKEFILES)/config.$(PLATFORM_LIB_SUBPATH_FIXED).$(PLATFORM_VARIANT).mk


ifdef ABI_PATH
ABI_LIB_SUBPATH=$(PLATFORM_LIB_SUBPATH)/$(strip $(ABI_PATH))
@@ -301,14 +332,14 @@ CORE_PKG_CONFIG_LIBRARIES += $(PROJECT_PKG_CONFIG_LIBRARIES)
ifneq ($(strip $(CORE_PKG_CONFIG_LIBRARIES)),)
ifneq ($(strip $(PKG_CONFIG_LIBDIR)),)
ifdef MAKEFILE_DEBUG
$(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES))
$(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR))
$(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES))
$(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR))
endif
FAILED_PKG=$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); for pkg in $(CORE_PKG_CONFIG_LIBRARIES); do $(PLATFORM_PKG_CONFIG) $$pkg --cflags > /dev/null; if [ $$? -ne 0 ]; then echo $$pkg; return; fi; done; echo 0)
else
ifdef MAKEFILE_DEBUG
$(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES))
$(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR))
$(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES))
$(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR))
endif
FAILED_PKG=$(shell for pkg in $(CORE_PKG_CONFIG_LIBRARIES); do $(PLATFORM_PKG_CONFIG) $$pkg --cflags > /dev/null; if [ $$? -ne 0 ]; then echo $$pkg; return; fi; done; echo 0)
endif
@@ -360,22 +391,22 @@ OF_CORE_HEADER_FILES=$(filter-out $(CORE_EXCLUSIONS),$(shell $(FIND) $(OF_CORE_S
# DEBUG INFO
################################################################################
ifdef MAKEFILE_DEBUG
$(info ========================= config.mk flags ========================)
$(info ---OF_CORE_DEFINES_CFLAGS---)
$(foreach v, $(OF_CORE_DEFINES_CFLAGS),$(info $(v)))
$(info ========================= config.mk flags ========================)
$(info ---OF_CORE_DEFINES_CFLAGS---)
$(foreach v, $(OF_CORE_DEFINES_CFLAGS),$(info $(v)))

$(info ---OF_CORE_INCLUDES_CFLAGS---)
$(foreach v, $(OF_CORE_INCLUDES_CFLAGS),$(info $(v)))
$(info ---OF_CORE_INCLUDES_CFLAGS---)
$(foreach v, $(OF_CORE_INCLUDES_CFLAGS),$(info $(v)))

$(info ---OF_CORE_FRAMEWORKS_CFLAGS---)
$(foreach v, $(OF_CORE_FRAMEWORKS_CFLAGS),$(info $(v)))
$(info ---OF_CORE_FRAMEWORKS_CFLAGS---)
$(foreach v, $(OF_CORE_FRAMEWORKS_CFLAGS),$(info $(v)))

$(info ---OF_CORE_SOURCE_FILES---)
$(foreach v, $(OF_CORE_SOURCE_FILES),$(info $(v)))
$(info ---OF_CORE_SOURCE_FILES---)
$(foreach v, $(OF_CORE_SOURCE_FILES),$(info $(v)))

$(info ---OF_CORE_HEADER_FILES---)
$(foreach v, $(OF_CORE_HEADER_FILES),$(info $(v)))
$(info ---OF_CORE_HEADER_FILES---)
$(foreach v, $(OF_CORE_HEADER_FILES),$(info $(v)))

$(info ---PLATFORM_CORE_EXCLUSIONS---)
$(foreach v, $(PLATFORM_CORE_EXCLUSIONS),$(info $(v)))
$(info ---PLATFORM_CORE_EXCLUSIONS---)
$(foreach v, $(PLATFORM_CORE_EXCLUSIONS),$(info $(v)))
endif
16 changes: 9 additions & 7 deletions scripts/ci/linux64/build.sh → scripts/ci/linux/64/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
set -ev
ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../.." ; pwd -P )"}
set -e
ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../../.." ; pwd -P )"}
# Add compiler flag to reduce memory usage to enable builds to complete
# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56746#c7
# the "proper" way does not work currently:
@@ -22,22 +22,24 @@ else

echo "##[group]**** Building OF core ****"
# this carries over to subsequent compilations of examples
echo "PLATFORM_CFLAGS += $CUSTOMFLAGS" >> libs/openFrameworksCompiled/project/linux64/config.linux64.default.mk
sed -i "s/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = .*/PLATFORM_OPTIMIZATION_CFLAGS_DEBUG = -g0/" libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk
# echo "PLATFORM_CFLAGS += $CUSTOMFLAGS" >> libs/openFrameworksCompiled/project/linux/64/config.linux64.default.mk
cd libs/openFrameworksCompiled/project
make -j2
make -j2 Debug
echo "##[endgroup]"
echo -e "\033[33m**** Building OF core: COMPLETE ****\033[0m"

echo "##[group]**** Building emptyExample ****"
cd $ROOT/scripts/templates/linux64
make -j2
make -j2 Debug
echo "##[endgroup]"
echo -e "\033[33m**** Building emptyExample: COMPLETE ****\033[0m"

echo "##[group]**** Building allAddonsExample ****"
cd $ROOT
cp scripts/templates/linux64/Makefile examples/templates/allAddonsExample/
cp scripts/templates/linux64/config.make examples/templates/allAddonsExample/
cd examples/templates/allAddonsExample/
make -j2
make -j2 Debug
echo "##[endgroup]"
echo -e "\033[33m**** Building allAddonsExample: COMPLETE ****\033[0m"
fi
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
set -ev

if [ -z ${OF_ROOT} ]; then
OF_ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../.." ; pwd -P )"}
OF_ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../../.." ; pwd -P )"}
fi

# Trusty/14.04 builds don't have databases running - disable this
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# set -ev
ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../.." ; pwd -P )"}
ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../../.." ; pwd -P )"}

# if [ "$OPT" == "qbs" ]; then
# exit 0
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 14 additions & 14 deletions scripts/ci/package_builds.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ev
set -e

ROOT=${GITHUB_WORKSPACE}

@@ -50,21 +50,21 @@ echo "##[group]create package"
cd $OUTPUT_FOLDER
pwd
if [[ "$(uname -s)" == "Linux" ]]; then
$ROOT/scripts/dev/create_package.sh linux64 $lastversion master gcc6
$ROOT/scripts/dev/create_package.sh linuxarmv6l $lastversion master
$ROOT/scripts/dev/create_package.sh linuxaarch64 $lastversion master
$ROOT/scripts/dev/create_package.sh msys2 $lastversion master mingw64
$ROOT/scripts/dev/create_package.sh msys2 $lastversion master clang64
$ROOT/scripts/dev/create_package.sh msys2 $lastversion master ucrt64
$ROOT/scripts/dev/create_package.sh vs $lastversion master
$ROOT/scripts/dev/create_package.sh vs $lastversion master 64
# $ROOT/scripts/dev/create_package.sh vs2019 $lastversion master 64
$ROOT/scripts/dev/create_package.sh linux64 $lastversion master 10 || echo "Failed: linux64"
$ROOT/scripts/dev/create_package.sh linuxarm64 $lastversion master 14 || echo "Failed: linuxarm64"
$ROOT/scripts/dev/create_package.sh linuxarmv6l $lastversion master || echo "Failed: linuxarmv6l"
$ROOT/scripts/dev/create_package.sh linuxaarch64 $lastversion master || echo "Failed: linuxaarch64"
$ROOT/scripts/dev/create_package.sh msys2 $lastversion master mingw64 || echo "Failed: msys2-mingw64"
$ROOT/scripts/dev/create_package.sh msys2 $lastversion master clang64 || echo "Failed: msys2-clang64"
$ROOT/scripts/dev/create_package.sh msys2 $lastversion master ucrt64 || echo "Failed: msys2-ucrt64"
$ROOT/scripts/dev/create_package.sh vs $lastversion master || echo "Failed: vs"
$ROOT/scripts/dev/create_package.sh vs $lastversion master 64 || echo "Failed: vs 64"
$ROOT/scripts/dev/create_package.sh vs2019 $lastversion master 64 || echo "Failed: vs2019 64"
fi
$ROOT/scripts/dev/create_package.sh osx $lastversion master
$ROOT/scripts/dev/create_package.sh ios $lastversion master
echo "##[endgroup]"

# $ROOT/scripts/dev/create_package.sh macos $lastversion master
$ROOT/scripts/dev/create_package.sh osx $lastversion master || echo "Failed: osx"
$ROOT/scripts/dev/create_package.sh ios $lastversion master || echo "Failed: ios"
echo "##[endgroup]"

ls -la
cd $ROOT
10 changes: 8 additions & 2 deletions scripts/ci/vs/install.sh
Original file line number Diff line number Diff line change
@@ -3,13 +3,19 @@ OF_ROOT=$PWD
SCRIPT_DIR="${BASH_SOURCE%/*}"

RELEASE="${RELEASE:-nightly}"
ARCH="${ARCH:-64}"
if [[ "$ARCH" == "x64" ]]; then
ARCH=64
fi



if [[ ! -d "$SCRIPT_DIR" ]]; then SCRIPT_DIR="$PWD"; fi
. "$SCRIPT_DIR/../../dev/downloader.sh"

unset BITS
cd "${OF_ROOT}"
./scripts/vs/download_libs.sh -p vs --silent -t $RELEASE
./scripts/vs/download_libs.sh -p vs --silent -t $RELEASE -a $ARCH

rm -rf projectGenerator
mkdir -p projectGenerator
@@ -56,4 +62,4 @@ for i in "${!PROJECTS[@]}"; do
echo "Updating: ${PROJECT} with:${PG_OF_PATH}"
#cmd.exe /c "${PG_OF_PATH} ${OPTIONS}"
eval "${PG_OF_PATH} ${OPTIONS}"
done
done
18 changes: 12 additions & 6 deletions scripts/dev/create_package.sh
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
platform=$1
version=$2

all_platforms="linux linux64 linuxarmv6l linuxarmv7l linuxaarch64 osx msys2 vs ios macos tvos android emscripten"
all_platforms="linux linux64 linuxarm64 linuxarmv6l linuxarmv7l linuxaarch64 osx msys2 vs ios macos tvos android emscripten"

of_root=$(readlink -f "$(dirname "$(readlink -f "$0")")/../..")

@@ -77,7 +77,7 @@ echoDots(){
}


if [ "$platform" != "msys2" ] && [ "$platform" != "linux" ] && [ "$platform" != "linux64" ] && [ "$platform" != "linuxarmv6l" ] && [ "$platform" != "linuxaarch64" ] && [ "$platform" != "linuxarmv7l" ] && [ "$platform" != "vs" ] && [ "$platform" != "vs2019" ] && [ "$platform" != "osx" ] && [ "$platform" != "android" ] && [ "$platform" != "ios" ] && [ "$platform" != "macos" ]; then
if [ "$platform" != "msys2" ] && [ "$platform" != "linux" ] && [ "$platform" != "linux64" ] && [ "$platform" != "linuxarm64" ] && [ "$platform" != "linuxarmv6l" ] && [ "$platform" != "linuxaarch64" ] && [ "$platform" != "linuxarmv7l" ] && [ "$platform" != "vs" ] && [ "$platform" != "vs2019" ] && [ "$platform" != "osx" ] && [ "$platform" != "android" ] && [ "$platform" != "ios" ] && [ "$platform" != "macos" ]; then
echo usage:
echo ./create_package.sh platform version
echo platform:
@@ -171,7 +171,7 @@ function deleteEclipse {


function createProjectFiles {
if [ "$pkg_platform" != "linuxarmv6l" ] && [ "$pkg_platform" != "linuxarmv7l" ] && [ "$pkg_platform" != "linuxaarch64" ] ; then
if [ "$pkg_platform" != "linuxarmv6l" ] && [ "$pkg_platform" != "linuxarmv7l" ] && [ "$pkg_platform" != "linuxaarch64" ] && [ "$pkg_platform" != "linuxarm64" ]; then
mkdir -p ${main_ofroot}/libs/openFrameworksCompiled/lib/linux64/
cd ${main_ofroot}/apps/projectGenerator/commandLine
echo "Recompiling command line PG"
@@ -296,7 +296,7 @@ function createPackage {
rm -Rf windowing
fi

if [ "$pkg_platform" == "linux" ] || [ "$pkg_platform" == "linux64" ]; then
if [ "$pkg_platform" == "linux" ] || [ "$pkg_platform" == "linux64" ] || [ "$pkg_platform" == "linuxarm64" ]; then
rm -Rf gles
fi

@@ -350,7 +350,10 @@ function createPackage {
scripts/osx/download_libs.sh -t $RELEASE
scripts/emscripten/download_libs.sh -n -t $RELEASE
elif [ "$pkg_platform" = "linux64" ]; then
scripts/linux/download_libs.sh -a 64$libs_abi
scripts/linux/download_libs.sh -a 64 -g $libs_abi -t $RELEASE
scripts/emscripten/download_libs.sh -n -t $RELEASE
elif [ "$pkg_platform" = "linuxarm64" ]; then
scripts/linux/download_libs.sh -a arm64 -g $libs_abi -t $RELEASE
scripts/emscripten/download_libs.sh -n -t $RELEASE
elif [ "$pkg_platform" = "linuxarmv6l" ]; then
scripts/linux/download_libs.sh -a armv6l -t $RELEASE
@@ -390,6 +393,9 @@ function createPackage {
elif [ "$pkg_platform" = "linux64" ]; then
otherplatforms=$(remove_current_platform "$all_platforms" "emscripten")
otherplatforms=$(remove_current_platform "$otherplatforms" "linux64")
elif [ "$pkg_platform" = "linuxarm64" ]; then
otherplatforms=$(remove_current_platform "$all_platforms" "emscripten")
otherplatforms=$(remove_current_platform "$otherplatforms" "linuxarm64")
elif [ "$pkg_platform" = "linuxarmv6l" ]; then
otherplatforms=$(remove_current_platform "$all_platforms" "linuxarmv6l")
elif [ "$pkg_platform" = "linuxarmv7l" ]; then
@@ -657,7 +663,7 @@ function createPackage {
fi

#create compressed package
if [[ "$pkg_platform" =~ ^(linux|linux64|android|linuxarmv6l|linuxarmv7l|linuxaarch64|macos|ios|osx)$ ]]; then
if [[ "$pkg_platform" =~ ^(linux|linuxarm64|linux64|android|linuxarmv6l|linuxarmv7l|linuxaarch64|macos|ios|osx)$ ]]; then
if [ "$libs_abi" = "" ]; then
pkg_name=of_v${pkg_version}_${pkg_platform}_release
else
103 changes: 68 additions & 35 deletions scripts/dev/download_libs.sh
Original file line number Diff line number Diff line change
@@ -8,7 +8,8 @@ LEGACY=0
SILENT_ARGS=""
NO_SSL=""
BLEEDING_EDGE=0
DL_VERSION=2.6.4
DL_VERSION=2.8.2
GCC_VERSION=0
TAG=""

printHelp(){
@@ -24,13 +25,14 @@ cat << EOF
vs: 64
msys2: 64
android: armv7, arm64, and x86 (if not specified will download all)
linux: 64gcc6, armv6l or armv7l
linux: 64, armv6l or armv7l
-n, --no-overwrite Merge new libraries with existing ones, use only to download same version for different platforms
If not set deletes any existing libraries
-s, --silent Silent download progress
-h, --help Shows this message
-k, --no-ssl Allow no SSL validation
-t, --tag tag release for libraries
-g, --gcc-version GCC Version
EOF
}

@@ -120,6 +122,10 @@ while [[ $# -gt 0 ]]; do
MSYSTEM="$2"
shift # past argument
;;
-g|--gcc-version)
GCC_VERSION="$2"
shift # past argument
;;
-t|--tag)
TAG="$2"
shift # past argument
@@ -162,30 +168,13 @@ if [ "$ARCH" == "" ]; then
if [ "$PLATFORM" == "linux" ]; then
ARCH=$(uname -m)
if [ "$ARCH" == "x86_64" ]; then
if command -v gcc &> /dev/null
then
GCC_VERSION=$(gcc -dumpversion | cut -f1 -d.)
else
GCC_VERSION=6
fi
if [ $GCC_VERSION -eq 4 ]; then
ARCH=64gcc6
elif [ $GCC_VERSION -eq 5 ]; then
ARCH=64gcc6
else
ARCH=64gcc6
fi
elif [ "$ARCH" == "armv7l" ]; then
# Check for Raspberry Pi
if [ -f /opt/vc/include/bcm_host.h ]; then
ARCH=armv6l
fi
ARCH=64
elif [ "$ARCH" == "arm64" ]; then
ARCH=arm64
elif [ "$ARCH" == "aarch64" ]; then
ARCH=arm64
elif [ "$ARCH" == "i686" ] || [ "$ARCH" == "i386" ]; then
cat << EOF
32bit linux is not officially supported anymore but compiling
the libraries using the build script in apothecary/scripts
should compile all the dependencies without problem
EOF
echo "32bit linux is not officially supported anymore but compiling the libraries using the build script in apothecary/scripts should compile all the dependencies without problem"
exit 1
fi
elif [ "$PLATFORM" == "msys2" ]; then
@@ -201,12 +190,44 @@ EOF
ARCH=clang64
fi
fi

if [ "$PLATFORM" == "osx" ]; then
ARCH=x86_64
fi
fi

if [ "$PLATFORM" == "linux" ]; then
if [ "$GCC_VERSION" == 0 ]; then
if command -v gcc &> /dev/null; then
GCC_VERSION=$(gcc -dumpversion | cut -f1 -d.)
echo "GCC_VERSION from bash: [$GCC_VERSION]"
else
GCC_VERSION=10
fi
if [ "$GCC_VERSION" -gt 14 ]; then
echo "GCC version is greater than 14. latest supported"
GCC_VERSION=14
fi
fi
echo "GCC_VERSION: [$GCC_VERSION]"
GCC_VERSION="gcc${GCC_VERSION}"
if [ "$ARCH" == "x86_64" ] || [ "$ARCH" == "64" ]; then
OPT="_${GCC_VERSION}"
elif [ "$ARCH" == "arm64" ]; then
OPT="_${GCC_VERSION}"
elif [ "$ARCH" == "aarch64" ]; then
OPT="_${GCC_VERSION}"
elif [ "$ARCH" == "armv8l" ]; then
OPT=""
elif [ "$ARCH" == "armv7l" ]; then
OPT=""
elif [ "$ARCH" == "armv6l" ]; then
OPT=""
elif [ "$ARCH" == "jetson" ]; then
OPT=""
fi
fi



SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
@@ -221,21 +242,16 @@ if [[ $TAG != "" ]] && [[ $TAG != "nightly" ]] ; then
VER="$TAG"
fi

if [ "$PLATFORM" == "linux" ] && [ "$ARCH" == "64" ]; then
if [[ $BLEEDING_EDGE = 1 ]] ; then
ARCH=64_gcc6
else
ARCH=64gcc6
fi
fi

echo " openFrameworks download_libs.sh v$DL_VERSION args=$@"

if [ "$PLATFORM" == "emscripten" ]; then
if [[ $BLEEDING_EDGE = 1 ]] ; then
if [[ $ARCH = "" ]] ; then
ARCH="32"
fi
if [[ $ARCH = "64" ]] ; then
ARCH="_64"
fi
fi
fi

@@ -309,7 +325,7 @@ elif [ "$PLATFORM" == "emscripten" ]; then
fi
else # Linux
if [[ $BLEEDING_EDGE = 1 ]] ; then
PKGS="openFrameworksLibs_${VER}_${PLATFORM}${ARCH}.tar.bz2"
PKGS="openFrameworksLibs_${VER}_${PLATFORM}_${ARCH}${OPT}.tar.bz2"
else
PKGS="openFrameworksLibs_${VER}_${PLATFORM}${ARCH}.tar.bz2"
fi
@@ -338,7 +354,19 @@ cd download
download "${PKGS[@]}"

cd ../ # back to libs
VALID=1
for PKG in $PKGS; do
echo " Validate libraries [${PLATFORM}] from [$PKG]"
if [ ! -f "download/$PKG" ]; then
echo "Error: File 'download/$PKG' does not exist!" >&2
VALID=0
fi
done
if [ $VALID -eq 0 ]; then
exit 71
fi
libs=("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")

if [ $OVERWRITE -eq 1 ]; then
echo " "
echo " Overwrite - Removing prior libraries for [$PLATFORM]"
@@ -383,6 +411,11 @@ fi
echo " ------ "
for PKG in $PKGS; do
echo " Uncompressing libraries [${PLATFORM}] from [$PKG]"
if [ ! -f "download/$PKG" ]; then
echo "Error: File 'download/$PKG' does not exist!" >&2
exit 71
fi

if [ "$PLATFORM" == "msys2" ] || [ "$PLATFORM" == "vs" ]; then
unzip -qo download/$PKG
# rm -r download/$PKG
27 changes: 25 additions & 2 deletions scripts/dev/download_pg.sh
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ ARCH=""
OVERWRITE=1
SILENT_ARGS=""
BLEEDING_EDGE=0
DL_VERSION=2.8.0
DL_VERSION=3.0.0
TAG=""

printHelp(){
@@ -171,6 +171,8 @@ fi

if [ "$PLATFORM" == "vs" ]; then
EXT=".exe"
elif [ "$PLATFORM" == "linux" ]; then
EXT=""
else
EXT=".app"
fi
@@ -180,7 +182,12 @@ if [ "$PLATFORM" == "msys2" ] || [ "$PLATFORM" == "vs" ]; then
else
GUI=""
fi
PKG="projectGenerator-${PLATFORM}${GUI}.zip"

if [ "$PLATFORM" == "linux" ]; then
PKG="projectGenerator-${PLATFORM}${GUI}.gz"
else
PKG="projectGenerator-${PLATFORM}${GUI}.zip"
fi

echo " openFrameworks download_pg.sh"

@@ -192,6 +199,10 @@ mkdir -p download
cd download

download $PKG
# if [ "$PLATFORM" == "linux" ]; then
# PKG="projectGenerator-${PLATFORM}.tar.bz2"
# download $PKG
# fi

if [ -d "${OUTDIR}/${OUTPUT}" ] || [ -f "${OUTDIR}/${OUTPUT}" ]; then
rm -rf "${OUTDIR}/${OUTPUT}"
@@ -220,6 +231,18 @@ if [ "$PLATFORM" == "msys2" ] || [ "$PLATFORM" == "vs" ]; then
# else
# echo "Warning: chmod command not found, skipping permission adjustment."
# fi
elif [ "$PLATFORM" == "linux" ]; then
# CLI version
mkdir -p "${OUTDIR}/${OUTPUT}"
# tar xjf "$PKG" -C "${OUTDIR}/${OUTPUT}"
# GUI version
if [ -f "projectGenerator-linux-gui.gz" ]; then
gunzip -c "projectGenerator-linux-gui.gz" > "${OUTDIR}/${OUTPUT}/projectGenerator"
chmod +x "${OUTDIR}/${OUTPUT}/projectGenerator"
fi
# Move CLI binary and set permissions
mv "${OUTDIR}/${OUTPUT}/resources/app/app/projectGenerator" "${OUTDIR}/${OUTPUT}/projectGeneratorCmd"
chmod +x "${OUTDIR}/${OUTPUT}/projectGeneratorCmd"
else
if ! command -v rsync &> /dev/null; then
cp -arX "${OUTDIR}/${OUTPUT}/projectGenerator$EXT/Contents/Resources/app/app/projectGenerator" "${OUTDIR}/${OUTPUT}/projectGenerator"
8 changes: 6 additions & 2 deletions scripts/linux/buildAllExamples.sh
Original file line number Diff line number Diff line change
@@ -2,9 +2,13 @@

export LC_ALL=C

for category in $( find ../../examples/ -maxdepth 1 -type d )
OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OFDIR="$(realpath "$OF_DIR/../..")"
OFCORE_EXAMPLES_DIR="$(realpath "$OF_DIR/examples")"

for category in $( find "${OFCORE_EXAMPLES_DIR}/" -maxdepth 1 -type d )
do
if [ "$category" = "../../examples/android" -o "$category" = "../../examples/ios" -o "$category" = "../../examples/" -o "$category" = "../../examples/tvOS" ]; then
if [ "$category" = "${OFCORE_EXAMPLES_DIR}/android" -o "$category" = "${OFCORE_EXAMPLES_DIR}/ios" -o "$category" = "${OFCORE_EXAMPLES_DIR}/" -o "$category" = "${OFCORE_EXAMPLES_DIR}/tvOS" ]; then
continue
fi

7 changes: 6 additions & 1 deletion scripts/linux/buildAllRPIExamples.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PARENT_DIR="$(dirname "$DIR")"

OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OFDIR="$(realpath "$OF_DIR/../..")"
OFCORE_EXAMPLES_DIR="$(realpath "$OF_DIR/examples")"

MAKEFILE_PATH=$PARENT_DIR/templates/linuxarmv6l/Makefile
cd ${DIR}/../../examples
cd ${OFCORE_EXAMPLES_DIR}

for category in $(ls -1d *)
do
6 changes: 5 additions & 1 deletion scripts/linux/cleanAllExamples.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/bin/bash

OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OFDIR="$(realpath "$OF_DIR/../..")"
OFCORE_EXAMPLES_DIR="$(realpath "$OF_DIR/examples")"

for category in $( find ../../examples/ -maxdepth 1 -type d )
do
if [ "$category" = "../../examples/android" -o "$category" = "../../examples/ios" -o "$category" = "../../examples/" ]; then
if [ "$category" = "${OFCORE_EXAMPLES_DIR}/android" -o "$category" = "${OFCORE_EXAMPLES_DIR}/ios" -o "$category" = "${OFCORE_EXAMPLES_DIR}/" ]; then
continue
fi

36 changes: 22 additions & 14 deletions scripts/linux/compileOF.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
#!/usr/bin/env bash

export LC_ALL=C
OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OFDIR="$(realpath "$OF_DIR/../..")"

ARCH=$(uname -m)
if [ "$ARCH" = "x86_64" ]; then
LIBSPATH=linux64
else
LIBSPATH=linux
if [ "$ARCH" == "" ]; then
if [ "$ARCH" = "x86_64" ]; then
LIBSPATH=linux/64
elif [ "$ARCH" = "arm64" ]; then
LIBSPATH=linux/arm64
elif [ "$ARCH" = "jetson" ]; then
LIBSPATH=linux/jetson
else
LIBSPATH=linux
fi
fi

pushd `dirname $0` > /dev/null
@@ -18,13 +26,13 @@ JOBS=1
while getopts tj: opt ; do
case "$opt" in
t) # testing, only build Debug
BUILD="test" ;;
BUILD="test" ;;
j) # make job count for parallel build
JOBS="$OPTARG"
JOBS="$OPTARG"
esac
done

cd "${SCRIPTPATH}/../../libs/openFrameworksCompiled/project"
cd "${OFDIR}/libs/openFrameworksCompiled/project"
make -j$JOBS Debug
exit_code=$?
if [ $exit_code != 0 ]; then
@@ -34,11 +42,11 @@ if [ $exit_code != 0 ]; then
fi

if [ "$BUILD" == "install" ]; then
make -j$JOBS Release
exit_code=$?
if [ $exit_code != 0 ]; then
echo "there has been a problem compiling Release OF library"
echo "please report this problem in the forums"
exit $exit_code
fi
make -j$JOBS Release
exit_code=$?
if [ $exit_code != 0 ]; then
echo "there has been a problem compiling Release OF library"
echo "please report this problem in the forums"
exit $exit_code
fi
fi
8 changes: 5 additions & 3 deletions scripts/linux/compilePG.sh
Original file line number Diff line number Diff line change
@@ -2,9 +2,11 @@

export LC_ALL=C

OF_ROOT=$(cd $(dirname $0)/../..; pwd -P)
OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OF_ROOT="$(realpath "$OF_DIR/../..")"
OF_PG_DIR="$(realpath "$OF_DIR/apps/projectGenerator")"

make Release -C ${OF_ROOT}/apps/projectGenerator/commandLine
make Release -C ${OF_PG_DIR}/commandLine
ret=$?
if [ $ret -ne 0 ]; then
echo "There has been a problem compiling the command line projectGenerator."
@@ -18,7 +20,7 @@ read -p "Do you want to install the command line project generator? [Y/n] " -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "To copy the command line project generator we need root permission."
sudo cp ${OF_ROOT}/apps/projectGenerator/commandLine/bin/projectGenerator /usr/local/bin/projectGenerator
sudo cp ${OF_PG_DIR}/commandLine/bin/projectGenerator /usr/local/bin/projectGenerator
if [ ! $? -eq 0 ]; then
echo "Failed to copy the projectGenerator file."
exit
2 changes: 1 addition & 1 deletion scripts/linux/debian/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ fi


echo "installing OF dependencies"
apt-get install 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 libsndfile-dev libfreeimage-dev libcairo2-dev libfreetype6-dev libssl-dev libpulse-dev libusb-1.0-0-dev libgtk${GTK_VERSION}-dev libopencv-dev libegl1-mesa-dev libgles1 libgles2-mesa-dev libassimp-dev librtaudio-dev libglfw3-dev liburiparser-dev libcurl4-openssl-dev libpugixml-dev libpoco-dev libgconf-2-4 brotli
apt-get install 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 libsndfile-dev libfreeimage-dev libcairo2-dev libfreetype6-dev libssl-dev libpulse-dev libusb-1.0-0-dev libgtk${GTK_VERSION}-dev libopencv-dev libegl1-mesa-dev libgles1 libgles2-mesa-dev libassimp-dev librtaudio-dev libglfw3-dev liburiparser-dev libcurl4-openssl-dev libpugixml-dev libpoco-dev libgconf-2-4 brotli binutils-gold
exit_code=$?
if [ $exit_code != 0 ]; then
echo "error installing dependencies, there could be an error with your internet connection"
8 changes: 8 additions & 0 deletions scripts/linux/download_projectGenerator.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPT_DIR
if [ ! -z ${BITS+x} ]; then
../dev/download_pg.sh -p linux -a $BITS -n $@
else
../dev/download_pg.sh -p linux $@
fi
2 changes: 1 addition & 1 deletion scripts/linux/fedora/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ ROOT=$(cd $(dirname $0); pwd -P)

# on older Fedora installs you might need to also do:
# dnf install jack-audio-connection-kit-dbus
dnf install freeglut-devel alsa-lib-devel libXmu-devel libXxf86vm-devel gcc-c++ libraw1394-devel gstreamer1-devel gstreamer1-plugins-base-devel libudev-devel libtheora-devel libvorbis-devel openal-soft-devel libsndfile-devel python-lxml glew-devel flac-devel freeimage-devel cairo-devel pulseaudio-libs-devel openssl-devel libusbx-devel gtk2-devel libXrandr-devel libXi-devel opencv-devel libX11-devel assimp-devel rtaudio-devel gtk3-devel glfw-devel uriparser-devel curl-devel pugixml-devel poco-devel brotli
dnf install freeglut-devel alsa-lib-devel libXmu-devel libXxf86vm-devel gcc-c++ libraw1394-devel gstreamer1-devel gstreamer1-plugins-base-devel libudev-devel libtheora-devel libvorbis-devel openal-soft-devel libsndfile-devel python-lxml glew-devel flac-devel freeimage-devel cairo-devel pulseaudio-libs-devel openssl-devel libusbx-devel gtk2-devel libXrandr-devel libXi-devel opencv-devel libX11-devel assimp-devel rtaudio-devel gtk3-devel glfw-devel uriparser-devel curl-devel pugixml-devel poco-devel brotli binutils-gold

exit_code=$?
if [ $exit_code != 0 ]; then
25 changes: 22 additions & 3 deletions scripts/linux/removeFMOD.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
rm -r ../../libs/fmod
rm ../../export/linux/libs/libfmod*
rm ../../export/linux64/libs/libfmod*
#!/bin/bash
OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OFDIR="$(realpath "$OF_DIR/../..")"

if [ -d "${OFDIR}/libs/fmod" ]; then
rm -r "${OFDIR}/libs/fmod"
echo "Deleted ${OFDIR}/libs/fmod"
fi

if [ -d "${OFDIR}/export/linux/libs" ]; then
if ls ${OFDIR}/export/linux/libs/libfmod* 1> /dev/null 2>&1; then
rm ${OFDIR}/export/linux/libs/libfmod*
echo "Deleted files in ${OFDIR}/export/linux/libs/"
fi
fi

if [ -d "${OFDIR}/export/linux64/libs" ]; then
if ls ${OFDIR}/export/linux64/libs/libfmod* 1> /dev/null 2>&1; then
rm ${OFDIR}/export/linux64/libs/libfmod*
echo "Deleted files in ${OFDIR}/export/linux64/libs/"
fi
fi
172 changes: 172 additions & 0 deletions scripts/linux/setupGCC.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
#!/usr/bin/env bash

OF_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OF_DIR="$(realpath "$OF_DIR/../..")"

GCC_VERSION=$(gcc -dumpversion 2>/dev/null || echo "0")
GCC_REQUIRED_VERSION="14"
GCC_URL="https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.gz"
GCC_FILE="gcc-14.2.0"

if [[ "$GCC_VERSION" =~ ^"$GCC_REQUIRED_VERSION" ]]; then
echo "GCC $GCC_VERSION is already installed."
exit 0
fi

ID=""
UBUNTU_VERSION=""
if [[ -f /etc/os-release ]]; then
. /etc/os-release
ID="$ID"
UBUNTU_VERSION="$VERSION_ID"
fi

INSTALL_FROM_SOURCE=0
echoVerbose() { echo "$1"; }
if [ $INSTALL_FROM_SOURCE = 0 ]; then
case "$ID" in
"ubuntu")
if [[ "$(echo "$UBUNTU_VERSION < 24.04" | bc)" -eq 1 ]]; then
echo "Ubuntu $UBUNTU_VERSION detected. GCC 14 not in default repos. Compiling from source..."
INSTALL_FROM_SOURCE=1
else
echoVerbose "Installing GCC 14 via apt on Ubuntu $UBUNTU_VERSION..."
sudo apt update
sudo apt install -y gcc-14 g++-14 && {
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-14
sudo update-alternatives --set gcc /usr/bin/gcc-14
exit 0
} || {
echo "Apt install failed. Falling back to source..."
INSTALL_FROM_SOURCE=1
}
fi
;;
"debian")
echo "Debian detected. Checking for GCC 14 in repos..."
sudo apt update
sudo apt install -y gcc-14 g++-14 && {
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-14
sudo update-alternatives --set gcc /usr/bin/gcc-14
exit 0
} || {
echo "GCC 14 not available in Debian repos. Compiling from source..."
INSTALL_FROM_SOURCE=1
}
;;
"centos" | "rhel" | "fedora")
echoVerbose "Detected $ID. Trying DNF..."
sudo dnf install -y gcc gcc-c++ && {
if [[ "$(gcc -dumpversion)" =~ ^"$GCC_REQUIRED_VERSION" ]]; then
exit 0
else
echo "DNF didn’t provide GCC 14. Compiling from source..."
INSTALL_FROM_SOURCE=1
fi
} || INSTALL_FROM_SOURCE=1
;;
"arch")
echoVerbose "Arch Linux detected. Using pacman..."
sudo pacman -Syu gcc || {
echo "GCC 14 not available via pacman yet. Compiling from source..."
INSTALL_FROM_SOURCE=1
}
;;
"opensuse" | "suse")
echoVerbose "openSUSE detected. Trying zypper..."
sudo zypper install -y gcc14 gcc14-c++ || {
echo "GCC 14 not available via zypper. Compiling from source..."
INSTALL_FROM_SOURCE=1
}
;;
*)
echo "Unsupported distro: $ID. Compiling GCC 14 from source..."
INSTALL_FROM_SOURCE=1
;;
esac
fi

if [[ "$INSTALL_FROM_SOURCE" -eq 1 ]]; then
echo "Compiling GCC 14 from source..."
if [[ -f /etc/debian_version ]]; then
sudo apt update
sudo apt install -y build-essential flex bison libgmp-dev libmpfr-dev libisl-dev libmpc-dev texinfo wget
elif [[ "$ID" == "centos" || "$ID" == "rhel" || "$ID" == "fedora" ]]; then
sudo dnf groupinstall -y "Development Tools"
sudo dnf install -y gmp-devel mpfr-devel libmpc-devel isl-devel flex bison texinfo wget
elif [[ "$ID" == "arch" ]]; then
sudo pacman -Syu base-devel gmp mpfr libmpc isl flex bison texinfo wget
elif [[ "$ID" == "opensuse" || "$ID" == "suse" ]]; then
sudo zypper install -y patterns-devel-base-devel_basis gmp-devel mpfr-devel libmpc3-devel isl-devel flex bison texinfo wget
else
echo "Warning: Unknown distro. Attempting source build without dependency check..."
fi

"$OF_DIR/scripts/dev/downloader.sh" "$GCC_URL" "$GCC_FILE.tar.gz" || { echo "Download failed"; exit 1; }
tar -xzf "$GCC_FILE.tar.gz" || { echo "Extraction failed"; exit 1; }
cd "$GCC_FILE" || exit 1

# GCC requires its own prerequisites (e.g., GMP, MPFR) in-tree
./contrib/download_prerequisites || { echo "Failed to download prerequisites"; exit 1; }

# Configure and build
mkdir -p build && cd build || exit 1
../configure --prefix="/usr/local/gcc-14" \
--enable-languages=c,c++ \
--disable-multilib \
--disable-bootstrap \
--with-system-zlib || { echo "Configure failed"; exit 1; }
make -j"$(nproc)" || { echo "Make failed"; exit 1; }
sudo make install || { echo "Install failed"; exit 1; }

# Set up paths based on architecture
ARCH=$(uname -m)
case "$ARCH" in
"x86_64")
GCC_PATH="/usr/local/gcc-14/bin"
GCC_LIB_PATH="/usr/local/gcc-14/lib64"
;;
"aarch64" | "arm64")
GCC_PATH="/usr/local/gcc-14/bin"
GCC_LIB_PATH="/usr/local/gcc-14/lib"
;;
*)
echo "Unsupported architecture: $ARCH"
exit 1
;;
esac

# Symlink binaries
if [[ -f "$GCC_PATH/gcc" ]]; then
sudo ln -sf "$GCC_PATH/gcc" /usr/bin/gcc
sudo ln -sf "$GCC_PATH/g++" /usr/bin/g++
else
echo "GCC 14 binary not found after install!"
exit 1
fi

# Update shell profile
USER_SHELL=$(basename "$SHELL")
case "$USER_SHELL" in
"bash") PROFILE_FILE="$HOME/.bashrc" ;;
"zsh") PROFILE_FILE="$HOME/.zshrc" ;;
"fish") PROFILE_FILE="$HOME/.config/fish/config.fish" ;;
*) PROFILE_FILE="$HOME/.profile" ;; # Fallback
esac

if [[ "$USER_SHELL" == "fish" ]]; then
echo "set -x PATH $GCC_PATH \$PATH" >> "$PROFILE_FILE"
echo "set -x LD_LIBRARY_PATH $GCC_LIB_PATH \$LD_LIBRARY_PATH" >> "$PROFILE_FILE"
else
echo "export PATH=$GCC_PATH:\$PATH" >> "$PROFILE_FILE"
echo "export LD_LIBRARY_PATH=$GCC_LIB_PATH:\$LD_LIBRARY_PATH" >> "$PROFILE_FILE"
source "$PROFILE_FILE" 2>/dev/null || echo "Run 'source $PROFILE_FILE' manually."
fi
fi

# Verify installation
echo "Installed GCC version:"
gcc --version || { echo "GCC not found after install!"; exit 1; }
g++ --version || { echo "G++ not found after install!"; exit 1; }
9 changes: 7 additions & 2 deletions scripts/linux/testAllExamples.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/bash

export LC_ALL=C
cd ../../examples
OFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OFDIR="$(realpath "$OF_DIR/../..")"
OFCORE_EXAMPLES_DIR="$(realpath "$OF_DIR/examples")"

cd ${OFCORE_EXAMPLES_DIR}

for category in $( ls . )
do
@@ -16,7 +20,7 @@ do
continue
fi
echo "-----------------------------------------------------------------"
echo "building " + $example
echo "building [" + $example "]"
cd $example
make Debug
ret=$?
@@ -30,6 +34,7 @@ do
echo error compiling $example
exit
fi
echo "build success [" + $example "]"
cd bin
./$example
cd ../../
64 changes: 33 additions & 31 deletions scripts/linux/ubuntu/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -155,39 +155,41 @@ then
fi

#check if glfw3 exists
apt-cache show libglfw3-dev
exit_code=$?
if [ $exit_code = 0 ]; then
GLFW_PKG=libglfw3-dev
else
echo installing glfw from source
GLFW_VER=32f38b97d544eb2fd9a568e94e37830106417b51

# tools for git use
GLFW_GIT_TAG=$GLFW_VER
apt-get install -y -qq libxrandr-dev libxinerama-dev libxcursor-dev cmake
wget https://github.com/glfw/glfw/archive/$GLFW_GIT_TAG.tar.gz -O glfw-$GLFW_GIT_TAG.tar.gz
tar -xf glfw-$GLFW_GIT_TAG.tar.gz
mv glfw-$GLFW_GIT_TAG glfw
rm glfw-$GLFW_GIT_TAG.tar.gz
cd glfw
mkdir -p build
cd build
cmake .. -DGLFW_BUILD_DOCS=OFF \
-DGLFW_BUILD_TESTS=OFF \
-DGLFW_BUILD_EXAMPLES=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release
make clean
make
make install
cd ../..
rm -rf glfw
GLFW_PKG=
fi
# apt-cache show libglfw3-dev
# exit_code=$?
# if [ $exit_code = 0 ]; then
# GLFW_PKG=libglfw3-dev
# else
# echo installing glfw from source
# GLFW_VER=32f38b97d544eb2fd9a568e94e37830106417b51

# # tools for git use
# GLFW_GIT_TAG=$GLFW_VER
# apt-get install -y -qq libxrandr-dev libxinerama-dev libxcursor-dev cmake
# wget https://github.com/glfw/glfw/archive/$GLFW_GIT_TAG.tar.gz -O glfw-$GLFW_GIT_TAG.tar.gz
# tar -xf glfw-$GLFW_GIT_TAG.tar.gz
# mv glfw-$GLFW_GIT_TAG glfw
# rm glfw-$GLFW_GIT_TAG.tar.gz
# cd glfw
# mkdir -p build
# cd build
# cmake .. -DGLFW_BUILD_DOCS=OFF \
# -DGLFW_BUILD_TESTS=OFF \
# -DGLFW_BUILD_EXAMPLES=OFF \
# -DBUILD_SHARED_LIBS=OFF \
# -DCMAKE_BUILD_TYPE=Release
# make clean
# make
# make install
# cd ../..
# rm -rf glfw
# GLFW_PKG=
# fi
GLFW_PKG=


PACKAGES="make nlohmann-json3-dev libssl3 libcurl4 brotli libcurl4-openssl-dev libjack-jackd2-0 libjack-jackd2-dev freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++${CXX_VER} libgl1-mesa-dev${XTAG} 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 ${LIB_GTK_DEV} libopencv-dev libassimp-dev librtaudio-dev libgstreamer${GSTREAMER_VERSION}-dev libgstreamer-plugins-base${GSTREAMER_VERSION}-dev ${GSTREAMER_FFMPEG} gstreamer${GSTREAMER_VERSION}-pulseaudio gstreamer${GSTREAMER_VERSION}-x gstreamer${GSTREAMER_VERSION}-plugins-bad gstreamer${GSTREAMER_VERSION}-alsa gstreamer${GSTREAMER_VERSION}-plugins-base gstreamer${GSTREAMER_VERSION}-plugins-good gdb liburiparser-dev libpugixml-dev libgtk2.0-0 libpoco-dev libxcursor-dev libxi-dev libxinerama-dev libxml2-dev binutils-gold ${GLFW_PKG}"

PACKAGES="make nlohmann-json3-dev libssl3 libcurl4 brotli libcurl4-openssl-dev libjack-jackd2-0 libjack-jackd2-dev freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++${CXX_VER} libgl1-mesa-dev${XTAG} 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 ${LIB_GTK_DEV} libopencv-dev libassimp-dev librtaudio-dev libgstreamer${GSTREAMER_VERSION}-dev libgstreamer-plugins-base${GSTREAMER_VERSION}-dev ${GSTREAMER_FFMPEG} gstreamer${GSTREAMER_VERSION}-pulseaudio gstreamer${GSTREAMER_VERSION}-x gstreamer${GSTREAMER_VERSION}-plugins-bad gstreamer${GSTREAMER_VERSION}-alsa gstreamer${GSTREAMER_VERSION}-plugins-base gstreamer${GSTREAMER_VERSION}-plugins-good gdb ${GLFW_PKG} liburiparser-dev libpugixml-dev libgtk2.0-0 libpoco-dev libxcursor-dev libxi-dev libxinerama-dev libxml2-dev"

echo "installing OF dependencies"
echo "OF needs to install the following packages using apt-get:"