Skip to content

Commit

Permalink
initial meson installer
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchcapper committed Feb 5, 2025
1 parent de3f40e commit 4a69fe6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions default_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ VCPKG_TRIPLET=x64-windows[STATIC_RELEASE_TRIPLET_AUTO]
VCPKG_BINARY_DIR=[VCPKG_DIR]/archive
VCPKG_BIN=[VCPKG_DIR]/vcpkg.exe
VCPKG_STRIP_TRIPLET=0 #can strip the triplet off vcpkg to make the install paths shorter but if you switch between debug/release static/not without removing this will fail off by default
MESON_DIR=[BASE_FOLDER]/meson

LOG_DEBUG_WRAPPERS=1 #enable debug mode for build-aux wrappers, show input and output, essentially sets DEBUG_GNU_COMPILE_WRAPPER=1 DEBUG_GNU_LIB_WRAPPER=1
LOG_COLOR_HIGHLIGHT=1 #when using some of our command wrappers do minimal coloring of the output
Expand Down
22 changes: 22 additions & 0 deletions helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,28 @@ apply_our_repo_patch () {
SKIP_STEP=""
}

function meson_run(){
declare -a RUN_ARGS=( "$@" )
local cl_path=`which cl.exe`
local msvc_dir=`dirname "$cl_path"`
local meson="${BLD_CONFIG_MESON_DIR}/meson.exe"
PATH="$msvc_dir:$PATH" MSYSTEM="" "$meson" "${RUN_ARGS[@]}"

}
function meson_ensure_installed(){
if [[ -f "${BLD_CONFIG_MESON_DIR}" ]]; then
return
fi
mkdir -p "${BLD_CONFIG_MESON_DIR}"
pushd "${BLD_CONFIG_MESON_DIR}"
wget https://github.com/mesonbuild/meson/releases/download/1.6.1/meson-1.6.1-64.msi -O meson.msi
mkdir -p meson_bin
local MDIR=`cygpath.exe -aw meson_bin`
msiexec /a meson.msi /qb "TARGETDIR=$MDIR"
mv meson_bin/PFiles64/Meson/* .
popd
}

function osfixes_get_defines(){
local defs=""
for def in "${BLD_CONFIG_OUR_OS_FIXES_DEFINES[@]}"; do
Expand Down

0 comments on commit 4a69fe6

Please sign in to comment.