Skip to content

Commit 91ce9e2

Browse files
committed
Merge from master (peg SDK=10.0.19041.0)
2 parents 0b3d2df + ebe460e commit 91ce9e2

30 files changed

+5046
-4948
lines changed

.github/workflows/build-and-test.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ on: push
55
jobs:
66
build-cse:
77
name: Build CSE executable
8-
runs-on: windows-latest
8+
runs-on: windows-2022
99
defaults:
1010
run:
1111
shell: bash
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v1
15+
- name: Install recent SDK
16+
uses: GuillaumeFalourd/setup-windows10-sdk-action@v1
17+
with:
18+
sdk-version: 19041
1519
- name: Get branch name
1620
uses: tj-actions/branch-names@v5
1721
id: branch-name
@@ -38,7 +42,7 @@ jobs:
3842
test-cse:
3943
name: Test CSE
4044
needs: build-cse
41-
runs-on: windows-latest
45+
runs-on: windows-2022
4246
steps:
4347
- name: Checkout
4448
uses: actions/checkout@v1
@@ -52,13 +56,26 @@ jobs:
5256
with:
5357
name: CSE.exe
5458
path: msvc
59+
# - name: Download Mesa3D on Windows
60+
# if: runner.os == 'Windows'
61+
# shell: cmd
62+
# run: curl.exe -L --output mesa.7z --url https://github.com/pal1000/mesa-dist-win/releases/download/20.3.2/mesa3d-20.3.2-release-msvc.7z
63+
# working-directory: msvc
64+
# - name: Install Mesa3D on Windows
65+
# if: runner.os == 'Windows'
66+
# shell: cmd
67+
# run: |
68+
# "C:\Program Files\7-Zip\7z.exe" x mesa.7z
69+
# mklink opengl32.dll "x64\opengl32.dll"
70+
# mklink libglapi.dll "x64\libglapi.dll"
71+
# working-directory: msvc
5572
- name: Test
56-
run: ctest -C Release --output-on-failure -E shadetest # CI can't do GPU calcs at this time
73+
run: ctest -C Release --output-on-failure -E shadetest # CI can't do GPU calcs at this time (the steps above get us close, but throws an exception on destruction)
5774
working-directory: msvc/build
5875
build-doc:
5976
name: Build CSE documentation
6077
needs: build-cse
61-
runs-on: windows-latest
78+
runs-on: windows-2022
6279
steps:
6380
- name: Checkout
6481
uses: actions/checkout@v1

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ on:
88
jobs:
99
release-cse:
1010
name: Deploy CSE release
11-
runs-on: windows-latest
11+
runs-on: windows-2022
1212
defaults:
1313
run:
1414
shell: bash
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v1
18+
- name: Install recent SDK
19+
uses: GuillaumeFalourd/setup-windows10-sdk-action@v1
20+
with:
21+
sdk-version: 19041
1822
- name: Get branch name
1923
uses: tj-actions/branch-names@v5
2024
id: branch-name

cmake/configure.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ message("Making build directory: ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build")
22
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc)
33
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build)
44
message("Generating project files...")
5-
execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR} -T v142 -A Win32 -D CMAKE_SYSTEM_VERSION=10.0.17763.0
5+
execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR} -T v142 -A Win32 -DCMAKE_SYSTEM_VERSION=10.0.19041.0
66
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build
77
RESULT_VARIABLE success
88
)

src/CMakeLists.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ set(defs
1010
CNRECS.DEF
1111
)
1212

13+
# User Option
14+
option(USE_XMODULE "Add XMODULE to the build." OFF)
15+
1316
macro(c_preprocess file)
1417
add_custom_command(
1518
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${file}.i"
@@ -129,7 +132,6 @@ set(source
129132
VRPAK.CPP
130133
WFPAK.CPP
131134
XIOPAK.CPP
132-
XMODULE.CPP
133135
YACAM.CPP
134136
)
135137

@@ -196,10 +198,14 @@ set(headers
196198
VRPAK.H
197199
WFPAK.H
198200
XIOPAK.H
199-
XMODULE.h
200201
YACAM.H
201202
)
202203

204+
if(USE_XMODULE) # Runtime Share Library interface - Not used since Version 0.899. (Windows only)
205+
list(APPEND source XMODULE.CPP)
206+
list(APPEND headers XMODULE.H)
207+
endif()
208+
203209
include_directories(
204210
"${CMAKE_SOURCE_DIR}/src"
205211
"${CMAKE_SOURCE_DIR}/vendor"
@@ -234,6 +240,10 @@ addMSVCPrecompiledHeader("cnglob.h" precomp source)
234240
add_executable(CSE ${source} ${rcFile} ${headers})
235241
target_compile_features(CSE PUBLIC cxx_std_17)
236242

243+
if(USE_XMODULE)
244+
target_compile_definitions(CSE PRIVATE SUPPURT_XMODULE)
245+
endif()
246+
237247
set(libs
238248
glad
239249
penumbra

src/ashwface.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,22 +1081,28 @@ XASHWAT ASHWAT( // public ASHWAT object
10811081
#endif
10821082
//=============================================================================
10831083
XASHWAT::XASHWAT( const char* moduleName) // c'tor
1084+
#if defined(SUPPORT_XMODULE)
10841085
: XMODULE( moduleName)
1086+
#endif // SUPPORT_XMODULE
10851087
{
1088+
#if defined(SUPPORT_XMODULE)
10861089
xm_ClearPtrs();
1090+
#endif // SUPPORT_XMODULE
10871091
}
10881092
//-----------------------------------------------------------------------------
10891093
XASHWAT::~XASHWAT()
10901094
{
10911095
} // XASHWAT::~XASHWAT
10921096
//-----------------------------------------------------------------------------
1097+
#if defined(SUPPORT_XMODULE)
10931098
/*virtual*/ void XASHWAT::xm_ClearPtrs()
10941099
{
10951100
#if defined( ASHWAT_LINKDLL)
10961101
xw_pAWThermal = NULL;
10971102
xw_pAWCheckFixCFSLayer = NULL;
10981103
#endif
10991104
} // XASHWAT::xm_ClearPtrs
1105+
#endif // SUPPORT_XMODULE
11001106
//-----------------------------------------------------------------------------
11011107
RC XASHWAT::xw_Setup() // general initialization
11021108
// duplicate calls OK

src/ashwface.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,12 @@ class FENAW
292292
#define FCSL( s) s, sizeof( s)
293293
#define FCSET( d, s) strSpacePad( FCSL( d), s)
294294
#define FCGET( s) strTrim( NULL, FCSL( s))
295+
#if defined(SUPPORT_XMODULE)
295296
#include "xmodule.h"
296297
class XASHWAT : public XMODULE
298+
#else
299+
class XASHWAT
300+
#endif // SUPPORT_XMODULE
297301
{
298302
friend class FENAW;
299303
friend struct CFSTY;
@@ -349,7 +353,9 @@ typedef int _stdcall AWRatings( const CFSTY& CFS, double& Urat, double& SHGCrat)
349353
public:
350354
XASHWAT( const char* moduleName);
351355
~XASHWAT();
356+
#if defined(SUPPORT_XMODULE)
352357
virtual void xm_ClearPtrs();
358+
#endif // SUPPORT_XMODULE
353359

354360
RC xw_Setup();
355361
static void MsgCallBackFunc( void* msgContext, AWMSGTY msgTy, const string& msg);

0 commit comments

Comments
 (0)