Skip to content

Commit 45c74c5

Browse files
authored
Merge pull request #844 from mickem/DebugSymbols
Debug symbols
2 parents dc1814c + 820b8d5 commit 45c74c5

File tree

65 files changed

+88
-236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+88
-236
lines changed

.github/workflows/build-windows.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ jobs:
186186
- name: Build nsclient
187187
working-directory: tmp/nscp
188188
run: |
189-
msbuild NSCP.sln /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }}
189+
msbuild NSCP.sln /p:Configuration=RelWithDebInfo /p:Platform=${{ steps.setup.outputs.platform }}
190190
191191
- name: Run tests
192192
working-directory: tmp/nscp
@@ -201,14 +201,25 @@ jobs:
201201
echo Running cpack
202202
cpack
203203
204+
- name: Collect debug symbols
205+
shell: bash
206+
working-directory: tmp/nscp
207+
run: |
208+
mkdir symbols
209+
cd symbols
210+
find ../ -name '*-stripped.pdb' -and -not -ipath '*symbols*' -exec cp {} . \;
211+
# remove the -symbols suffix
212+
for f in *-stripped.pdb; do mv -- "$f" "${f%-stripped.pdb}.pdb"; done
213+
7z a -tzip -r ../NSCP-${{ steps.version.outputs.version }}-${{ steps.setup.outputs.platform }}-symbols.zip .
214+
204215
- uses: actions/upload-artifact@v3
205216
with:
206217
name: NSCP-${{ steps.version.outputs.version }}.zip
207218
path: |
208219
tmp/nscp/NSCP-${{ steps.version.outputs.version }}-${{ steps.setup.outputs.platform }}-docs.zip
209220
tmp/nscp/NSCP-${{ steps.version.outputs.version }}-${{ steps.setup.outputs.platform }}.zip
210221
tmp/nscp/installers/installer-NSCP/NSCP-${{ steps.version.outputs.version }}-${{ steps.setup.outputs.platform }}.msi
211-
tmp/nscp/installers/installer-secondary/Seconday_NSCP-${{ steps.version.outputs.version }}-${{ steps.setup.outputs.platform }}.msi
222+
tmp/nscp/NSCP-${{ steps.version.outputs.version }}-${{ steps.setup.outputs.platform }}-symbols.zip
212223
if-no-files-found: error
213224

214225

.github/workflows/release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,4 @@ jobs:
4747
NSCP-${{ steps.version.outputs.version }}-Win32.zip
4848
installers/installer-NSCP/NSCP-${{ steps.version.outputs.version }}-x64.msi
4949
installers/installer-NSCP/NSCP-${{ steps.version.outputs.version }}-Win32.msi
50-
installers/installer-secondary/Seconday_NSCP-${{ steps.version.outputs.version }}-x64.msi
51-
installers/installer-secondary/Seconday_NSCP-${{ steps.version.outputs.version }}-Win32.msi
5250

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,7 @@ nsclient.log
3737

3838
.cmake
3939

40-
cmake-build
40+
cmake-build
41+
42+
43+
build.cmake

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ IF(COMMAND CMAKE_POLICY)
77
CMAKE_POLICY(SET CMP0011 NEW)
88
ENDIF(COMMAND CMAKE_POLICY)
99

10+
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>")
11+
1012
#############################################################################
1113
#
1214
# Setup cmake enviornment and include custom config overrides

build/cmake/functions.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ ELSE()
188188
ENDIF()
189189
ENDMACRO()
190190

191+
192+
MACRO(NSCP_DEBUG_SYMBOLS TARGET_NAME)
193+
set_target_properties(${TARGET_NAME} PROPERTIES LINK_FLAGS "/PDBSTRIPPED:${TARGET_NAME}-stripped.pdb" )
194+
ENDMACRO()
195+
191196
MACRO(NSCP_INSTALL_MODULE _TARGET)
192197
IF(WIN32)
193198
SET(_FOLDER "${MODULE_SUBFOLDER}")
@@ -249,7 +254,8 @@ ENDMACRO()
249254

250255
MACRO(NSCP_MAKE_EXE _TARGET _SRCS _FOLDER)
251256
ADD_EXECUTABLE(${_TARGET} ${_SRCS})
252-
IF(WIN32)
257+
NSCP_DEBUG_SYMBOLS(${_TARGET})
258+
IF(WIN32)
253259
INSTALL(TARGETS ${_TARGET}
254260
RUNTIME DESTINATION .)
255261
sign_file(${_TARGET} "${BUILD_TARGET_ROOT_PATH}/${_TARGET}.exe")

build/cmake/wix.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ set(PF86 "PROGRAMFILES(X86)")
3030
"$ENV{${PF86}}/WiX Toolset v3.11"
3131
)
3232

33-
MESSAGE(STATUS "--> ${WIX_POSSIBLE_ROOT_DIRS}")
3433
#
3534
# select exactly ONE WIX base directory/tree
3635
# to avoid mixing different version headers and libs
@@ -250,6 +249,7 @@ set(PF86 "PROGRAMFILES(X86)")
250249
"$ENV{VCInstallDir}/Redist/MSVC/v142/MergeModules"
251250
${WIX_MERGE_MODULE_PATH}
252251
"$ENV{ProgramFiles}/Common Files/Merge Modules"
252+
"c:/Program Files/Microsoft Visual Studio/2022/Community/VC/Redist/MSVC/v143/MergeModules"
253253
${WIX_POSSIBLE_ROOT_DIRS}
254254
)
255255
SET(${_VAR} ${${_VAR}} PARENT_SCOPE)

installers/common/op5_config.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
33
<Fragment>
4-
<DirectoryRef Id="TARGETDIR">
4+
<DirectoryRef Id="INSTALLLOCATION">
55
<Directory Id="dir388ED20BC3649C8154009E48B7E142E3" Name="config" />
66
</DirectoryRef>
77
</Fragment>

installers/common/op5_scripts.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
33
<Fragment>
4-
<DirectoryRef Id="TARGETDIR">
4+
<DirectoryRef Id="INSTALLLOCATION">
55
<Directory Id="dirC722990CDCB916A6A44099040A99483Aa" Name="scripts" />
66
</DirectoryRef>
77
</Fragment>

0 commit comments

Comments
 (0)