add option to patch lua with UTF8 support
This commit is contained in:
parent
dc2e9621ca
commit
bccc02743a
|
@ -22,6 +22,7 @@ show_help() {
|
|||
echo "-B --bundle Create an App bundle (macOS only)"
|
||||
echo "-P --portable Create a portable binary package."
|
||||
echo "-O --pgo Use profile guided optimizations (pgo)."
|
||||
echo "-U --windows-lua-utf Use the UTF8 patch for Lua."
|
||||
echo " macOS: disabled when used with --bundle,"
|
||||
echo " Windows: Implicit being the only option."
|
||||
echo
|
||||
|
@ -35,6 +36,9 @@ main() {
|
|||
local bundle
|
||||
local portable
|
||||
local pgo
|
||||
local patch_lua
|
||||
|
||||
local lua_subproject_path
|
||||
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
|
@ -76,6 +80,10 @@ main() {
|
|||
pgo="-Db_pgo=generate"
|
||||
shift
|
||||
;;
|
||||
-U|--windows-lua-utf)
|
||||
patch_lua="true"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
# unknown option
|
||||
;;
|
||||
|
@ -103,6 +111,11 @@ main() {
|
|||
$pgo \
|
||||
"${build_dir}"
|
||||
|
||||
lua_subproject_path=subprojects/lua-*/
|
||||
if [[ $patch_lua == "true" ]] && [[ ! -z $force_fallback ]] && [[ -d $lua_subproject_path ]]; then
|
||||
patch -d $lua_subproject_path -p1 --forward < resources/windows/001-lua-unicode.diff
|
||||
fi
|
||||
|
||||
meson compile -C "${build_dir}"
|
||||
|
||||
if [ ! -z ${pgo+x} ]; then
|
||||
|
|
Loading…
Reference in New Issue