diff options
author | Sven Gothel <[email protected]> | 2023-05-04 01:37:57 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-05-04 01:37:57 +0200 |
commit | 8c9c768e697dfbab8ec92ec9c496a46a617ad8c4 (patch) | |
tree | a4797c9244406f4ca69f6e733f0735924623b8da | |
parent | 159cd98994f199c014c14c048fe4d18270057e49 (diff) |
Windows: Drop using soft_oal.dll blobs, use own bundled openal-soft instead.
Note: This requires mingw-w64 w/ posix-threads to allow using C++ std::mutex etc.
-rwxr-xr-x | make/build.xml | 40 | ||||
-rw-r--r-- | make/lib/windows-amd64/soft_oal.dll | bin | 417320 -> 0 bytes | |||
-rw-r--r-- | make/lib/windows-i586/soft_oal.dll | bin | 402553 -> 0 bytes | |||
-rwxr-xr-x | make/scripts/make.joal.all.win64.bat | 2 | ||||
-rw-r--r-- | src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java | 5 |
5 files changed, 9 insertions, 38 deletions
diff --git a/make/build.xml b/make/build.xml index 871868b..71d74e2 100755 --- a/make/build.xml +++ b/make/build.xml @@ -478,7 +478,7 @@ nativejarfile="${build}/jar/joal-natives-${os.and.arch}.jar" manifestfile="${build}/tempversion-natives" module="openal" - includelibs="*joal.${native.library.suffix} *soft_oal.${native.library.suffix} *openal.${native.library.suffix} *openal*.1*.${native.library.suffix}" /> + includelibs="*joal.${native.library.suffix} *openal.${native.library.suffix} OpenAL32.${native.library.suffix} *openal*.1*.${native.library.suffix}" /> <!-- Produce duplicates for different configurations, since non-native-jar aliasing (Bug 1023/Bug 1024) --> <copy file="${build}/jar/joal-natives-${os.and.arch}.jar" tofile="${build}/jar/joal-android-natives-${os.and.arch}.jar"/> </target> @@ -541,35 +541,14 @@ <copy file="lib/bsinc_inc.h" todir="${build}/openal-soft" overwrite="true"/> <exec dir="${build}/openal-soft" executable="cmake" logError="true" failonerror="false" failifexecutionfails="false"> <env key="PATH" value="${env.PATH}"/> - <arg line="-G 'MinGW Makefiles'"/> + <arg line="-G 'MinGW Makefiles'"/> <!-- Ensure to use vanilla cmake, not cygwin cmake! --> + <arg value="-DCMAKE_MAKE_PROGRAM=mingw32-make.exe"/> <arg value="../../openal-soft"/> <arg value="-DCMAKE_TOOLCHAIN_FILE=../../openal-soft/cmake/toolchain.windows.cmake"/> </exec> <exec dir="${build}/openal-soft" executable="mingw32-make.exe" logError="true" failonerror="false" failifexecutionfails="false" /> </target> - <target name="c.download.openal.soft.windows"> - <property name="c.build.openal.soft.done" value="true" /> - <!-- downloads the binaries of OpenAL-Soft for Windows as they aren't bundled with JOAL yet --> - <get src="http://kcat.strangesoft.net/openal-soft-1.15.1-bin.zip" dest="." verbose="true" usetimestamp="true" /> - <!-- extracts the DLLs of OpenAL-Soft for Windows 32 bits & 64 bits --> - <unzip src="openal-soft-1.15.1-bin.zip" dest="."> - <patternset> - <include name="**/soft_oal.dll"/> - </patternset> - </unzip> - <!-- deletes the ZIP archive --> - <delete file="openal-soft-1.15.1-bin.zip" /> - <!-- creates the directories from which the DLLs will be picked up --> - <mkdir dir="lib/windows-i586" /> - <mkdir dir="lib/windows-amd64" /> - <!-- moves the DLLs into these newly created directories --> - <move file="openal-soft-1.15.1-bin/Win32/soft_oal.dll" todir="lib/windows-i586" /> - <move file="openal-soft-1.15.1-bin/Win64/soft_oal.dll" todir="lib/windows-amd64" /> - <!-- deletes the directories created during the decompression of the ZIP archive --> - <delete dir="openal-soft-1.15.1-bin" /> - </target> - <target name="c.build.openal.soft.gcc.armv6.hard" if="useLinuxARMv6HFOptions" unless="c.build.openal.soft.done"> <property name="c.build.openal.soft.done" value="true" /> <mkdir dir="${build}/openal-soft" /> @@ -657,21 +636,12 @@ <exec dir="${build}/openal-soft" executable="make" logError="true" failonerror="false" failifexecutionfails="false" /> </target> - <!-- If compilation is not supported or fails, at least we pick up the injected pre-compiled binaries, if available. --> - <target name="c.build.openal.use-blobs" unless="c.build.openal.soft.done"> - <copy todir="../${rootrel.build}/obj" failonerror="false"> - <fileset dir="lib/${os.and.arch}" erroronmissingdir="false"> - <include name="*openal.${native.library.suffix}" /> - <include name="*soft_oal.${native.library.suffix}" /> - </fileset> - </copy> - </target> - <target name="c.build.openal.soft" - depends="init, gluegen.cpptasks.detect.os, gluegen.cpptasks.setup.compiler, c.build.openal.use-blobs, c.build.openal.soft.windows, c.build.openal.soft.android.x86, c.build.openal.soft.android.arm, c.build.openal.soft.android.arm64, c.build.openal.soft.gcc.armv6.hard, c.build.openal.soft.gcc.aarch64, c.build.openal.soft.clang.x86_32, c.build.openal.soft.clang.default, c.build.openal.soft.gcc.x86_32, c.build.openal.soft.gcc.default"> + depends="init, gluegen.cpptasks.detect.os, gluegen.cpptasks.setup.compiler, c.build.openal.soft.windows, c.build.openal.soft.android.x86, c.build.openal.soft.android.arm, c.build.openal.soft.android.arm64, c.build.openal.soft.gcc.armv6.hard, c.build.openal.soft.gcc.aarch64, c.build.openal.soft.clang.x86_32, c.build.openal.soft.clang.default, c.build.openal.soft.gcc.x86_32, c.build.openal.soft.gcc.default"> <copy todir="../${rootrel.build}/obj" failonerror="false"> <fileset dir="${build}/openal-soft" erroronmissingdir="false"> <include name="*openal.${native.library.suffix}" /> + <include name="OpenAL32.${native.library.suffix}" /> <include name="*soft_oal.${native.library.suffix}" /> </fileset> </copy> diff --git a/make/lib/windows-amd64/soft_oal.dll b/make/lib/windows-amd64/soft_oal.dll Binary files differdeleted file mode 100644 index b47ff95..0000000 --- a/make/lib/windows-amd64/soft_oal.dll +++ /dev/null diff --git a/make/lib/windows-i586/soft_oal.dll b/make/lib/windows-i586/soft_oal.dll Binary files differdeleted file mode 100644 index 71ced6a..0000000 --- a/make/lib/windows-i586/soft_oal.dll +++ /dev/null diff --git a/make/scripts/make.joal.all.win64.bat b/make/scripts/make.joal.all.win64.bat index af6563b..e0a39a7 100755 --- a/make/scripts/make.joal.all.win64.bat +++ b/make/scripts/make.joal.all.win64.bat @@ -6,7 +6,7 @@ set ANT_PATH=C:\apache-ant-1.10.5 set GIT_PATH=C:\cygwin64\bin
set SEVENZIP=C:\Program Files\7-Zip
-set CMAKE_PATH=C:\make-3.25.1-windows-x64_64
+set CMAKE_PATH=C:\cmake-3.25.1-windows-x86_64
set CMAKE_C_COMPILER=c:\mingw64\bin\gcc
set PATH=%J2RE_HOME%\bin;%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw64\bin;%CMAKE_PATH%\bin;%GIT_PATH%;%SEVENZIP%;%PATH%
diff --git a/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java b/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java index 233f8b1..e58e34c 100644 --- a/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java +++ b/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java @@ -113,11 +113,12 @@ public final class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInf } final List<String> alSoftLibNames = new ArrayList<String>(); { - // This name is in use by the (installed if any) OpenAL-soft - alSoftLibNames.add("soft_oal"); // These names are in use by the bundled OpenAL-soft, also generic ones alSoftLibNames.add("openal"); alSoftLibNames.add("OpenAL"); + alSoftLibNames.add("OpenAL32"); + // This name is in use by the (installed if any) OpenAL-soft + alSoftLibNames.add("soft_oal"); } final List<String> alLibNames = new ArrayList<String>(); |