Skip to content

Commit

Permalink
Merge pull request #844 from mickem/DebugSymbols
Browse files Browse the repository at this point in the history
Debug symbols
  • Loading branch information
mickem authored Dec 9, 2024
2 parents dc1814c + 820b8d5 commit 45c74c5
Show file tree
Hide file tree
Showing 65 changed files with 88 additions and 236 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ jobs:
- name: Build nsclient
working-directory: tmp/nscp
run: |
msbuild NSCP.sln /p:Configuration=Release /p:Platform=${{ steps.setup.outputs.platform }}
msbuild NSCP.sln /p:Configuration=RelWithDebInfo /p:Platform=${{ steps.setup.outputs.platform }}
- name: Run tests
working-directory: tmp/nscp
Expand All @@ -201,14 +201,25 @@ jobs:
echo Running cpack
cpack
- name: Collect debug symbols
shell: bash
working-directory: tmp/nscp
run: |
mkdir symbols
cd symbols
find ../ -name '*-stripped.pdb' -and -not -ipath '*symbols*' -exec cp {} . \;
# remove the -symbols suffix
for f in *-stripped.pdb; do mv -- "$f" "${f%-stripped.pdb}.pdb"; done
7z a -tzip -r ../NSCP-${{ steps.version.outputs.version }}-${{ steps.setup.outputs.platform }}-symbols.zip .
- uses: actions/upload-artifact@v3
with:
name: NSCP-${{ steps.version.outputs.version }}.zip
path: |
tmp/nscp/NSCP-${{ steps.version.outputs.version }}-${{ steps.setup.outputs.platform }}-docs.zip
tmp/nscp/NSCP-${{ steps.version.outputs.version }}-${{ steps.setup.outputs.platform }}.zip
tmp/nscp/installers/installer-NSCP/NSCP-${{ steps.version.outputs.version }}-${{ steps.setup.outputs.platform }}.msi
tmp/nscp/installers/installer-secondary/Seconday_NSCP-${{ steps.version.outputs.version }}-${{ steps.setup.outputs.platform }}.msi
tmp/nscp/NSCP-${{ steps.version.outputs.version }}-${{ steps.setup.outputs.platform }}-symbols.zip
if-no-files-found: error


2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,4 @@ jobs:
NSCP-${{ steps.version.outputs.version }}-Win32.zip
installers/installer-NSCP/NSCP-${{ steps.version.outputs.version }}-x64.msi
installers/installer-NSCP/NSCP-${{ steps.version.outputs.version }}-Win32.msi
installers/installer-secondary/Seconday_NSCP-${{ steps.version.outputs.version }}-x64.msi
installers/installer-secondary/Seconday_NSCP-${{ steps.version.outputs.version }}-Win32.msi
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ nsclient.log

.cmake

cmake-build
cmake-build


build.cmake
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0011 NEW)
ENDIF(COMMAND CMAKE_POLICY)

set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>")

#############################################################################
#
# Setup cmake enviornment and include custom config overrides
Expand Down
8 changes: 7 additions & 1 deletion build/cmake/functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ ELSE()
ENDIF()
ENDMACRO()


MACRO(NSCP_DEBUG_SYMBOLS TARGET_NAME)
set_target_properties(${TARGET_NAME} PROPERTIES LINK_FLAGS "/PDBSTRIPPED:${TARGET_NAME}-stripped.pdb" )
ENDMACRO()

MACRO(NSCP_INSTALL_MODULE _TARGET)
IF(WIN32)
SET(_FOLDER "${MODULE_SUBFOLDER}")
Expand Down Expand Up @@ -249,7 +254,8 @@ ENDMACRO()

MACRO(NSCP_MAKE_EXE _TARGET _SRCS _FOLDER)
ADD_EXECUTABLE(${_TARGET} ${_SRCS})
IF(WIN32)
NSCP_DEBUG_SYMBOLS(${_TARGET})
IF(WIN32)
INSTALL(TARGETS ${_TARGET}
RUNTIME DESTINATION .)
sign_file(${_TARGET} "${BUILD_TARGET_ROOT_PATH}/${_TARGET}.exe")
Expand Down
2 changes: 1 addition & 1 deletion build/cmake/wix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ set(PF86 "PROGRAMFILES(X86)")
"$ENV{${PF86}}/WiX Toolset v3.11"
)

MESSAGE(STATUS "--> ${WIX_POSSIBLE_ROOT_DIRS}")
#
# select exactly ONE WIX base directory/tree
# to avoid mixing different version headers and libs
Expand Down Expand Up @@ -250,6 +249,7 @@ set(PF86 "PROGRAMFILES(X86)")
"$ENV{VCInstallDir}/Redist/MSVC/v142/MergeModules"
${WIX_MERGE_MODULE_PATH}
"$ENV{ProgramFiles}/Common Files/Merge Modules"
"c:/Program Files/Microsoft Visual Studio/2022/Community/VC/Redist/MSVC/v143/MergeModules"
${WIX_POSSIBLE_ROOT_DIRS}
)
SET(${_VAR} ${${_VAR}} PARENT_SCOPE)
Expand Down
2 changes: 1 addition & 1 deletion installers/common/op5_config.wxs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="TARGETDIR">
<DirectoryRef Id="INSTALLLOCATION">
<Directory Id="dir388ED20BC3649C8154009E48B7E142E3" Name="config" />
</DirectoryRef>
</Fragment>
Expand Down
2 changes: 1 addition & 1 deletion installers/common/op5_scripts.wxs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="TARGETDIR">
<DirectoryRef Id="INSTALLLOCATION">
<Directory Id="dirC722990CDCB916A6A44099040A99483Aa" Name="scripts" />
</DirectoryRef>
</Fragment>
Expand Down
Loading

0 comments on commit 45c74c5

Please sign in to comment.