mirror of
https://github.com/love2d/megasource.git
synced 2026-08-12 00:20:55 +02:00
Updated SDL2 to the latest code from Mercurial.
This commit is contained in:
+1
-1
@@ -137,7 +137,7 @@ set(MEGA_LIBVORBIS_VER "1.3.5")
|
||||
set(MEGA_LIBTHEORA_VER "1.1")
|
||||
set(MEGA_MPG123_VER "1.15.3")
|
||||
set(MEGA_FREETYPE_VER "2.6.2")
|
||||
set(MEGA_SDL2_VER "2.0.3-6ccf11a01cb5")
|
||||
set(MEGA_SDL2_VER "2.0.3-e05d46c27ce3")
|
||||
set(MEGA_OPENAL_VER "1.17.0")
|
||||
set(MEGA_MODPLUG_VER "0.8.8.4")
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
repo: 74212992fb0868a6929180cd74dd67e38507340a
|
||||
node: 6ccf11a01cb585eacf1a039a477a18ec82188f81
|
||||
node: e05d46c27ce3d91d427f74ae0ca8d900d83cbcad
|
||||
branch: default
|
||||
latesttag: release-2.0.3
|
||||
latesttagdistance: 1181
|
||||
latesttagdistance: 1235
|
||||
|
||||
Regular → Executable
+74
-29
@@ -296,8 +296,8 @@ set_option(VIDEO_VIVANTE "Use Vivante EGL video driver" ${UNIX_SYS})
|
||||
|
||||
# TODO: We should (should we?) respect cmake's ${BUILD_SHARED_LIBS} flag here
|
||||
# The options below are for compatibility to configure's default behaviour.
|
||||
set(SDL_SHARED ON CACHE BOOL "Build a shared version of the library")
|
||||
set(SDL_STATIC OFF CACHE BOOL "Build a static version of the library")
|
||||
set(SDL_SHARED ${SDL_SHARED_ENABLED_BY_DEFAULT} CACHE BOOL "Build a shared version of the library")
|
||||
set(SDL_STATIC ON CACHE BOOL "Build a static version of the library")
|
||||
|
||||
# General source files
|
||||
file(GLOB SOURCE_FILES
|
||||
@@ -389,7 +389,7 @@ if(USE_GCC OR USE_CLANG)
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined")
|
||||
check_c_compiler_flag("" HAVE_NO_UNDEFINED)
|
||||
set(CMAKE_REQUIRED_FLAGS)
|
||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
if(HAVE_NO_UNDEFINED)
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,--no-undefined")
|
||||
endif()
|
||||
@@ -695,6 +695,52 @@ if(SDL_VIDEO)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES})
|
||||
file(GLOB ANDROID_MAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_MAIN_SOURCES})
|
||||
if(SDL_AUDIO)
|
||||
set(SDL_AUDIO_DRIVER_ANDROID 1)
|
||||
file(GLOB ANDROID_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_AUDIO_SOURCES})
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
endif()
|
||||
if(SDL_FILESYSTEM)
|
||||
set(SDL_FILESYSTEM_ANDROID 1)
|
||||
file(GLOB ANDROID_FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_FILESYSTEM_SOURCES})
|
||||
set(HAVE_SDL_FILESYSTEM TRUE)
|
||||
endif()
|
||||
if(SDL_JOYSTICK)
|
||||
set(SDL_JOYSTICK_ANDROID 1)
|
||||
file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_JOYSTICK_SOURCES})
|
||||
set(HAVE_SDL_JOYSTICK TRUE)
|
||||
endif()
|
||||
if(SDL_POWER)
|
||||
set(SDL_POWER_ANDROID 1)
|
||||
file(GLOB ANDROID_POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_POWER_SOURCES})
|
||||
set(HAVE_SDL_POWER TRUE)
|
||||
endif()
|
||||
if(SDL_VIDEO)
|
||||
set(SDL_VIDEO_DRIVER_ANDROID 1)
|
||||
file(GLOB ANDROID_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/android/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_VIDEO_SOURCES})
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
#enable gles
|
||||
if(VIDEO_OPENGLES)
|
||||
set(SDL_VIDEO_OPENGL_EGL 1)
|
||||
set(HAVE_VIDEO_OPENGLES TRUE)
|
||||
set(SDL_VIDEO_OPENGL_ES2 1)
|
||||
set(SDL_VIDEO_RENDER_OGL_ES2 1)
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND EXTRA_LDFLAGS "-Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit")
|
||||
endif()
|
||||
|
||||
# Platform-specific options and settings
|
||||
if(EMSCRIPTEN)
|
||||
# Hide noisy warnings that intend to aid mostly during initial stages of porting a new
|
||||
@@ -833,7 +879,7 @@ elseif(UNIX AND NOT APPLE)
|
||||
|
||||
if(SDL_JOYSTICK)
|
||||
CheckUSBHID() # seems to be BSD specific - limit the test to BSD only?
|
||||
if(LINUX)
|
||||
if(LINUX AND NOT ANDROID)
|
||||
set(SDL_JOYSTICK_LINUX 1)
|
||||
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
|
||||
@@ -905,9 +951,20 @@ elseif(WINDOWS)
|
||||
file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
|
||||
|
||||
if(MSVC)
|
||||
# Prevent codegen that would use the VC runtime libraries.
|
||||
add_definitions(/GS-)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
add_definitions(/arch:SSE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check for DirectX
|
||||
if(DIRECTX)
|
||||
if(NOT CMAKE_COMPILER_IS_MINGW)
|
||||
if(DEFINED MSVC_VERSION AND NOT ${MSVC_VERSION} LESS 1700)
|
||||
set(USE_WINSDK_DIRECTX TRUE)
|
||||
endif()
|
||||
if(NOT CMAKE_COMPILER_IS_MINGW AND NOT USE_WINSDK_DIRECTX)
|
||||
if("$ENV{DXSDK_DIR}" STREQUAL "")
|
||||
message_error("DIRECTX requires the \$DXSDK_DIR environment variable to be set")
|
||||
endif()
|
||||
@@ -933,11 +990,9 @@ elseif(WINDOWS)
|
||||
check_include_file(dxgi.h HAVE_DXGI_H)
|
||||
if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H OR HAVE_XAUDIO2_H)
|
||||
set(HAVE_DIRECTX TRUE)
|
||||
if(NOT CMAKE_COMPILER_IS_MINGW)
|
||||
if(NOT CMAKE_COMPILER_IS_MINGW AND NOT USE_WINSDK_DIRECTX)
|
||||
# TODO: change $ENV{DXSDL_DIR} to get the path from the include checks
|
||||
set(SDL_LINK_DIR $ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH})
|
||||
set(SDL_LINK_DIR ${SDL_LINK_DIR} PARENT_SCOPE)
|
||||
link_directories(${SDL_LINK_DIR})
|
||||
link_directories($ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH})
|
||||
include_directories($ENV{DXSDK_DIR}\\Include)
|
||||
endif()
|
||||
endif()
|
||||
@@ -1053,7 +1108,7 @@ elseif(WINDOWS)
|
||||
list(APPEND EXTRA_LIBS dinput8 dxguid)
|
||||
if(CMAKE_COMPILER_IS_MINGW)
|
||||
list(APPEND EXTRA_LIBS dxerr8)
|
||||
else()
|
||||
elseif (NOT USE_WINSDK_DIRECTX)
|
||||
list(APPEND EXTRA_LIBS dxerr)
|
||||
endif()
|
||||
endif()
|
||||
@@ -1090,16 +1145,13 @@ elseif(WINDOWS)
|
||||
list(APPEND EXTRA_LDFLAGS "-mwindows")
|
||||
set(SDL_CFLAGS "${SDL_CFLAGS} -Dmain=SDL_main")
|
||||
list(APPEND SDL_LIBS "-lmingw32" "-lSDL2main" "-mwindows")
|
||||
elseif(MSVC)
|
||||
# Avoids linker errors, since we don't link with the CRT
|
||||
add_definitions(/arch:SSE /GS-)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
# TODO: rework this for proper MacOS X, iOS and Darwin support
|
||||
|
||||
# Requires the darwin file implementation
|
||||
if(SDL_FILE)
|
||||
file(GLOB EXTRA_SOURCES ${PROJECT_SOURCE_DIR}/src/file/cocoa/*.m)
|
||||
file(GLOB EXTRA_SOURCES ${SDL2_SOURCE_DIR}/src/file/cocoa/*.m)
|
||||
set(SOURCE_FILES ${EXTRA_SOURCES} ${SOURCE_FILES})
|
||||
set_source_files_properties(${EXTRA_SOURCES} PROPERTIES LANGUAGE C)
|
||||
set(HAVE_SDL_FILE TRUE)
|
||||
@@ -1404,7 +1456,6 @@ set(_INSTALL_LIBS "SDL2main")
|
||||
|
||||
if(SDL_SHARED)
|
||||
add_library(SDL2 SHARED ${SOURCE_FILES})
|
||||
install(TARGETS SDL2 RUNTIME DESTINATION . LIBRARY DESTINATION .)
|
||||
if(UNIX)
|
||||
set_target_properties(SDL2 PROPERTIES
|
||||
VERSION ${LT_VERSION}
|
||||
@@ -1415,15 +1466,15 @@ if(SDL_SHARED)
|
||||
VERSION ${SDL_VERSION}
|
||||
SOVERSION ${LT_REVISION}
|
||||
OUTPUT_NAME "SDL2")
|
||||
if(MSVC)
|
||||
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
|
||||
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
|
||||
set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
|
||||
endif()
|
||||
endif()
|
||||
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
|
||||
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||
target_include_directories(SDL2 PUBLIC include)
|
||||
if(MSVC)
|
||||
# Don't try to link with the default set of libraries.
|
||||
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
|
||||
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
|
||||
set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
|
||||
endif()
|
||||
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
|
||||
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||
endif()
|
||||
|
||||
if(SDL_STATIC)
|
||||
@@ -1442,12 +1493,6 @@ if(SDL_STATIC)
|
||||
endif()
|
||||
|
||||
##### Installation targets #####
|
||||
|
||||
if(MEGA)
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
||||
install(TARGETS ${_INSTALL_LIBS}
|
||||
LIBRARY DESTINATION "lib${LIB_SUFFIX}"
|
||||
ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
|
||||
|
||||
@@ -12,13 +12,13 @@ CFLAGS = -Wall -fPIC -I./include -I$(WIZSDK)/include -DWIZ_GLES_LITE
|
||||
TARGET_STATIC = libSDL13.a
|
||||
TARGET_SHARED = libSDL13.so
|
||||
|
||||
SOURCES = ./src/*.c ./src/audio/*.c ./src/cdrom/*.c ./src/cpuinfo/*.c ./src/events/*.c \
|
||||
SOURCES = ./src/*.c ./src/audio/*.c ./src/cpuinfo/*.c ./src/events/*.c \
|
||||
./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \
|
||||
./src/joystick/*.c ./src/haptic/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \
|
||||
./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c \
|
||||
./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \
|
||||
./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \
|
||||
./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c ./src/cdrom/dummy/*.c \
|
||||
./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c \
|
||||
./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<package >
|
||||
<metadata>
|
||||
<id>SDL2-WinRT</id>
|
||||
<version>2.0.4-Unofficial</version>
|
||||
<authors>Sam Lantinga</authors>
|
||||
<owners>David Ludwig</owners>
|
||||
<licenseUrl>http://libsdl.org/license.php</licenseUrl>
|
||||
<projectUrl>http://libsdl.org</projectUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>Unofficial pre-release of LibSDL2, built for WinRT platforms</description>
|
||||
<copyright>Copyright 2015</copyright>
|
||||
<tags>SDL2 SDL LibSDL OpenGL C C++ nativepackage</tags>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="lib\**\*.dll" target="bin"/>
|
||||
<file src="lib\**\*.lib" target="bin"/>
|
||||
<file src="lib\**\*.pdb" target="bin"/>
|
||||
<file src="..\include\**\*.*" target="include"/>
|
||||
<file src="..\src\**\*.*" target="src"/>
|
||||
<file src="SDL2-WinRT.targets" target="build\native"/>
|
||||
</files>
|
||||
</package>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<LibSDL2-DeviceType Condition="'$(TargetPlatformIdentifier)' == 'Windows' and '$(TargetPlatformVersion)' == '8.0'">WinRT80</LibSDL2-DeviceType>
|
||||
<LibSDL2-DeviceType Condition="'$(TargetPlatformIdentifier)' == 'Windows' and '$(TargetPlatformVersion)' == '8.1'">WinRT81</LibSDL2-DeviceType>
|
||||
<LibSDL2-DeviceType Condition="'$(TargetPlatformIdentifier)' == 'Windows Phone' and '$(TargetPlatformVersion)' == '8.0'">WinPhone80</LibSDL2-DeviceType>
|
||||
<LibSDL2-DeviceType Condition="'$(TargetPlatformIdentifier)' == 'WindowsPhoneApp' and '$(TargetPlatformVersion)' == '8.1'">WinPhone81</LibSDL2-DeviceType>
|
||||
<LibSDL2-DeviceType Condition="'$(TargetPlatformIdentifier)' == 'UAP'">UWP</LibSDL2-DeviceType>
|
||||
|
||||
<LibSDL2-BinPath>$(MSBuildThisFileDirectory)..\..\bin\$(LibSDL2-DeviceType)\$(Platform)</LibSDL2-BinPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="LibSDL2-DeviceType-Check" BeforeTargets="ResolveAssemblyReferences">
|
||||
<Error Condition="'$(LibSDL2-DeviceType)' == ''" Text="Unable to determine which version of Windows is being built-for" />
|
||||
</Target>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(LibSDL2-BinPath);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<ItemGroup Label="LibSDL2">
|
||||
<PackagingOutputs Include="$(LibSDL2-BinPath)\SDL2.dll">
|
||||
<OutputGroup>LibSDL2Binaries</OutputGroup>
|
||||
<ProjectName>$(ProjectName)</ProjectName>
|
||||
<TargetPath>%(Filename)%(Extension)</TargetPath>
|
||||
</PackagingOutputs>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
<package >
|
||||
<metadata>
|
||||
<id>SDL2main-WinRT-NonXAML</id>
|
||||
<version>2.0.4-Unofficial</version>
|
||||
<authors>Sam Lantinga</authors>
|
||||
<owners>David Ludwig</owners>
|
||||
<licenseUrl>http://libsdl.org/license.php</licenseUrl>
|
||||
<projectUrl>http://libsdl.org</projectUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>WinMain() function for SDL2 + WinRT + CoreWindow (non-XAML) apps</description>
|
||||
<copyright>Copyright 2015</copyright>
|
||||
<tags>SDL2 SDL LibSDL OpenGL C C++ nativepackage</tags>
|
||||
<dependencies>
|
||||
<dependency id="SDL2-WinRT" version="2.0.4"/>
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\src\main\winrt\SDL_winrt_main_NonXAML.cpp" target="src\main\winrt"/>
|
||||
<file src="SDL2main-WinRT-NonXAML.targets" target="build\native"/>
|
||||
</files>
|
||||
</package>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<ItemGroup Label="LibSDL2">
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\..\src\main\winrt\SDL_winrt_main_NonXAML.cpp">
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
@@ -38,6 +38,8 @@
|
||||
# "ARM", or "x64" (for 64-bit x86).
|
||||
#
|
||||
|
||||
# Base version of SDL, used for packaging purposes
|
||||
$SDLVersion = "2.0.4"
|
||||
|
||||
# Gets the .bat file that sets up an MSBuild environment, given one of
|
||||
# Visual Studio's, "PlatformToolset"s.
|
||||
@@ -165,7 +167,7 @@ function Build-SDL-WinRT-Variant
|
||||
$VSProjectName = Get-VS-ProjectName $VSProjectPath
|
||||
|
||||
# Where to place output binaries (.dll, .lib, and .pdb files):
|
||||
$OutDir = "$PSScriptRoot\..\VisualC-WinRT\lib\$PlatformToolset\$Platform"
|
||||
$OutDir = "$PSScriptRoot\..\VisualC-WinRT\lib\$(Get-SDL-WinRT-Variant-Name $PlatformToolset)\$Platform"
|
||||
|
||||
# Where to place intermediate build files:
|
||||
$IntermediateDir = "$PSScriptRoot\..\VisualC-WinRT\obj\$SDLProjectName-$(Get-SDL-WinRT-Variant-Name $PlatformToolset)\$Platform"
|
||||
@@ -206,35 +208,87 @@ function Build-SDL-WinRT-Variant
|
||||
#
|
||||
# Build each variant, with corresponding .dll, .lib, and .pdb files:
|
||||
#
|
||||
$DidAnyFail = $false
|
||||
$DidAnyDLLBuildFail = $false
|
||||
$DidAnyNugetBuildFail = $false
|
||||
|
||||
# Build for Windows Phone 8.0, via VC++ 2012:
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "ARM")) { $DidAnyFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "Win32")) { $DidAnyFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "ARM")) { $DidAnyDLLBuildFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "Win32")) { $DidAnyDLLBuildFail = $true }
|
||||
|
||||
# Build for Windows Phone 8.1, via VC++ 2013:
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120_wp81" "ARM")) { $DidAnyFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120_wp81" "Win32")) { $DidAnyFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120_wp81" "ARM")) { $DidAnyDLLBuildFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120_wp81" "Win32")) { $DidAnyDLLBuildFail = $true }
|
||||
|
||||
# Build for Windows 8.0 and Windows RT 8.0, via VC++ 2012:
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "ARM")) { $DidAnyFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "Win32")) { $DidAnyFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "x64")) { $DidAnyFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "ARM")) { $DidAnyDLLBuildFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "Win32")) { $DidAnyDLLBuildFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "x64")) { $DidAnyDLLBuildFail = $true }
|
||||
|
||||
# Build for Windows 8.1 and Windows RT 8.1, via VC++ 2013:
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "ARM")) { $DidAnyFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "Win32")) { $DidAnyFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "x64")) { $DidAnyFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "ARM")) { $DidAnyDLLBuildFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "Win32")) { $DidAnyDLLBuildFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "x64")) { $DidAnyDLLBuildFail = $true }
|
||||
|
||||
# Build for Windows 10, via VC++ 2015
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v140" "ARM")) { $DidAnyFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v140" "Win32")) { $DidAnyFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v140" "x64")) { $DidAnyFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v140" "ARM")) { $DidAnyDLLBuildFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v140" "Win32")) { $DidAnyDLLBuildFail = $true }
|
||||
if ( ! (Build-SDL-WinRT-Variant "SDL" "v140" "x64")) { $DidAnyDLLBuildFail = $true }
|
||||
|
||||
# Build NuGet packages, if possible
|
||||
if ($DidAnyDLLBuildFail -eq $true) {
|
||||
Write-Warning -Message "Unable to build all variants. NuGet packages will not be built."
|
||||
$DidAnyNugetBuildFail = $true
|
||||
} else {
|
||||
$NugetPath = (Get-Command -CommandType Application nuget.exe | %{$_.Path}) 2> $null
|
||||
if ("$NugetPath" -eq "") {
|
||||
Write-Warning -Message "Unable to find nuget.exe. NuGet packages will not be built."
|
||||
$DidAnyNugetBuildFail = $true
|
||||
} else {
|
||||
Write-Host -ForegroundColor Cyan "Building SDL2 NuGet packages..."
|
||||
Write-Host -ForegroundColor Cyan "... via NuGet install: $NugetPath"
|
||||
$NugetOutputDir = "$PSScriptRoot\..\VisualC-WinRT\lib\nuget"
|
||||
Write-Host -ForegroundColor Cyan "... output directory: $NugetOutputDir"
|
||||
$SDLHGRevision = $($(hg log -l 1 --repository "$PSScriptRoot\.." | select-string "changeset") -Replace "changeset:\W*(\d+).*",'$1') 2>$null
|
||||
Write-Host -ForegroundColor Cyan "... HG Revision: $SDLHGRevision"
|
||||
|
||||
# Base options to nuget.exe
|
||||
$NugetOptions = @("pack", "PACKAGE_NAME_WILL_GO_HERE", "-Output", "$NugetOutputDir")
|
||||
|
||||
# Try attaching hg revision to NuGet package:
|
||||
$NugetOptions += "-Version"
|
||||
if ("$SDLHGRevision" -eq "") {
|
||||
Write-Warning -Message "Unable to find the Mercurial revision (maybe hg.exe can't be found?). NuGet packages will not have this attached to their name."
|
||||
$NugetOptions += "$SDLVersion-Unofficial"
|
||||
} else {
|
||||
$NugetOptions += "$SDLVersion.$SDLHGRevision-Unofficial"
|
||||
}
|
||||
|
||||
# Create NuGet output dir, if not yet created:
|
||||
if ($(Test-Path "$NugetOutputDir") -eq $false) {
|
||||
New-Item "$NugetOutputDir" -type directory
|
||||
}
|
||||
|
||||
# Package SDL2:
|
||||
$NugetOptions[1] = "$PSScriptRoot\..\VisualC-WinRT\SDL2-WinRT.nuspec"
|
||||
&"$NugetPath" $NugetOptions -Symbols
|
||||
if ( ! $? ) { $DidAnyNugetBuildFail = $true }
|
||||
|
||||
# Package SDL2main:
|
||||
$NugetOptions[1] = "$PSScriptRoot\..\VisualC-WinRT\SDL2main-WinRT-NonXAML.nuspec"
|
||||
&"$NugetPath" $NugetOptions
|
||||
if ( ! $? ) { $DidAnyNugetBuildFail = $true }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Let the script's caller know whether or not any errors occurred.
|
||||
# Exit codes compatible with Buildbot are used (1 for error, 0 for success).
|
||||
if ($DidAnyFail -eq $true) {
|
||||
if ($DidAnyDLLBuildFail -eq $true) {
|
||||
Write-Error -Message "Unable to build all known variants of SDL2 for WinRT"
|
||||
exit 1
|
||||
} elseif ($DidAnyNugetBuildFail -eq $true) {
|
||||
Write-Warning -Message "Unable to build NuGet packages"
|
||||
exit 0 # Should NuGet package build failure lead to a non-failing result code instead?
|
||||
} else {
|
||||
exit 0
|
||||
}
|
||||
|
||||
+15
@@ -22938,6 +22938,21 @@ case "$host" in
|
||||
*-*-bsdi*) ARCH=bsdi ;;
|
||||
*-*-freebsd*) ARCH=freebsd ;;
|
||||
*-*-dragonfly*) ARCH=freebsd ;;
|
||||
*-raspberry-netbsd*)
|
||||
# Raspberry Pi
|
||||
ARCH=netbsd
|
||||
RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
|
||||
CFLAGS="$CFLAGS $RPI_CFLAGS"
|
||||
SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host -ldl"
|
||||
|
||||
if test x$enable_video = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
|
||||
$as_echo "#define SDL_VIDEO_DRIVER_RPI 1" >>confdefs.h
|
||||
SUMMARY_video="${SUMMARY_video} raspberry"
|
||||
fi
|
||||
;;
|
||||
*-*-netbsd*) ARCH=netbsd ;;
|
||||
*-*-openbsd*) ARCH=openbsd ;;
|
||||
*-*-sysv5*) ARCH=sysv5 ;;
|
||||
|
||||
@@ -2846,6 +2846,21 @@ case "$host" in
|
||||
*-*-bsdi*) ARCH=bsdi ;;
|
||||
*-*-freebsd*) ARCH=freebsd ;;
|
||||
*-*-dragonfly*) ARCH=freebsd ;;
|
||||
*-raspberry-netbsd*)
|
||||
# Raspberry Pi
|
||||
ARCH=netbsd
|
||||
RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
|
||||
CFLAGS="$CFLAGS $RPI_CFLAGS"
|
||||
SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host -ldl"
|
||||
|
||||
if test x$enable_video = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
|
||||
$as_echo "#define SDL_VIDEO_DRIVER_RPI 1" >>confdefs.h
|
||||
SUMMARY_video="${SUMMARY_video} raspberry"
|
||||
fi
|
||||
;;
|
||||
*-*-netbsd*) ARCH=netbsd ;;
|
||||
*-*-openbsd*) ARCH=openbsd ;;
|
||||
*-*-sysv5*) ARCH=sysv5 ;;
|
||||
|
||||
Regular → Executable
@@ -197,6 +197,7 @@
|
||||
#cmakedefine SDL_FILESYSTEM_DISABLED @SDL_FILESYSTEM_DISABLED@
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ANDROID @SDL_AUDIO_DRIVER_ANDROID@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA_DYNAMIC @SDL_AUDIO_DRIVER_ALSA_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ARTS @SDL_AUDIO_DRIVER_ARTS@
|
||||
@@ -230,6 +231,7 @@
|
||||
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
|
||||
#cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@
|
||||
#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@
|
||||
#cmakedefine SDL_JOYSTICK_ANDROID @SDL_JOYSTICK_ANDROID@
|
||||
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
|
||||
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
|
||||
#cmakedefine SDL_JOYSTICK_XINPUT @SDL_JOYSTICK_XINPUT@
|
||||
@@ -268,6 +270,7 @@
|
||||
#cmakedefine SDL_TIMER_WINCE @SDL_TIMER_WINCE@
|
||||
|
||||
/* Enable various video drivers */
|
||||
#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@
|
||||
@@ -331,6 +334,7 @@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_OSMESA_DYNAMIC @SDL_VIDEO_OPENGL_OSMESA_DYNAMIC@
|
||||
|
||||
/* Enable system power support */
|
||||
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
|
||||
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
|
||||
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
|
||||
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
|
||||
@@ -339,6 +343,7 @@
|
||||
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
|
||||
|
||||
/* Enable system filesystem support */
|
||||
#cmakedefine SDL_FILESYSTEM_ANDROID @SDL_FILESYSTEM_ANDROID@
|
||||
#cmakedefine SDL_FILESYSTEM_HAIKU @SDL_FILESYSTEM_HAIKU@
|
||||
#cmakedefine SDL_FILESYSTEM_COCOA @SDL_FILESYSTEM_COCOA@
|
||||
#cmakedefine SDL_FILESYSTEM_DUMMY @SDL_FILESYSTEM_DUMMY@
|
||||
|
||||
@@ -97,7 +97,6 @@
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_POW 1
|
||||
|
||||
#define SDL_CDROM_DISABLED 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user