Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hsm4 committed Jun 24, 2024
2 parents 0fe171c + 052c005 commit a059448
Show file tree
Hide file tree
Showing 16 changed files with 177 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-arm64-macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build macOS-arm64
name: Build macOS arm64

on:
workflow_dispatch:
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/build-dep-assimp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,22 @@ jobs:

- name: Run build script
working-directory: ${{ github.workspace }}/externals/prebuild_scripts/
run: ./build_assimp_for_linux.sh v5.0.0
run: ./build_assimp_for_linux.sh v5.4.0

- name: Archive prebuilt assimp
uses: actions/upload-artifact@v3
with:
name: prebuilt-assimp-linux
path: ${{ github.workspace }}/externals/prebuilt/linux_assimp_v5.0.0
path: ${{ github.workspace }}/externals/prebuilt/linux_assimp_v5.4.0


- name: Run andv8 build script
working-directory: ${{ github.workspace }}/externals/prebuild_scripts/
run: ./build_assimp_for_andV8.sh v5.4.0

- name: Archive prebuilt assimp
uses: actions/upload-artifact@v3
with:
name: prebuilt-assimp-android
path: ${{ github.workspace }}/externals/prebuilt/andV8_assimp_v5.4.0

23 changes: 20 additions & 3 deletions .github/workflows/build-dep-openssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,23 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: prebuilt-openssl-linux
path: ${{ github.workspace }}/externals/prebuilt/linux_openssl_1.1.1h
path: ${{ github.workspace }}/externals/prebuilt/linux_openssl_3.2.1

build-android:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Run android build script
working-directory: ${{ github.workspace }}/externals/prebuild_scripts/
run: ./build_openssl_for_andV8.sh

- name: Archive prebuilt andV8
uses: actions/upload-artifact@v3
with:
name: prebuilt-openssl-andV8
path: ${{ github.workspace }}/externals/prebuilt/andV8_openssl_3.2.1

build-macos:
runs-on: macos-13
steps:
Expand All @@ -61,10 +77,11 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: prebuilt-openssl-mac64
path: ${{ github.workspace }}/externals/prebuilt/mac64_openssl_1.1.1g
path: ${{ github.workspace }}/externals/prebuilt/mac64_openssl_3.2.1

- name: Archive prebuilt openssl ios
uses: actions/upload-artifact@v3
with:
name: prebuilt-openssl-ios
path: ${{ github.workspace }}/externals/prebuilt/iosV8_openssl_1.1.1g
path: ${{ github.workspace }}/externals/prebuilt/iosV8_openssl_3.2.1

2 changes: 1 addition & 1 deletion .github/workflows/build-x86_64-linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build linux-x86
name: Build Linux x86-64

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-x86_64-macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build macOS-x86
name: Build macOS x86-64

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-x86_64-windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Windows
name: Build Windows x86-64

on:
workflow_dispatch:
Expand Down
25 changes: 21 additions & 4 deletions externals/prebuild_scripts/build_assimp_for_andV8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ ZIPFILE="$ARCH"_assimp_"$assimp_VERSION"
ZIPFOLDER=$ZIPFILE
BUILD_D="$ARCH"_debug_"$assimp_VERSION"
BUILD_R="$ARCH"_release_"$assimp_VERSION"
#ANDROID_NDK_VERSION="26.2.11394342"
ANDROID_NDK_VERSION="r26d"
WORK_PATH=$(cd "$(dirname "$0")";pwd)
export ANDROID_NDK_HOME="android-ndk-$ANDROID_NDK_VERSION"
export ANDROID_NDK_PATH=${WORK_PATH}/${ANDROID_NDK_HOME}
export ANDROID_NDK_ROOT=${ANDROID_NDK_PATH}

clear
echo "Building assimp Version: $assimp_VERSION"
Expand All @@ -19,6 +25,14 @@ if [ "$#" -lt 1 ]; then
exit
fi


if [ ! -d $ANDROID_NDK_HOME ]
then
wget https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux.zip
unzip android-ndk-${ANDROID_NDK_VERSION}-linux.zip
fi


# Cloning assimp
if [ ! -d "assimp/.git" ]; then
git clone https://github.com/assimp/assimp
Expand All @@ -36,19 +50,22 @@ else
exit
fi

export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:$ANDROID_NDK_ROOT/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin:$PATH

# Make build folder for debug version
rm -rf $BUILD_D
mkdir $BUILD_D
cd $BUILD_D

# Run cmake to configure and generate the make files

cmake \
-DCMAKE_TOOLCHAIN_FILE=/Users/ghm1/Library/Android/sdk/ndk/21.3.6528147/build/cmake/android.toolchain.cmake \
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM=android-N \
-DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=Debug \
-DASSIMP_BUILD_TESTS=OFF \
-DINJECT_DEBUG_POSTFIX=OFF \
-DBUILD_SHARED_LIBS=ON \
..

Expand All @@ -66,12 +83,12 @@ cd $BUILD_R

# Run cmake to configure and generate the make files
cmake \
-DCMAKE_TOOLCHAIN_FILE=/Users/ghm1/Library/Android/sdk/ndk/21.3.6528147/build/cmake/android.toolchain.cmake \
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM=android-N \
-DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=Release \
-DASSIMP_BUILD_TESTS=OFF \
-DINJECT_DEBUG_POSTFIX=OFF \
-DBUILD_SHARED_LIBS=ON \
..

Expand Down
1 change: 1 addition & 0 deletions externals/prebuild_scripts/build_assimp_for_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ cd "$BUILD_R"
cmake \
-DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=Release \
-DASSIMP_WARNINGS_AS_ERRORS=False \
-DASSIMP_BUILD_TESTS=OFF \
-DINJECT_DEBUG_POSTFIX=OFF \
..
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ZIPFILE="$ARCH"_opencv_"$CV_VERSION"
ZIPFOLDER=build/$ZIPFILE
BUILD_D=build/"$ARCH"_debug_"$CV_VERSION"
BUILD_R=build/"$ARCH"_release_"$CV_VERSION"
NDK_VERSION="26.2.11394342"

clear
echo "============================================================"
Expand Down Expand Up @@ -58,7 +59,7 @@ cd $BUILD_D

# Run cmake to configure and generate the make files
cmake \
-DCMAKE_TOOLCHAIN_FILE=~/Android/Sdk/ndk/21.3.6528147/build/cmake/android.toolchain.cmake \
-DCMAKE_TOOLCHAIN_FILE=~/Android/Sdk/ndk/$NDK_VERSION/build/cmake/android.toolchain.cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DANDROID_ABI=arm64-v8a \
-DWITH_CUDA=OFF \
Expand Down Expand Up @@ -93,7 +94,7 @@ cd $BUILD_R

# Run cmake to configure and generate the make files
cmake \
-DCMAKE_TOOLCHAIN_FILE=~/Android/Sdk/ndk/21.3.6528147/build/cmake/android.toolchain.cmake \
-DCMAKE_TOOLCHAIN_FILE=~/Android/Sdk/ndk/$NDK_VERSION/build/cmake/android.toolchain.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_WITH_DEBUG_INFO=OFF \
-DANDROID_ABI=arm64-v8a \
Expand Down
46 changes: 18 additions & 28 deletions externals/prebuild_scripts/build_openssl_for_andV8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,38 @@
# the variable TOOLCHAIN (search below). E.g. on macos it is
# $ANDROID_NDK_HOME/toolchains/llvm/prebuilt/darwin-x86_64/bin

openssl_VERSION="OpenSSL_1_1_1h"
ANDROID_NDK_VERSION="r20b"

openssl_VERSION="3.2.1"
if [ -n "$1" ]
then
openssl_VERSION="$1"
fi

if [ "$ANDROID_NDK_HOME" == "" ]
WORK_PATH=$(cd "$(dirname "$0")";pwd)
if [ ! -d android-ndk-r20b ]
then
echo "android ndk home not defined"
echo "export ANDROID_NDK_HOME=/path/Android/ndk-bundle/"
exit
wget https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip
unzip android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip
fi
export ANDROID_NDK_HOME="android-ndk-r20b"
export ANDROID_NDK_PATH=${WORK_PATH}/${ANDROID_NDK_HOME}
export ANDROID_NDK_ROOT=${ANDROID_NDK_PATH}

ARCH=andV8
ZIPFILE=${ARCH}_openssl

clear
echo "Building openssl Version: $openssl_VERSION"

if [ ! -d "openssl/.git" ]; then
git clone https://github.com/openssl/openssl.git
fi

# Get all assimp tags and check if the requested exists
cd openssl
git tag > openssl_tags.txt

if grep -Fx "$openssl_VERSION" openssl_tags.txt > /dev/null; then
git checkout $openssl_VERSION
git pull origin $openssl_VERSION
else
echo "No valid openssl tag passed as 1st parameter !!!!!"
exit
if [ ! -d "openssl-${openssl_VERSION}" ]; then
wget https://www.openssl.org/source/openssl-${openssl_VERSION}.tar.gz
tar -zxf openssl-${openssl_VERSION}.tar.gz
fi

ls

cd openssl-${openssl_VERSION}

export CC=clang
export TOOLCHAIN=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin
export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin:$ANDROID_NDK_ROOT/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin:$PATH
export API=21
export PATH=$TOOLCHAIN:$PATH
architecture=android-arm64

export PREFIX=$(pwd)/../$ZIPFILE
Expand All @@ -70,10 +60,10 @@ make install

cd ..

if [ -d "../prebuilt/${ARCH}_openssl" ]
if [ -d "../prebuilt/${ARCH}_openssl-${openssl_VERSION}" ]
then
rm -rf ../prebuilt/${ARCH}_openssl
rm -rf ../prebuilt/${ARCH}_openssl-${openssl_VERSION}
fi

mv ${ZIPFILE} ../prebuilt/${ARCH}_openssl/
mv ${ZIPFILE} ../prebuilt/${ARCH}_openssl-${openssl_VERSION}/

31 changes: 11 additions & 20 deletions externals/prebuild_scripts/build_openssl_for_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,36 @@
# ####################################################


VERSION="1.1.1h"
openssl_VERSION="OpenSSL_1_1_1h"
VERSION="3.2.1"
#if [ -n "$1" ]
#then
# openssl_VERSION="$1"
# VERSION="$1"
#fi

ARCH=linux
ZIPFILE=${ARCH}_openssl_${VERSION}

clear
echo "Building openssl Version: $openssl_VERSION"
echo "Building openssl Version: $VERSION"

if [ ! -d "openssl/.git" ]; then
git clone https://github.com/openssl/openssl.git
if [ ! -d "openssl-${VERSION}" ]; then
wget https://www.openssl.org/source/openssl-${VERSION}.tar.gz
tar -zxf openssl-${VERSION}.tar.gz
fi

# Get all assimp tags and check if the requested exists
cd openssl
git tag > openssl_tags.txt
cd "openssl-${VERSION}"

if grep -Fx "$openssl_VERSION" openssl_tags.txt > /dev/null; then
git checkout $openssl_VERSION
git pull origin $openssl_VERSION
else
echo "No valid openssl tag passed as 1st parameter !!!!!"
exit
fi


export CC=clang
#export CC=clang
export PREFIX=$(pwd)/../$ZIPFILE

if [ ! -d "$PREFIX" ]
then
mkdir $PREFIX
fi

./config --prefix=$PREFIX --openssldir=$PREFIX
#./config --prefix=$PREFIX --openssldir=$PREFIX

./Configure ${x86_64} --prefix=$PREFIX --openssldir=$PREFIX

if [ $? -ne 0 ]
then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ echo "============================================================"

git clone https://github.com/jasonacox/Build-OpenSSL-cURL.git

OPENSSL_VER=1.1.1g
#OPENSSL_VER=1.1.1g
OPENSSL_VER=3.2.1
OUTDIR_MAC=mac64_openssl_"$OPENSSL_VER"
OUTDIR_IOS=iosV8_openssl_"$OPENSSL_VER"
BUILDDIR=Build-OpenSSL-cURL
Expand All @@ -35,3 +36,4 @@ cp -R ../prebuild_scripts/$BUILDDIR/openssl/iOS/include $OUTDIR_IOS/include
cp -R ../prebuild_scripts/$BUILDDIR/openssl/iOS/lib $OUTDIR_IOS/release
cp ../prebuild_scripts/$BUILDDIR/LICENSE $OUTDIR_MAC/
cp ../prebuild_scripts/$BUILDDIR/LICENSE $OUTDIR_IOS/

5 changes: 3 additions & 2 deletions externals/prebuild_scripts/build_openssl_for_win64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

@echo off

set OPENSSL_VERSION="OpenSSL_1_1_1h"
set OPENSSL_VERSION="openssl-3.2.1"
::set VERSION="3.2.1"

if "%1" == "" (
set OPENSSL_VERSION="%1"
Expand All @@ -21,7 +22,7 @@ echo Building OpenSSL Version: %OPENSSL_VERSION%
echo Installation directory: %PREFIX%
echo Using %MAX_NUM_CPU_CORES% cpu cores for build.

::-----------------------------------------------------------------::
-----------------------------------------------------------------::
if not exist openssl (
git clone https://github.com/openssl/openssl.git
) else (
Expand Down
Loading

0 comments on commit a059448

Please sign in to comment.