Skip to content

Commit 298cc3d

Browse files
committed
Initial commit
0 parents  commit 298cc3d

File tree

5 files changed

+57
-0
lines changed

5 files changed

+57
-0
lines changed

.github/workflows/package.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Package
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
container:
9+
image: unityci/editor:ubuntu-2021.3.9f1-base-1.0.1
10+
steps:
11+
- uses: actions/checkout@v1
12+
with:
13+
submodules: true
14+
- name: Build FreeImage
15+
run: |
16+
chmod a+x scripts/build-android.sh
17+
./scripts/build-android.sh
18+
echo "Activation done. Packaging..."
19+
python scripts/build-android.py /opt/unity/Editor/Unity
20+
shell: bash
21+
- uses: actions/upload-artifact@v3
22+
with:
23+
name: libFreeImage.so
24+
path: build/libFreeImage.so

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "unity-async-textureimport"]
2+
path = unity-async-textureimport
3+
url = https://codeberg.org/matiaslavik/unity-async-textureimport
4+
[submodule "FreeImage"]
5+
path = FreeImage
6+
url = https://github.com/mlavik1/FreeImage-Cmake

FreeImage

Submodule FreeImage added at bc1a9fd

scripts/build-android.py

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import os, shutil, errno, sys
2+
3+
if os.path.exists("build"):
4+
shutil.rmtree("build")
5+
os.mkdir("build")
6+
os.chdir("build")
7+
8+
if len(sys.argv) > 1:
9+
android_ndk_path = str(sys.argv[1] + "/Data/PlaybackEngines/AndroidPlayer/NDK")
10+
print(android_ndk_path)
11+
12+
cmd_configure = """cmake ../FreeImage \
13+
-G"Unix Makefiles" \
14+
-DCMAKE_BUILD_TYPE=Release \
15+
-DCMAKE_TOOLCHAIN_FILE="{android_ndk_path}/build/cmake/android.toolchain.cmake" \
16+
-DCMAKE_MAKE_PROGRAM="{android_ndk_path}/prebuilt/linux-x86_64/bin/make" \
17+
-DANDROID_NDK="{android_ndk_path}" \
18+
-DANDROID_NATIVE_API_LEVEL=android-9 \
19+
-DANDROID_ABI=arm64-v8a \
20+
-DFREEIMAGE_LIB=OFF \
21+
-DSUPPORT_FMT_TIFF=ON \
22+
-DSUPPORT_FMT_JPEG=ON""".format(android_ndk_path=android_ndk_path)
23+
24+
os.system(cmd_configure)
25+
os.system("cmake --build .")

unity-async-textureimport

Submodule unity-async-textureimport added at 5114d9e

0 commit comments

Comments
 (0)