Skip to content

Commit

Permalink
The setup created by the .bat files now contains the necessary debug …
Browse files Browse the repository at this point in the history
…binaries
  • Loading branch information
FlorianReimold committed Sep 23, 2020
1 parent c34f973 commit 523aa3f
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 31 deletions.
6 changes: 2 additions & 4 deletions build_win/win_make_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ pushd %~dp0\..

call build_win\win_set_vars.bat

cmake --build "%BUILD_DIR%" --parallel --config Release
cmake --build "%BUILD_DIR%" --target documentation_c
cmake --build "%BUILD_DIR%" --target documentation_cpp
cmake --build "%BUILD_DIR%" --target install --config Release
cmake --build "%BUILD_DIR_COMPLETE%" --parallel --config Release
cmake --build "%BUILD_DIR_SDK%" --parallel --config Debug

popd
26 changes: 20 additions & 6 deletions build_win/win_make_cmake.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,31 @@ set ARCH=x64
if %VERSION% == v142 goto build

:build
if not exist "%BUILD_DIR%" mkdir %BUILD_DIR%
cd /d %BUILD_DIR%

set "CMAKE_OPTIONS_COMPLETE=-DCMAKE_INSTALL_PREFIX=_install -DBUILD_SHARED_LIBS=OFF"
set "CMAKE_OPTIONS_SDK=-DCMAKE_INSTALL_PREFIX=_install -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Debug -DBUILD_DOCS=OFF -DBUILD_APPS=OFF -DBUILD_SAMPLES=OFF -DBUILD_TIME=ON -DBUILD_PY_BINDING=OF-DBUILD_CSHARP_BINDING=OFF -DBUILD_ECAL_TESTS=OFF -DECAL_LAYER_ICEORYX=OFF -DECAL_INCLUDE_PY_SAMPLES=OFF -DECAL_INSTALL_SAMPLE_SOURCES=OFF"

if not exist "%BUILD_DIR_COMPLETE%" mkdir %BUILD_DIR_COMPLETE%
if not exist "%BUILD_DIR_SDK%" mkdir %BUILD_DIR_SDK%

if %ARCH% == "" goto build_no_arch
set COMPILE_WIN64=%VISUAL_STUDIO_GENERATOR%
cmake .. -G "%COMPILE_WIN64%" -A "%ARCH%" -DCMAKE_INSTALL_PREFIX=_install -DBUILD_SHARED_LIBS=OFF

:build_with_arch

cd /d "%WORKSPACE%\%BUILD_DIR_COMPLETE%"
cmake ../.. -G "%VISUAL_STUDIO_GENERATOR%" -A "%ARCH%" %CMAKE_OPTIONS_COMPLETE%

cd /d "%WORKSPACE%\%BUILD_DIR_SDK%"
cmake ../.. -G "%VISUAL_STUDIO_GENERATOR%" -A "%ARCH%" %CMAKE_OPTIONS_SDK%

goto end

:build_no_arch
set COMPILE_WIN64=%VISUAL_STUDIO_GENERATOR% Win64
cmake .. -G "%COMPILE_WIN64%" -DCMAKE_INSTALL_PREFIX=_install -DBUILD_SHARED_LIBS=OFF
cd /d "%WORKSPACE%\%BUILD_DIR_COMPLETE%"
cmake ../.. -G "%VISUAL_STUDIO_GENERATOR% Win64" %CMAKE_OPTIONS_COMPLETE%

cd /d "%WORKSPACE%\%BUILD_DIR_SDK%"
cmake ../.. -G "%VISUAL_STUDIO_GENERATOR% Win64" %CMAKE_OPTIONS_SDK%

:end
popd
16 changes: 8 additions & 8 deletions build_win/win_make_cmake_with_documentation.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ set ARCH=x64
if %VERSION% == v142 goto build

:build
if not exist "%BUILD_DIR%" mkdir %BUILD_DIR%
if not exist "%BUILD_DIR_COMPLETE%" mkdir %BUILD_DIR_COMPLETE%

echo Creating Python venv
if not exist "%BUILD_DIR%\.venv" mkdir "%BUILD_DIR%\.venv"
python -m venv "%BUILD_DIR%\.venv"
CALL "%BUILD_DIR%\.venv\Scripts\activate.bat"
if not exist "%BUILD_DIR_COMPLETE%\.venv" mkdir "%BUILD_DIR_COMPLETE%\.venv"
python -m venv "%BUILD_DIR_COMPLETE%\.venv"
CALL "%BUILD_DIR_COMPLETE%\.venv\Scripts\activate.bat"

echo Upgrading pip
python -m pip install --upgrade pip

echo Installing python requirements
pip install -r requirements.txt

cd /d %BUILD_DIR%
cd /d %BUILD_DIR_COMPLETE%

if %ARCH% == "" goto build_no_arch
set COMPILE_WIN64=%VISUAL_STUDIO_GENERATOR%
cmake .. -G "%COMPILE_WIN64%" -A "%ARCH%" -DCMAKE_INSTALL_PREFIX=_install -DBUILD_SHARED_LIBS=OFF -DBUILD_DOCS=ON
cmake ../.. -G "%COMPILE_WIN64%" -A "%ARCH%" -DCMAKE_INSTALL_PREFIX=_install -DBUILD_SHARED_LIBS=OFF -DBUILD_DOCS=ON
goto end

:build_no_arch
set COMPILE_WIN64=%VISUAL_STUDIO_GENERATOR% Win64
cmake .. -G "%COMPILE_WIN64%" -DCMAKE_INSTALL_PREFIX=_install -DBUILD_SHARED_LIBS=OFF -DBUILD_DOCS=ON
cmake ../.. -G "%COMPILE_WIN64%" -DCMAKE_INSTALL_PREFIX=_install -DBUILD_SHARED_LIBS=OFF -DBUILD_DOCS=ON

:end
CALL "%BUILD_DIR%\.venv\Scripts\deactivate.bat"
CALL "%BUILD_DIR_COMPLETE%\.venv\Scripts\deactivate.bat"
popd
2 changes: 1 addition & 1 deletion build_win/win_make_python_egg.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pushd %~dp0\..

call build_win\win_set_vars.bat

cd /d %BUILD_DIR%
cd /d %BUILD_DIR_COMPLETE%

cmake --build . --target create_python_egg --config Release

Expand Down
5 changes: 4 additions & 1 deletion build_win/win_make_setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ pushd %~dp0\..

call build_win\win_set_vars.bat

cd /d %BUILD_DIR%
cd /d %WORKSPACE%\%BUILD_DIR_SDK%
cpack -C Debug

cd /d %WORKSPACE%\%BUILD_DIR_COMPLETE%
cpack -C Release

popd
6 changes: 3 additions & 3 deletions build_win/win_run_pvs.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ call build_win\win_make_build.bat
rem - please setup correct pvs installation path here
set PVS_PATH="%PROGRAMFILES%\PVS-Studio"

mkdir "%BUILD_DIR%\_pvs"
""%PVS_PATH%\PVS-Studio_Cmd.exe"" --target "%BUILD_DIR%\eCAL.sln" --platform "x64" --configuration "Release" --output "%BUILD_DIR%\_pvs\ecal.plog" --progress --settings "%WORKSPACE%\PVSSettings.xml"
mkdir "%BUILD_DIR_COMPLETE%\_pvs"
""%PVS_PATH%\PVS-Studio_Cmd.exe"" --target "%BUILD_DIR_COMPLETE%\eCAL.sln" --platform "x64" --configuration "Release" --output "%BUILD_DIR_COMPLETE%\_pvs\ecal.plog" --progress --settings "%WORKSPACE%\PVSSettings.xml"

cd "%BUILD_DIR%\_pvs"
cd "%BUILD_DIR_COMPLETE%\_pvs"
""%PVS_PATH%\PlogConverter.exe ecal.plog -a GA:1,2;OP:1,2 -t FullHtml,Txt,Totals"

popd
2 changes: 1 addition & 1 deletion build_win/win_run_tests.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pushd %~dp0\..

call build_win\win_set_vars.bat

cd %BUILD_DIR%
cd %BUILD_DIR_COMPLETE%
ctest -C Release --verbose
cd ..

Expand Down
5 changes: 3 additions & 2 deletions build_win/win_set_vars.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ if ["%~1"]==[""] (
)

rem - base folder
set WORKSPACE=%~dp0\..\
set "WORKSPACE=%~dp0\..\"

rem - cmake will generate the build solution here
set BUILD_DIR=_build
set BUILD_DIR_COMPLETE=_build\complete
set BUILD_DIR_SDK=_build\sdk
11 changes: 6 additions & 5 deletions cmake/eCALConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,20 @@ set(eCAL_VERSION_STRING @eCAL_VERSION_STRING@)
set(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL Release)
set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release)

find_package(Protobuf REQUIRED)

include("@PACKAGE_eCAL_install_cmake_dir@/helper_functions/ecal_add_functions.cmake")
include("@PACKAGE_eCAL_install_cmake_dir@/helper_functions/ecal_helper_functions.cmake")
include("@PACKAGE_eCAL_install_cmake_dir@/helper_functions/ecal_install_functions.cmake")
include("@PACKAGE_eCAL_install_cmake_dir@/eCALTargets.cmake")

# careful, this is a Windows hack to find protobuf etc. with the eCAL installation
# To be removed if there is a better solution like Conan e.g.
if(WIN32)
list(APPEND CMAKE_MODULE_PATH "${PACKAGE_PREFIX_DIR}/../../../../cmake")
list(APPEND CMAKE_PREFIX_PATH "${PACKAGE_PREFIX_DIR}/../../../../cmake")
endif()
#if(WIN32)
# list(APPEND CMAKE_MODULE_PATH "${PACKAGE_PREFIX_DIR}/../../../../cmake")
# list(APPEND CMAKE_PREFIX_PATH "${PACKAGE_PREFIX_DIR}/../../../../cmake")
#endif()

find_package(CMakeFunctions REQUIRED)

find_package(Protobuf REQUIRED)
find_package(Threads REQUIRED)
18 changes: 18 additions & 0 deletions cpack/innosetup/ecal_setup.iss.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define AppDateTime GetDateTimeString('yyyy-mm-dd', '', '');
#define OutputName str("ecal-")+str(AppVersion)+str("-win64")
#define ComponentStagingDir "@CPACK_TEMPORARY_INSTALL_DIRECTORY@"
#define DebugSdkStagingDir StringChange(ComponentStagingDir, "/complete/", "/sdk/")
#define OutputDir "@CPACK_PACKAGE_DIRECTORY@/@CPACK_OUTPUT_FILE_PREFIX@"
#define LicenseFile "@CPACK_RESOURCE_FILE_LICENSE@"

Expand Down Expand Up @@ -80,6 +81,15 @@ Source: "{#ComponentStagingDir}\headers\*"; DestDir: "{app}"; Flags:
Source: "{#ComponentStagingDir}\libraries\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\ecal
Source: "{#ComponentStagingDir}\sdk\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\ecal

Source: "{#DebugSdkStagingDir}\runtime\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\ecal
Source: "{#DebugSdkStagingDir}\Unspecified\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\ecal

Source: "{#DebugSdkStagingDir}\app\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\ecal

;Source: "{#DebugSdkStagingDir}\headers\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\ecal
Source: "{#DebugSdkStagingDir}\libraries\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\ecal
Source: "{#DebugSdkStagingDir}\sdk\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\ecal

; sdk\protobuf
Source: "{#ComponentStagingDir}\libprotobuf\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
Source: "{#ComponentStagingDir}\libprotobuf-lite\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
Expand All @@ -89,6 +99,14 @@ Source: "{#ComponentStagingDir}\protobuf-headers\*"; DestDir: "{app}"; Flags:
Source: "{#ComponentStagingDir}\protobuf-protos\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
Source: "{#ComponentStagingDir}\protoc\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf

Source: "{#DebugSdkStagingDir}\libprotobuf\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
Source: "{#DebugSdkStagingDir}\libprotobuf-lite\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
Source: "{#DebugSdkStagingDir}\libprotoc\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
Source: "{#DebugSdkStagingDir}\protobuf-export\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
;Source: "{#DebugSdkStagingDir}\protobuf-headers\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
;Source: "{#DebugSdkStagingDir}\protobuf-protos\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf
; Source: "{#DebugSdkStagingDir}\protoc\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf

[Icons]
Name: "{group}\eCAL Launcher"; Filename: "{app}\bin\ecal_launcher.exe"; Components: applications
Name: "{group}\eCAL Monitor"; Filename: "{app}\bin\ecal_mon_gui.exe"; Components: applications
Expand Down

0 comments on commit 523aa3f

Please sign in to comment.