When recording to a.bag file that is being installed in Program Files in defa…#8156
Conversation
| std::string tmp_path = std::getenv("TEMP"); | ||
| std::string bag = "a.bag"; | ||
|
|
||
| #ifdef _WIN32 |
There was a problem hiding this comment.
Avoid platform-specific #ifdefs and explicit query of environment vars.
Replace with existing 3rd-party from common/os.h
Then I believe, the rest will be unnecessary
There was a problem hiding this comment.
@ev-mp
just pushed new commit, copying here description from commit:rs-record-payback now uses existing universal function get_folder_path from common folder. Previously it was defined in /common/os.cpp file dealing with files functions, file dialogs and so on in one file, but direct usage of it led to a conflict with existing Opengl libraries used by examples (and rs-record-payback) as it loads this as well. So files functions (without dialogs) was extracted to a file fs.cpp (and fs.h) and this functions may be used in any part of realsense solution.os.h includes fs.h as well and any possible usage of this functions by including os.h leaves it operational (but with Opengl libraries included). rs-record-payback now directly includes fs module to get temporary system folder to record to a temporary file.
…ult read-only folder it fails. Now it attemts to write to temp folder first.
…older_path``` from ```common``` folder. Previously it was defined in ```/common/os.cpp``` file dealing with files functions, file dialogs and so on in one file, but direct usage of it led to a conflict with existing Opengl libraries used by examples (and ```rs-record-payback```) as it loads this as well. So files functions (without dialogs) was extracted to a file fs.cpp (and fs.h) and this functions may be used in any part of realsense solution.```os.h``` includes ```fs.h``` as well and any possible usage of this functions by including ```os.h``` leaves it operational (but with Opengl libraries included). ```rs-record-payback``` now directly includes ```fs``` module to get temporary system folder to record to a temporary file.
7274447 to
b646e01
Compare
| set_property(TARGET rs-record-playback PROPERTY CXX_STANDARD 11) | ||
| target_link_libraries(rs-record-playback ${DEPENDENCIES}) | ||
| include_directories(../ ../../third-party/tclap/include ../../third-party/imgui) | ||
| include_directories(../../common) |
There was a problem hiding this comment.
@ev-mp
Will this create an issue with the examples project we install?
maloel
left a comment
There was a problem hiding this comment.
This may cause issues with the installed example project -- will be fixed in followup.
…ult read-only folder it fails. Now it attemts to write to temp folder first.