Changes between Version 3 and Version 11 of Ticket #2086


Ignore:
Timestamp:
Nov 21, 2014, 12:05:27 AM (9 years ago)
Author:
leper
Comment:

Thanks for the patch. Please use tabs for indentation as written in the Coding_Conventions.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2086

    • Property Cc marcel.stieglitz@… added
    • Property Summary Path detection failingPath detection failing on BSDs
    • Property Milestone BacklogAlpha 18
  • Ticket #2086 – Description

    v3 v11  
    1 Calling pyrogenesis (instead of some path (be it relative or absolute) without being in the right dir) fails with the following error on Linux and BSD.
     1Calling pyrogenesis (instead of some path (be it relative or absolute) without being in the right dir) fails with the following error on ~~Linux and~~ BSD.
    22{{{
    33$ pyrogenesis
     
    3030However, if I'm in the same directory as the executable (e.g., with "cd /usr/local/bin && pyrogenesis"), it works perfectly.
    3131
    32 This issue is twofold:
    33  1. We don't use `INSTALLED_BINDIR` in [source:ps/trunk/source/ps/GameSetup/Paths.cpp#L156 Paths.cpp] `Paths::Root()`
    34  2. We should get the proper path of the executable if we are started like above (some ways on how to do that for Linux and some BSD variants [http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe/1024937#1024937 at stackoverflow])
     32We should get the proper path of the executable if we are started like above (some ways on how to do that for ~~Linux and~~ some BSD variants [http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe/1024937#1024937 at stackoverflow])
    3533    sys_ExecutablePathname() in [source:ps/trunk/source/lib/sysdep/os/ source/lib/sysdep/os/]{linux/linux.cpp,bsd/bsd.cpp}
     34
     35BSDs might not have procfs available (reusing the code in linux.cpp (move it to unix_executable_path.cpp (see r15996)) might be possible if they do, but we should not rely on that) so using sysctl is the way to go.