mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +00:00
This commit is contained in:
commit
04e6551bbd
4 changed files with 66 additions and 42 deletions
|
@ -6,29 +6,34 @@ branches:
|
||||||
|
|
||||||
clone_depth: 10
|
clone_depth: 10
|
||||||
|
|
||||||
os: Visual Studio 2015
|
environment:
|
||||||
|
matrix:
|
||||||
|
- GENERATOR: "Visual Studio 14 2015"
|
||||||
|
CONFIGURATION: Release
|
||||||
|
TOOLSET: v140_xp
|
||||||
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
|
||||||
|
- GENERATOR: "Visual Studio 14 2015 Win64"
|
||||||
|
CONFIGURATION: Release
|
||||||
|
TOOLSET: v140_xp
|
||||||
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
|
||||||
|
- GENERATOR: "Visual Studio 15 2017"
|
||||||
|
CONFIGURATION: Release
|
||||||
|
TOOLSET: v141_xp
|
||||||
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
||||||
|
- GENERATOR: "Visual Studio 15 2017 Win64"
|
||||||
|
CONFIGURATION: Release
|
||||||
|
TOOLSET: v141_xp
|
||||||
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
|
||||||
|
- GENERATOR: "Visual Studio 14 2015 Win64"
|
||||||
|
CONFIGURATION: Debug
|
||||||
|
TOOLSET: v140
|
||||||
|
APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2015"
|
||||||
|
|
||||||
platform:
|
build_script:
|
||||||
- Win32
|
|
||||||
- x64
|
|
||||||
|
|
||||||
configuration:
|
|
||||||
- Debug
|
|
||||||
- Release
|
|
||||||
|
|
||||||
before_build:
|
|
||||||
- md build
|
- md build
|
||||||
- cd build
|
- cd build
|
||||||
- if "%PLATFORM%"=="Win32" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015
|
- cmake -G "%GENERATOR%" -T "%TOOLSET%" ..
|
||||||
- if "%PLATFORM%"=="x64" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 Win64
|
- cmake --build . --config "%CONFIGURATION%"
|
||||||
- cmake -G "%CMAKE_GENERATOR_NAME%" -T "v140_xp"
|
|
||||||
-DCMAKE_BUILD_TYPE="%CONFIGURATION%"
|
|
||||||
..
|
|
||||||
|
|
||||||
build:
|
|
||||||
project: build\GZDoom.sln
|
|
||||||
parallel: true
|
|
||||||
verbosity: minimal
|
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
- set OUTPUT_DIR=%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%\
|
- set OUTPUT_DIR=%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%\
|
||||||
|
|
|
@ -60,7 +60,6 @@ if( WIN32 )
|
||||||
( MSVC15 AND NOT CMAKE_GENERATOR_TOOLSET STREQUAL "v141_xp" ) ) # For VS 2017.
|
( MSVC15 AND NOT CMAKE_GENERATOR_TOOLSET STREQUAL "v141_xp" ) ) # For VS 2017.
|
||||||
# for modern Windows SDKs the DirectX headers should be available by default.
|
# for modern Windows SDKs the DirectX headers should be available by default.
|
||||||
set( DX_dinput8_LIBRARY dinput8 )
|
set( DX_dinput8_LIBRARY dinput8 )
|
||||||
set( DX_dxguid_LIBRARY dxguid )
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
find_path( D3D_INCLUDE_DIR d3d9.h
|
find_path( D3D_INCLUDE_DIR d3d9.h
|
||||||
|
@ -97,9 +96,6 @@ if( WIN32 )
|
||||||
find_library( DX_dinput8_LIBRARY dinput8
|
find_library( DX_dinput8_LIBRARY dinput8
|
||||||
PATHS ENV DXSDK_DIR
|
PATHS ENV DXSDK_DIR
|
||||||
PATH_SUFFIXES Lib Lib/${XBITS} )
|
PATH_SUFFIXES Lib Lib/${XBITS} )
|
||||||
find_library( DX_dxguid_LIBRARY dxguid
|
|
||||||
PATHS ENV DXSDK_DIR
|
|
||||||
PATH_SUFFIXES Lib Lib/${XBITS} )
|
|
||||||
|
|
||||||
# Modern versions of the Windows SDK include dinput8.lib. Unfortunately,
|
# Modern versions of the Windows SDK include dinput8.lib. Unfortunately,
|
||||||
# CMake cannot find these libraries via find_library.
|
# CMake cannot find these libraries via find_library.
|
||||||
|
@ -108,11 +104,6 @@ if( WIN32 )
|
||||||
set( DX_dinput8_LIBRARY dinput8 )
|
set( DX_dinput8_LIBRARY dinput8 )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Modern versions of the Windows SDK do NOT include dxguid.lib. Its contents
|
|
||||||
# were moved to dinput8.lib.
|
|
||||||
if( NOT DX_dxguid_LIBRARY )
|
|
||||||
message( STATUS "Could not find dxguid.lib. Build may fail on old Windows SDKs.")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set( ZDOOM_LIBS
|
set( ZDOOM_LIBS
|
||||||
|
@ -133,9 +124,6 @@ if( WIN32 )
|
||||||
set( ZDOOM_LIBS ${ZDOOM_LIBS} DelayImp )
|
set( ZDOOM_LIBS ${ZDOOM_LIBS} DelayImp )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( DX_dxguid_LIBRARY )
|
|
||||||
list( APPEND ZDOOM_LIBS "${DX_dxguid_LIBRARY}" )
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
if( APPLE )
|
if( APPLE )
|
||||||
set( NO_GTK ON )
|
set( NO_GTK ON )
|
||||||
|
|
|
@ -477,16 +477,45 @@ const char *myasctime ()
|
||||||
void DoCreatePath(const char *fn)
|
void DoCreatePath(const char *fn)
|
||||||
{
|
{
|
||||||
char drive[_MAX_DRIVE];
|
char drive[_MAX_DRIVE];
|
||||||
char path[PATH_MAX];
|
char dir[_MAX_DIR];
|
||||||
char p[PATH_MAX];
|
_splitpath_s(fn, drive, sizeof drive, dir, sizeof dir, nullptr, 0, nullptr, 0);
|
||||||
int i;
|
|
||||||
|
|
||||||
_splitpath(fn,drive,path,NULL,NULL);
|
if ('\0' == *dir)
|
||||||
_makepath(p,drive,path,NULL,NULL);
|
{
|
||||||
i=(int)strlen(p);
|
// Root/current/parent directory always exists
|
||||||
if (p[i-1]=='/' || p[i-1]=='\\') p[i-1]=0;
|
return;
|
||||||
if (*path) DoCreatePath(p);
|
}
|
||||||
_mkdir(p);
|
|
||||||
|
char path[PATH_MAX];
|
||||||
|
_makepath_s(path, sizeof path, drive, dir, nullptr, nullptr);
|
||||||
|
|
||||||
|
if ('\0' == *path)
|
||||||
|
{
|
||||||
|
// No need to process empty relative path
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove trailing path separator(s)
|
||||||
|
for (size_t i = strlen(path); 0 != i; --i)
|
||||||
|
{
|
||||||
|
char& lastchar = path[i - 1];
|
||||||
|
|
||||||
|
if ('/' == lastchar || '\\' == lastchar)
|
||||||
|
{
|
||||||
|
lastchar = '\0';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create all directories for given path
|
||||||
|
if ('\0' != *path)
|
||||||
|
{
|
||||||
|
DoCreatePath(path);
|
||||||
|
_mkdir(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreatePath(const char *fn)
|
void CreatePath(const char *fn)
|
||||||
|
|
|
@ -284,7 +284,9 @@ void Win32Video::InitDDraw ()
|
||||||
if (FAILED(dderr))
|
if (FAILED(dderr))
|
||||||
I_FatalError ("Could not create DirectDraw object: %08lx", dderr);
|
I_FatalError ("Could not create DirectDraw object: %08lx", dderr);
|
||||||
|
|
||||||
dderr = ddraw1->QueryInterface (IID_IDirectDraw2, (LPVOID*)&DDraw);
|
static const GUID IDIRECTDRAW2_GUID = { 0xB3A6F3E0, 0x2B43, 0x11CF, 0xA2, 0xDE, 0x00, 0xAA, 0x00, 0xB9, 0x33, 0x56 };
|
||||||
|
|
||||||
|
dderr = ddraw1->QueryInterface (IDIRECTDRAW2_GUID, (LPVOID*)&DDraw);
|
||||||
if (FAILED(dderr))
|
if (FAILED(dderr))
|
||||||
{
|
{
|
||||||
ddraw1->Release ();
|
ddraw1->Release ();
|
||||||
|
|
Loading…
Reference in a new issue