Skip to content

Commit 9831d22

Browse files
committed
合入官方库的修改
1 parent 78cd3a7 commit 9831d22

12 files changed

+87
-24
lines changed

build/make_android_lua53.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function build() {
1818
ABI=$2
1919
TOOLCHAIN_ANME=$3
2020
BUILD_PATH=build.Android.${ABI}
21-
cmake -H. -B${BUILD_PATH} -DANDROID_ABI=${ABI} -DCMAKE_TOOLCHAIN_FILE=${NDK}/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=${API} -DANDROID_TOOLCHAIN=clang -DANDROID_TOOLCHAIN_NAME=${TOOLCHAIN_ANME}
21+
cmake -H. -B${BUILD_PATH} -DANDROID_ABI=${ABI} -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${NDK}/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=${API} -DANDROID_TOOLCHAIN=clang -DANDROID_TOOLCHAIN_NAME=${TOOLCHAIN_ANME}
2222
cmake --build ${BUILD_PATH} --config Release
2323
mkdir -p plugin_lua53/Plugins/Android/libs/${ABI}/
2424
cp ${BUILD_PATH}/libxlua.so plugin_lua53/Plugins/Android/libs/${ABI}/libxlua.so

build/make_android_lua54.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function build() {
1818
ABI=$2
1919
TOOLCHAIN_ANME=$3
2020
BUILD_PATH=build54.Android.${ABI}
21-
cmake -H. -B${BUILD_PATH} -DLUA_VERSION=5.4.1 -DANDROID_ABI=${ABI} -DCMAKE_TOOLCHAIN_FILE=${NDK}/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=${API} -DANDROID_TOOLCHAIN=clang -DANDROID_TOOLCHAIN_NAME=${TOOLCHAIN_ANME}
21+
cmake -H. -B${BUILD_PATH} -DLUA_VERSION=5.4.1 -DANDROID_ABI=${ABI} -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${NDK}/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=${API} -DANDROID_TOOLCHAIN=clang -DANDROID_TOOLCHAIN_NAME=${TOOLCHAIN_ANME}
2222
cmake --build ${BUILD_PATH} --config Release
2323
mkdir -p plugin_lua54/Plugins/Android/libs/${ABI}/
2424
cp ${BUILD_PATH}/libxlua.so plugin_lua54/Plugins/Android/libs/${ABI}/libxlua.so

build/make_android_luajit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_SYS=Linux TARGET_FLAGS="$NDKF $NDKARC
2424

2525
cd "$DIR"
2626
mkdir -p build_lj_v7a && cd build_lj_v7a
27-
cmake -DUSING_LUAJIT=ON -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=../cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang3.6 -DANDROID_NATIVE_API_LEVEL=android-9 ../
27+
cmake -DUSING_LUAJIT=ON -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang3.6 -DANDROID_NATIVE_API_LEVEL=android-9 ../
2828
cd "$DIR"
2929
cmake --build build_lj_v7a --config Release
3030
mkdir -p plugin_luajit/Plugins/Android/libs/armeabi-v7a/
@@ -42,7 +42,7 @@ make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_SYS=Linux TARGET_FLAGS="$NDKF"
4242

4343
cd "$DIR"
4444
mkdir -p build_lj_x86 && cd build_lj_x86
45-
cmake -DUSING_LUAJIT=ON -DANDROID_ABI=x86 -DCMAKE_TOOLCHAIN_FILE=../cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME=x86-clang3.5 -DANDROID_NATIVE_API_LEVEL=android-9 ../
45+
cmake -DUSING_LUAJIT=ON -DANDROID_ABI=x86 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME=x86-clang3.5 -DANDROID_NATIVE_API_LEVEL=android-9 ../
4646
cd "$DIR"
4747
cmake --build build_lj_x86 --config Release
4848
mkdir -p plugin_luajit/Plugins/Android/libs/x86/

build/make_android_luajit_arm64.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
if [ -z "$ANDROID_NDK" ]; then
1+
#if [ -z "$ANDROID_NDK" ]; then
22
export ANDROID_NDK=~/android-ndk-r15c
3-
fi
3+
#fi
44

55
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
66
SRCDIR=$DIR/luajit-2.1.0b3

build/make_uwp.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
mkdir build_uwp & pushd build_uwp
2-
cmake -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
2+
cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
33
popd
44
cmake --build build_uwp --config Release
55
md plugin_lua53\Plugins\WSA\x86
66
copy /Y build_uwp\Release\xlua.dll plugin_lua53\Plugins\WSA\x86\xlua.dll
77

88
mkdir build_uwp64 & pushd build_uwp64
9-
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
9+
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
1010
popd
1111
cmake --build build_uwp64 --config Release
1212
md plugin_lua53\Plugins\WSA\x64
1313
copy /Y build_uwp64\Release\xlua.dll plugin_lua53\Plugins\WSA\x64\xlua.dll
1414

1515
mkdir build_uwp_arm & pushd build_uwp_arm
16-
cmake -G "Visual Studio 15 2017 ARM" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
16+
cmake -G "Visual Studio 16 2019" -A ARM -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
1717
popd
1818
cmake --build build_uwp_arm --config Release
1919
md plugin_lua53\Plugins\WSA\ARM
2020
copy /Y build_uwp_arm\Release\xlua.dll plugin_lua53\Plugins\WSA\ARM\xlua.dll
2121

2222
mkdir build_uwp_arm64 & pushd build_uwp_arm64
23-
cmake -G "Visual Studio 15 2017" -A ARM64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
23+
cmake -G "Visual Studio 16 2019" -A ARM64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
2424
popd
2525
cmake --build build_uwp_arm64 --config Release
2626
md plugin_lua53\Plugins\WSA\ARM64

build/make_uwp_lua54.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
mkdir build_uwp_54 & pushd build_uwp_54
2-
cmake -DLUA_VERSION=5.4.1 -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
2+
cmake -DLUA_VERSION=5.4.1 -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
33
popd
44
cmake --build build_uwp_54 --config Release
55
md plugin_lua54\Plugins\WSA\x86
66
copy /Y build_uwp_54\Release\xlua.dll plugin_lua54\Plugins\WSA\x86\xlua.dll
77

88
mkdir build_uwp64_54 & pushd build_uwp64_54
9-
cmake -DLUA_VERSION=5.4.1 -G "Visual Studio 15 2017 Win64" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
9+
cmake -DLUA_VERSION=5.4.1 -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
1010
popd
1111
cmake --build build_uwp64_54 --config Release
1212
md plugin_lua54\Plugins\WSA\x64
1313
copy /Y build_uwp64_54\Release\xlua.dll plugin_lua54\Plugins\WSA\x64\xlua.dll
1414

1515
mkdir build_uwp_arm_54 & pushd build_uwp_arm_54
16-
cmake -DLUA_VERSION=5.4.1 -G "Visual Studio 15 2017 ARM" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
16+
cmake -DLUA_VERSION=5.4.1 -G "Visual Studio 16 2019" -A ARM -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
1717
popd
1818
cmake --build build_uwp_arm_54 --config Release
1919
md plugin_lua54\Plugins\WSA\ARM
2020
copy /Y build_uwp_arm_54\Release\xlua.dll plugin_lua54\Plugins\WSA\ARM\xlua.dll
2121

2222
mkdir build_uwp_arm64_54 & pushd build_uwp_arm64_54
23-
cmake -DLUA_VERSION=5.4.1 -G "Visual Studio 15 2017" -A ARM64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
23+
cmake -DLUA_VERSION=5.4.1 -G "Visual Studio 16 2019" -A ARM64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..
2424
popd
2525
cmake --build build_uwp_arm64_54 --config Release
2626
md plugin_lua54\Plugins\WSA\ARM64

build/make_win32_lua53.bat

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
2+
set "__VS=Visual Studio 16 2019"
3+
set "__VSWhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
4+
set "__VSDISPLAY="
5+
set "__VSVER="
6+
if exist "%__VSWhere%" (
7+
for /f "tokens=*" %%p in (
8+
'"%__VSWhere%" -latest -property catalog_productLineVersion'
9+
) do set __VSDISPLAY=%%p
10+
11+
for /f "tokens=*" %%p in (
12+
'"%__VSWhere%" -latest -property catalog_productDisplayVersion'
13+
) do set __VSVER=%%p
14+
15+
)
16+
if "%__VSVER%" neq "" (
17+
set __VS=Visual Studio %__VSVER:~0,2% %__VSDisplay%
18+
)
19+
120
mkdir build32 & pushd build32
2-
cmake -G "Visual Studio 15 2017" ..
21+
cmake -G "%__VS%" -A Win32 ..
322
popd
423
cmake --build build32 --config Release
524
md plugin_lua53\Plugins\x86

build/make_win32_luajit.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
@echo off
22

3-
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
3+
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
44

55
echo Swtich to x86 build env
66
cd %~dp0\luajit-2.1.0b3\src
77
call msvcbuild_mt.bat static
88
cd ..\..
99

1010
mkdir build_lj32 & pushd build_lj32
11-
cmake -DUSING_LUAJIT=ON -G "Visual Studio 15 2017" ..
12-
IF %ERRORLEVEL% NEQ 0 cmake -DUSING_LUAJIT=ON -G "Visual Studio 15 2017" ..
11+
cmake -DUSING_LUAJIT=ON -G "Visual Studio 16 2019" -A Win32 ..
12+
IF %ERRORLEVEL% NEQ 0 cmake -DUSING_LUAJIT=ON -G "Visual Studio 16 2019" -A Win32 ..
1313
popd
1414
cmake --build build_lj32 --config Release
1515
md plugin_luajit\Plugins\x86

build/make_win64_lua53.bat

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
2+
set "__VS=Visual Studio 16 2019"
3+
set "__VSWhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
4+
set "__VSDISPLAY="
5+
set "__VSVER="
6+
if exist "%__VSWhere%" (
7+
for /f "tokens=*" %%p in (
8+
'"%__VSWhere%" -latest -property catalog_productLineVersion'
9+
) do set __VSDISPLAY=%%p
10+
11+
for /f "tokens=*" %%p in (
12+
'"%__VSWhere%" -latest -property catalog_productDisplayVersion'
13+
) do set __VSVER=%%p
14+
15+
)
16+
if "%__VSVER%" neq "" (
17+
set __VS=Visual Studio %__VSVER:~0,2% %__VSDisplay%
18+
)
19+
120
mkdir build64 & pushd build64
2-
cmake -G "Visual Studio 15 2017 Win64" ..
21+
cmake -G "%__VS%" -A x64 ..
322
popd
423
cmake --build build64 --config Release
524
md plugin_lua53\Plugins\x86_64

build/make_win64_luajit.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
@echo off
22

3-
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
3+
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
44

55
echo Swtich to x64 build env
66
cd %~dp0\luajit-2.1.0b3\src
77
call msvcbuild_mt.bat static
88
cd ..\..
99

1010
mkdir build_lj64 & pushd build_lj64
11-
cmake -DUSING_LUAJIT=ON -G "Visual Studio 15 2017 Win64" ..
12-
IF %ERRORLEVEL% NEQ 0 cmake -DUSING_LUAJIT=ON -G "Visual Studio 15 2017 Win64" ..
11+
cmake -DUSING_LUAJIT=ON -G "Visual Studio 16 2019" -A x64 ..
12+
IF %ERRORLEVEL% NEQ 0 cmake -DUSING_LUAJIT=ON -G "Visual Studio 16 2019" -A x64 ..
1313
popd
1414
cmake --build build_lj64 --config Release
1515
md plugin_luajit\Plugins\x86_64

0 commit comments

Comments
 (0)