Wireshark-commits: [Wireshark-commits] master d5fdbef: cmake, wslua, wsutil: load files from run/ i
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 20 Dec 2016 13:17:23 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=d5fdbef7f4f103f3cd57524bc68b9a1385c61363
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

d5fdbef by Peter Wu (peter@xxxxxxxxxxxxx):

    cmake,wslua,wsutil: load files from run/ instead of source tree
    
    Fixes Lua on macOS, tested with an out-of-tree build:
    
        WS_BIN_PATH=$PWD/run ../wireshark/test/test.sh -s wslua
    
    Previously programs that were ran from the build directory would load
    data files (radius/, diameter/, init.lua) from the source directory.
    Then in the case of Lua, files were loaded from the program directory
    ($BUILDDIR/run/init.lua on Linux) or source directory
    (sSOURCEDIR/epan/wslua/console.lua).
    
    On macOS, this does not work for Lua since files are installed into
    $BUILDDIR/run/Wireshark.app/Contents/Resources/share/wireshark/init.lua
    instead. Since CMake always copies data files (radius, console.lua,
    etc.) into the build directory, make get_datafile_dir() return this
    "run" directory instead.
    
    Change-Id: If97d2f5686271caf9ad4d4e4fc58e902dc592a98
    Reviewed-on: https://code.wireshark.org/review/19330
    Reviewed-by: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    Petri-Dish: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  bd0fa39   Lua: Remove an obsolete comment.
    adds  d5fdbef   cmake,wslua,wsutil: load files from run/ instead of source tree


Summary of changes:
 epan/wslua/init_wslua.c |   19 +++++++++----------
 epan/wslua/wslua_dir.c  |    3 +--
 epan/wslua/wslua_util.c |   20 +++++++++++++-------
 wsutil/CMakeLists.txt   |    7 ++++++-
 wsutil/filesystem.c     |   15 ++++++++++++++-
 5 files changed, 43 insertions(+), 21 deletions(-)