Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion deps/BulletPhysics/checkout.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ IF NOT ERRORLEVEL 0 (
ECHO "Could not find git.exe"
EXIT /B %ERRORLEVEL%
)
%GIT_CMD% clone git@github.com:Eideren/BulletSharpPInvoke.git ../../externals/BulletSharpPInvoke
%GIT_CMD% clone https://github.com/stride3d/BulletSharpPInvoke ../../externals/BulletSharpPInvoke
pushd ..\..\externals\BulletSharpPInvoke
%GIT_CMD% checkout 0de0f3cd564173474c58d57aad31c8aad82cb99d
popd
if NOT ERRORLEVEL 0 pause
3 changes: 3 additions & 0 deletions deps/BulletPhysics/dotnet/win-arm64/libbulletc.dll
Git LFS file not shown
2 changes: 1 addition & 1 deletion deps/Celt/checkout.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ IF NOT ERRORLEVEL 0 (
ECHO "Could not find git.exe"
EXIT /B %ERRORLEVEL%
)
%GIT_CMD% clone https://git.xiph.org/opus.git -b v1.1.3 ..\..\externals\Celt
%GIT_CMD% clone https://github.com/xiph/opus.git -b v1.1.3 ..\..\externals\Celt
if NOT ERRORLEVEL 0 pause
69 changes: 69 additions & 0 deletions deps/FFmpeg/dotnet/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,24 @@ configure_windows_x64_shared() {
--prefix="${BASEDIR}/build/windows/x64"
}

configure_windows_arm64_shared() {
"${BASEDIR}/configure" \
--toolchain=msvc \
--arch=arm64 \
--enable-asm \
--enable-shared \
--enable-version3 \
--enable-w32threads \
--enable-yasm \
--disable-debug \
--disable-doc \
--disable-programs \
--disable-static \
--disable-x86asm \
--target-os=win64 \
--prefix="${BASEDIR}/build/windows/arm64"
}

configure_windows_x86_shared() {
"${BASEDIR}/configure" \
--toolchain=msvc \
Expand Down Expand Up @@ -99,6 +117,26 @@ configure_windows_x64_exe() {
--prefix="${BASEDIR}/build/windows/x64"
}

configure_windows_arm64_exe() {
"${BASEDIR}/configure" \
--toolchain=msvc \
--arch=arm64 \
--enable-asm \
--enable-static \
--enable-version3 \
--enable-w32threads \
--enable-yasm \
--disable-debug \
--disable-doc \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-shared \
--disable-x86asm \
--target-os=win64 \
--prefix="${BASEDIR}/build/windows/arm64"
}

install() {
make -j${NUMBER_OF_CORES} && make install
}
Expand All @@ -118,6 +156,21 @@ build_windows_x64_shared() {
popd
}

build_windows_arm64_shared() {
oot="${BASEDIR}/build/windows/arm64/oot/ffmpeg"
mkdir -p "$oot"
pushd "$oot"

# Configure ffmpeg (can be skipped if already done)
configure_windows_arm64_shared
# Make sure any previous build doesn't pollute the current one (can be skipped if configure didn't change since last time)
clean
# Build FFmpeg and copy binaries+include files into the installation folder (defined by --prefix in the configure command)
install

popd
}

build_windows_x86_shared() {
oot="${BASEDIR}/build/windows/x86/oot/ffmpeg"
mkdir -p "$oot"
Expand Down Expand Up @@ -148,6 +201,21 @@ build_windows_x64_exe() {
popd
}

build_windows_arm64_exe() {
oot="${BASEDIR}/build/windows/arm64/oot/ffmpeg"
mkdir -p "$oot"
pushd "$oot"

# Configure ffmpeg (can be skipped if already done)
configure_windows_arm64_exe
# Make sure any previous build doesn't pollute the current one (can be skipped if configure didn't change since last time)
clean
# Build FFmpeg and copy binaries+include files into the installation folder (defined by --prefix in the configure command)
install

popd
}

build_windows_x86_exe() {
oot="${BASEDIR}/build/windows/x86/oot/ffmpeg"
mkdir -p "$oot"
Expand All @@ -171,3 +239,4 @@ NUMBER_OF_CORES=$(nproc)
build_windows_x86_shared
#build_windows_x64_exe
#build_windows_x86_exe
#build_windows_arm64_exe
3 changes: 3 additions & 0 deletions deps/FFmpeg/dotnet/win-arm64/avcodec-57.dll
Git LFS file not shown
3 changes: 3 additions & 0 deletions deps/FFmpeg/dotnet/win-arm64/avdevice-57.dll
Git LFS file not shown
3 changes: 3 additions & 0 deletions deps/FFmpeg/dotnet/win-arm64/avfilter-6.dll
Git LFS file not shown
3 changes: 3 additions & 0 deletions deps/FFmpeg/dotnet/win-arm64/avformat-57.dll
Git LFS file not shown
3 changes: 3 additions & 0 deletions deps/FFmpeg/dotnet/win-arm64/avutil-55.dll
Git LFS file not shown
3 changes: 3 additions & 0 deletions deps/FFmpeg/dotnet/win-arm64/swresample-2.dll
Git LFS file not shown
3 changes: 3 additions & 0 deletions deps/FFmpeg/dotnet/win-arm64/swscale-4.dll
Git LFS file not shown
1 change: 1 addition & 0 deletions deps/FFmpeg/notes-win-arm64.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
For win-arm64: Use https://github.com/azeno/FFmpeg/tree/win-arm64, it's based on release/3.4
3 changes: 3 additions & 0 deletions deps/FreeImage/Release/win-arm64/FreeImage.dll
Git LFS file not shown
144 changes: 144 additions & 0 deletions deps/FreeImage/build-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c302b2..aa06919 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,5 @@
+cmake_minimum_required(VERSION 3.30)
+
project(FreeImage)

set(FreeImage_SOURCES
@@ -30,9 +32,17 @@ include_directories(Source/LibJXR/common/include)
include_directories(Source/LibJXR/image/sys)
include_directories(Source/LibJXR/jxrgluelib)

-add_definitions(-DOPJ_STATIC -DNO_WINDOWS -DNO_LCMS -D__ANSI__ -DDISABLE_PERF_MEASUREMENT -DLIBRAW_NODLL -DLIBRAW_LIBRARY_BUILD -DFREEIMAGE_LIB -DNO_LCMS)
-add_library(FreeImage STATIC ${FreeImage_SOURCES})
-install_dep(FreeImage include Source/FreeImage.h)
+add_definitions(-DOPJ_STATIC -DNO_WINDOWS -DNO_LCMS -D__ANSI__ -DDISABLE_PERF_MEASUREMENT -DLIBRAW_NODLL -DLIBRAW_LIBRARY_BUILD -DNO_LCMS)
+add_library(FreeImage SHARED ${FreeImage_SOURCES})
+# install_dep(FreeImage include Source/FreeImage.h)
+
+# Set C++ standard
+if (DEFINED C_STANDARD)
+ set(CMAKE_C_STANDARD ${C_STANDARD})
+endif()
+if (DEFINED CPP_STANDARD)
+ set(CMAKE_CXX_STANDARD ${CPP_STANDARD})
+endif()

if (APPLE)
set_target_properties(FreeImage PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO")
@@ -42,6 +52,11 @@ if (APPLE)
endif()
endif()

+# Enable Multi-core compilation in MSVC
+if (MSVC)
+ target_compile_options(${PROJECT_NAME} PRIVATE /MP)
+endif()
+
set(FreeImage_INCLUDE_DIR "${FreeImage_SOURCE_DIR}/Source" CACHE PATH "" FORCE)
set(FreeImage_LIBRARY_DBG FreeImage CACHE STRING "" FORCE)
set(FreeImage_LIBRARY_REL FreeImage CACHE STRING "" FORCE)
diff --git a/Source/DeprecationManager/DeprecationMgr.h b/Source/DeprecationManager/DeprecationMgr.h
index 9141f23..c3926cc 100644
--- a/Source/DeprecationManager/DeprecationMgr.h
+++ b/Source/DeprecationManager/DeprecationMgr.h
@@ -30,7 +30,7 @@

// ==========================================================

-#if !defined(_M_X64) && defined(_MSC_VER)
+#if !(defined(_M_X64) || defined(_M_ARM64)) && defined(_MSC_VER)
#define DEPRECATE(a,b) \
{ \
void *fptr; \
diff --git a/Source/LibJXR/image/sys/ansi.h b/Source/LibJXR/image/sys/ansi.h
index 2927b05..334d196 100644
--- a/Source/LibJXR/image/sys/ansi.h
+++ b/Source/LibJXR/image/sys/ansi.h
@@ -1,14 +1,14 @@
//*@@@+++@@@@******************************************************************
//
-// Copyright � Microsoft Corp.
+// Copyright © Microsoft Corp.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
-// � Redistributions of source code must retain the above copyright notice,
+// • Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
-// � Redistributions in binary form must reproduce the above copyright notice,
+// • Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
@@ -44,7 +44,7 @@
//================================
#define FORCE_INLINE
#define CDECL
-#if __LP64__
+#if defined(__LP64__) || defined(_WIN64)
#define UINTPTR_T unsigned long long
#define INTPTR_T long long
#else
diff --git a/Source/LibJXR/image/sys/strcodec.h b/Source/LibJXR/image/sys/strcodec.h
index ba3df4e..f727d4e 100644
--- a/Source/LibJXR/image/sys/strcodec.h
+++ b/Source/LibJXR/image/sys/strcodec.h
@@ -1,14 +1,14 @@
//*@@@+++@@@@******************************************************************
//
-// Copyright � Microsoft Corp.
+// Copyright © Microsoft Corp.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
-// � Redistributions of source code must retain the above copyright notice,
+// • Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
-// � Redistributions in binary form must reproduce the above copyright notice,
+// • Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
diff --git a/Source/LibTIFF4/tif_config.h b/Source/LibTIFF4/tif_config.h
index 64391b8..3027b83 100644
--- a/Source/LibTIFF4/tif_config.h
+++ b/Source/LibTIFF4/tif_config.h
@@ -81,7 +81,10 @@ If your big endian system isn't being detected, add an OS specific check
#endif // BYTE_ORDER

#ifdef _WIN32
+/* Visual Studio 2015 / VC 14 / MSVC 19.00 finally has snprintf() */
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
+#endif // _MSC_VER
#define lfind _lfind
#endif // _WIN32

diff --git a/Source/OpenEXR/IlmImf/ImfAttribute.cpp b/Source/OpenEXR/IlmImf/ImfAttribute.cpp
index feb5f83..3d601fc 100644
--- a/Source/OpenEXR/IlmImf/ImfAttribute.cpp
+++ b/Source/OpenEXR/IlmImf/ImfAttribute.cpp
@@ -61,12 +61,11 @@ Attribute::~Attribute () {}

namespace {

-struct NameCompare: std::binary_function <const char *, const char *, bool>
+struct NameCompare
{
- bool
- operator () (const char *x, const char *y) const
+ bool operator () (const char *x, const char *y) const
{
- return strcmp (x, y) < 0;
+ return strcmp(x, y) < 0;
}
};

14 changes: 14 additions & 0 deletions deps/FreeImage/checkout.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@echo OFF
setlocal
set HOME=%USERPROFILE%
CALL ..\find_git.cmd
IF NOT ERRORLEVEL 0 (
ECHO "Could not find git.exe"
EXIT /B %ERRORLEVEL%
)
%GIT_CMD% clone https://github.com/danoli3/FreeImage.git %~dp0..\..\externals\FreeImage
pushd %~dp0..\..\externals\FreeImage
%GIT_CMD% checkout 3.16.0
%GIT_CMD% apply ..\..\deps\freeimage\build-fix.patch
popd
if NOT ERRORLEVEL 0 pause
4 changes: 4 additions & 0 deletions deps/NativePath/checkout.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ IF NOT ERRORLEVEL 0 (
)
%GIT_CMD% clone https://github.com/stride3d/NativePath ../../externals/NativePath
IF NOT ERRORLEVEL 0 PAUSE
pushd ..\..\externals\NativePath
%GIT_CMD% checkout e615840e57ea80ce30b9e9f29f5fd84ca9b4b253

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good idea!

popd
IF NOT ERRORLEVEL 0 PAUSE

3 changes: 3 additions & 0 deletions deps/NativePath/dotnet/win-arm64/Detour.lib
Git LFS file not shown
3 changes: 3 additions & 0 deletions deps/NativePath/dotnet/win-arm64/Recast.lib
Git LFS file not shown
3 changes: 3 additions & 0 deletions deps/NativePath/dotnet/win-arm64/libCelt.lib
Git LFS file not shown
3 changes: 3 additions & 0 deletions deps/NativePath/dotnet/win-arm64/libNativePath.lib
Git LFS file not shown
3 changes: 0 additions & 3 deletions deps/NativePath/dotnet/win-x64/libCompilerRt.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/dotnet/win-x86/libCompilerRt.lib

This file was deleted.

Loading