mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 23:12:24 +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
|
||||
|
||||
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:
|
||||
- Win32
|
||||
- x64
|
||||
|
||||
configuration:
|
||||
- Debug
|
||||
- Release
|
||||
|
||||
before_build:
|
||||
build_script:
|
||||
- md build
|
||||
- cd build
|
||||
- if "%PLATFORM%"=="Win32" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015
|
||||
- if "%PLATFORM%"=="x64" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 Win64
|
||||
- cmake -G "%CMAKE_GENERATOR_NAME%" -T "v140_xp"
|
||||
-DCMAKE_BUILD_TYPE="%CONFIGURATION%"
|
||||
..
|
||||
|
||||
build:
|
||||
project: build\GZDoom.sln
|
||||
parallel: true
|
||||
verbosity: minimal
|
||||
- cmake -G "%GENERATOR%" -T "%TOOLSET%" ..
|
||||
- cmake --build . --config "%CONFIGURATION%"
|
||||
|
||||
after_build:
|
||||
- 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.
|
||||
# for modern Windows SDKs the DirectX headers should be available by default.
|
||||
set( DX_dinput8_LIBRARY dinput8 )
|
||||
set( DX_dxguid_LIBRARY dxguid )
|
||||
else()
|
||||
|
||||
find_path( D3D_INCLUDE_DIR d3d9.h
|
||||
|
@ -97,9 +96,6 @@ if( WIN32 )
|
|||
find_library( DX_dinput8_LIBRARY dinput8
|
||||
PATHS ENV DXSDK_DIR
|
||||
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,
|
||||
# CMake cannot find these libraries via find_library.
|
||||
|
@ -108,11 +104,6 @@ if( WIN32 )
|
|||
set( DX_dinput8_LIBRARY dinput8 )
|
||||
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()
|
||||
|
||||
set( ZDOOM_LIBS
|
||||
|
@ -133,9 +124,6 @@ if( WIN32 )
|
|||
set( ZDOOM_LIBS ${ZDOOM_LIBS} DelayImp )
|
||||
endif()
|
||||
|
||||
if( DX_dxguid_LIBRARY )
|
||||
list( APPEND ZDOOM_LIBS "${DX_dxguid_LIBRARY}" )
|
||||
endif()
|
||||
else()
|
||||
if( APPLE )
|
||||
set( NO_GTK ON )
|
||||
|
|
|
@ -477,16 +477,45 @@ const char *myasctime ()
|
|||
void DoCreatePath(const char *fn)
|
||||
{
|
||||
char drive[_MAX_DRIVE];
|
||||
char path[PATH_MAX];
|
||||
char p[PATH_MAX];
|
||||
int i;
|
||||
char dir[_MAX_DIR];
|
||||
_splitpath_s(fn, drive, sizeof drive, dir, sizeof dir, nullptr, 0, nullptr, 0);
|
||||
|
||||
_splitpath(fn,drive,path,NULL,NULL);
|
||||
_makepath(p,drive,path,NULL,NULL);
|
||||
i=(int)strlen(p);
|
||||
if (p[i-1]=='/' || p[i-1]=='\\') p[i-1]=0;
|
||||
if (*path) DoCreatePath(p);
|
||||
_mkdir(p);
|
||||
if ('\0' == *dir)
|
||||
{
|
||||
// Root/current/parent directory always exists
|
||||
return;
|
||||
}
|
||||
|
||||
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)
|
||||
|
|
|
@ -284,7 +284,9 @@ void Win32Video::InitDDraw ()
|
|||
if (FAILED(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))
|
||||
{
|
||||
ddraw1->Release ();
|
||||
|
|
Loading…
Reference in a new issue