-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When recording to a.bag file that is being installed in Program Files in defa… #8156
When recording to a.bag file that is being installed in Program Files in defa… #8156
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manson , thank you for the contribution.
Can you try to rework the PR using the 3rd-party used in the SDK?
std::string tmp_path = std::getenv("TEMP"); | ||
std::string bag = "a.bag"; | ||
|
||
#ifdef _WIN32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ev-mp
Will this create an issue with the examples project we install?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it will...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.