fix(ci,build.sh): un-hardcode lua subproject detection
This commit is contained in:
parent
5c5c77219b
commit
43643a16c0
|
@ -204,13 +204,14 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
"INSTALL_NAME=lite-xl-$($env:GITHUB_REF -replace ".*/")-windows-msvc-${{ matrix.arch.name }}" >> $env:GITHUB_ENV
|
"INSTALL_NAME=lite-xl-$($env:GITHUB_REF -replace ".*/")-windows-msvc-${{ matrix.arch.name }}" >> $env:GITHUB_ENV
|
||||||
"INSTALL_REF=$($env:GITHUB_REF -replace ".*/")" >> $env:GITHUB_ENV
|
"INSTALL_REF=$($env:GITHUB_REF -replace ".*/")" >> $env:GITHUB_ENV
|
||||||
"LUA_SUBPROJECT_PATH=subprojects/lua-5.4.4" >> $env:GITHUB_ENV
|
"LUA_SUBPROJECT_PATH=subprojects/$(awk -F ' *= *' '/directory/ { printf $2 }' subprojects/lua.wrap)" >> $env:GITHUB_ENV
|
||||||
|
- name: Download and patch subprojects
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
meson subprojects download
|
||||||
|
cat resources/windows/001-lua-unicode.diff | patch -Np1 -d "$LUA_SUBPROJECT_PATH"
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: |
|
run: |
|
||||||
# Download the subprojects first so we can patch it before configuring.
|
|
||||||
# This avoids reconfiguring the subprojects when compiling.
|
|
||||||
meson subprojects download
|
|
||||||
Get-Content -Path resources/windows/001-lua-unicode.diff -Raw | patch -d $env:LUA_SUBPROJECT_PATH -p1 --forward
|
|
||||||
meson setup --wrap-mode=forcefallback build
|
meson setup --wrap-mode=forcefallback build
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -181,7 +181,7 @@ main() {
|
||||||
# download the subprojects so we can start patching before configure.
|
# download the subprojects so we can start patching before configure.
|
||||||
# this will prevent reconfiguring the project.
|
# this will prevent reconfiguring the project.
|
||||||
meson subprojects download
|
meson subprojects download
|
||||||
lua_subproject_path=$(echo subprojects/lua-*/)
|
lua_subproject_path="subprojects/$(awk -F ' *= *' '/directory/ { printf $2 }' subprojects/lua.wrap)"
|
||||||
if [[ -d $lua_subproject_path ]]; then
|
if [[ -d $lua_subproject_path ]]; then
|
||||||
patch -d $lua_subproject_path -p1 --forward < resources/windows/001-lua-unicode.diff
|
patch -d $lua_subproject_path -p1 --forward < resources/windows/001-lua-unicode.diff
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue