mirror of
https://github.com/love2d/love.git
synced 2026-08-21 21:15:09 +02:00
Merge remote-tracking branch 'upstream/12.0-development' into 12.0-development
This commit is contained in:
+80
-30
@@ -17,11 +17,12 @@ jobs:
|
||||
libegl1-mesa-dev libibus-1.0-dev fcitx-libs-dev libsamplerate0-dev \
|
||||
libsndio-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev
|
||||
- name: Checkout love-appimage-source
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: MikuAuahDark/love-appimage-source
|
||||
ref: 12.x
|
||||
- name: Checkout LÖVE
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: love2d-${{ github.sha }}
|
||||
- name: Build AppImage
|
||||
@@ -29,7 +30,7 @@ jobs:
|
||||
- name: Print LuaJIT branch
|
||||
run: git -C LuaJIT-v2.1 branch -v
|
||||
- name: Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: love-linux-x86_64.AppImage
|
||||
path: love-${{ github.sha }}.AppImage
|
||||
@@ -37,47 +38,96 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [Win32, x64]
|
||||
platform: [Win32, x64, ARM64]
|
||||
install: [compat, modern]
|
||||
include:
|
||||
- platform: Win32
|
||||
arch: x86
|
||||
- platform: x64
|
||||
arch: x64
|
||||
upload_jitmodules: true
|
||||
- install: compat
|
||||
compatdef: -DLOVE_INSTALL_UCRT=ON
|
||||
compatname: -compat
|
||||
|
||||
exclude:
|
||||
- platform: ARM64
|
||||
install: compat
|
||||
defaults:
|
||||
run:
|
||||
shell: cmd
|
||||
continue-on-error: ${{ matrix.platform == 'ARM64' }}
|
||||
steps:
|
||||
- name: Define Variables
|
||||
id: vars
|
||||
run: |
|
||||
rem Compat/Modern switch
|
||||
if "${{ matrix.install }}" == "compat" (
|
||||
echo moredef=-DLOVE_INSTALL_UCRT=ON>> "%GITHUB_OUTPUT%"
|
||||
echo compatname=-compat>> "%GITHUB_OUTPUT%"
|
||||
) else (
|
||||
echo moredef=>> "%GITHUB_OUTPUT%"
|
||||
echo compatname=>> "%GITHUB_OUTPUT%"
|
||||
)
|
||||
|
||||
rem JIT Modules
|
||||
if "${{ matrix.platform }}-${{ matrix.install }}" == "x64-modern" (
|
||||
(echo jitmodules=1)>> "%GITHUB_OUTPUT%"
|
||||
) else (
|
||||
(echo jitmodules=0)>> "%GITHUB_OUTPUT%"
|
||||
)
|
||||
|
||||
rem Architecture-Specific Switch
|
||||
goto ${{ matrix.platform }}
|
||||
exit /b 1
|
||||
|
||||
:Win32
|
||||
(echo arch=x86)>> "%GITHUB_OUTPUT%"
|
||||
(echo angle=0)>> "%GITHUB_OUTPUT%"
|
||||
echo nofiles=warn>> "%GITHUB_OUTPUT%"
|
||||
exit /b 0
|
||||
|
||||
:x64
|
||||
(echo arch=x64)>> "%GITHUB_OUTPUT%"
|
||||
(echo angle=0)>> "%GITHUB_OUTPUT%"
|
||||
echo nofiles=warn>> "%GITHUB_OUTPUT%"
|
||||
exit /b 0
|
||||
|
||||
:ARM64
|
||||
(echo arch=arm64)>> "%GITHUB_OUTPUT%"
|
||||
(echo angle=1)>> "%GITHUB_OUTPUT%"
|
||||
echo nofiles=ignore>> "%GITHUB_OUTPUT%"
|
||||
echo moredef=-DLOVE_EXTRA_DLLS=%CD%\angle\libEGL.dll;%CD%\angle\libGLESv2.dll>> "%GITHUB_OUTPUT%"
|
||||
exit /b 0
|
||||
- name: Clone Megasource
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: megasource
|
||||
repository: love2d/megasource
|
||||
ref: 12.x
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: megasource/libs/love
|
||||
- name: Download ANGLE
|
||||
uses: robinraju/release-downloader@v1.5
|
||||
if: steps.vars.outputs.angle == '1'
|
||||
with:
|
||||
repository: MikuAuahDark/angle-winbuild
|
||||
tag: cr_5249
|
||||
fileName: angle-win-${{ steps.vars.outputs.arch }}.zip
|
||||
tarBall: false
|
||||
zipBall: false
|
||||
out-file-path: angle
|
||||
- name: Extract ANGLE
|
||||
if: steps.vars.outputs.angle == '1'
|
||||
working-directory: angle
|
||||
run: 7z x angle-win-${{ steps.vars.outputs.arch }}.zip
|
||||
- name: Configure
|
||||
shell: cmd
|
||||
env:
|
||||
PLATFORM: ${{ matrix.platform }}
|
||||
run: cmake -Bbuild -Hmegasource -T v142 -A %PLATFORM% ${{ matrix.compatdef }} -DCMAKE_INSTALL_PREFIX=%CD%\install
|
||||
run: cmake -Bbuild -Hmegasource -T v142 -A ${{ matrix.platform }} -DCMAKE_INSTALL_PREFIX=%CD%\install ${{ steps.vars.outputs.moredef }}
|
||||
- name: Install
|
||||
shell: cmd
|
||||
run: cmake --build build --target PACKAGE --config Release -j2
|
||||
- name: Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: love-windows-${{ matrix.arch }}${{ matrix.compatname }}
|
||||
name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}
|
||||
path: |
|
||||
build/*.zip
|
||||
build/*.exe
|
||||
if-no-files-found: ${{ steps.vars.outputs.nofiles }}
|
||||
- name: Artifact JIT Modules
|
||||
if: matrix.upload_jitmodules
|
||||
uses: actions/upload-artifact@v2
|
||||
if: steps.vars.outputs.jitmodules == '1'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: love-windows-jitmodules
|
||||
path: build/libs/LuaJIT/src/jit/*.lua
|
||||
@@ -85,9 +135,9 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Clone Dependencies
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: apple-dependencies
|
||||
repository: love2d/love-apple-dependencies
|
||||
@@ -105,7 +155,7 @@ jobs:
|
||||
run:
|
||||
ditto -c -k --sequesterRsrc --keepParent love-macos/love.app love-macos.zip
|
||||
- name: Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: love-macos
|
||||
path: love-macos.zip
|
||||
@@ -113,9 +163,9 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Clone Dependencies
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: apple-dependencies
|
||||
repository: love2d/love-apple-dependencies
|
||||
|
||||
+21
-7
@@ -53,12 +53,15 @@ else()
|
||||
set(LOVE_TARGET_PLATFORM x86)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
option(LOVE_JIT "Use LuaJIT" FALSE)
|
||||
|
||||
if(APPLE OR MEGA_ARM64)
|
||||
set(LOVE_DEFAULT_JIT FALSE)
|
||||
else()
|
||||
option(LOVE_JIT "Use LuaJIT" TRUE)
|
||||
set(LOVE_DEFAULT_JIT TRUE)
|
||||
endif()
|
||||
|
||||
option(LOVE_JIT "Use LuaJIT" ${LOVE_DEFAULT_JIT})
|
||||
|
||||
if(LOVE_JIT)
|
||||
if(APPLE)
|
||||
message(WARNING "JIT not supported yet on Mac.")
|
||||
@@ -119,12 +122,16 @@ if(MEGA)
|
||||
${MEGA_OPENAL}
|
||||
)
|
||||
|
||||
if(LOVE_JIT)
|
||||
set(LOVE_LUA_LIBRARY ${MEGA_LUAJIT_LIB})
|
||||
# LOVE_EXTRA_DLLS are non-runtime DLLs which should be bundled with the
|
||||
# love binary in installers, etc. It's only needed for external
|
||||
# (non-CMake) targets, i.e. LuaJIT.
|
||||
set(LOVE_EXTRA_DLLS ${MEGA_LUAJIT_DLL})
|
||||
if(NOT DEFINED LOVE_EXTRA_DLLS)
|
||||
set(LOVE_EXTRA_DLLS)
|
||||
endif()
|
||||
|
||||
if(LOVE_JIT)
|
||||
set(LOVE_LUA_LIBRARY ${MEGA_LUAJIT_LIB})
|
||||
set(LOVE_EXTRA_DLLS ${LOVE_EXTRA_DLLS} ${MEGA_LUAJIT_DLL})
|
||||
set(LOVE_EXTRA_DEPENDECIES luajit)
|
||||
|
||||
set(LOVE_INCLUDE_DIRS
|
||||
@@ -1996,6 +2003,14 @@ message(STATUS "Version: ${LOVE_VERSION_STR}")
|
||||
###################################
|
||||
install(TARGETS ${LOVE_EXE_NAME} ${LOVE_CONSOLE_EXE_NAME} ${LOVE_LIB_NAME} RUNTIME DESTINATION .)
|
||||
|
||||
# Our install script (and NSIS) doesn't fully support Windows ARM64 yet.
|
||||
if(MEGA_ARM64)
|
||||
set(CPACK_GENERATOR ZIP)
|
||||
set(CPACK_SYSTEM_NAME woa64)
|
||||
else()
|
||||
set(CPACK_GENERATOR ZIP NSIS)
|
||||
endif()
|
||||
|
||||
# Extra DLLs.
|
||||
if(LOVE_EXTRA_DLLS)
|
||||
foreach(DLL ${LOVE_EXTRA_DLLS})
|
||||
@@ -2038,7 +2053,6 @@ install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis/game.ico
|
||||
DESTINATION .)
|
||||
|
||||
set(CPACK_GENERATOR ZIP NSIS)
|
||||
set(CPACK_PACKAGE_NAME "love")
|
||||
set(CPACK_PACKAGE_VENDOR "love2d.org")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LOVE -- It's awesome")
|
||||
|
||||
@@ -2335,6 +2335,8 @@ int w_getBackgroundColor(lua_State *L)
|
||||
|
||||
int w_setNewFont(lua_State *L)
|
||||
{
|
||||
luax_markdeprecated(L, 1, "love.graphics.setNewFont", API_FUNCTION, DEPRECATED_NO_REPLACEMENT, nullptr);
|
||||
|
||||
int ret = w_newFont(L);
|
||||
Font *font = luax_checktype<Font>(L, -1);
|
||||
instance()->setFont(font);
|
||||
|
||||
@@ -262,11 +262,9 @@ std::vector<Window::ContextAttribs> Window::getContextAttribsList() const
|
||||
}
|
||||
}
|
||||
|
||||
if (!preferGLES)
|
||||
{
|
||||
const char *gleshint = SDL_GetHint("LOVE_GRAPHICS_USE_OPENGLES");
|
||||
if (gleshint != nullptr)
|
||||
preferGLES = (gleshint != nullptr && gleshint[0] != '0');
|
||||
}
|
||||
|
||||
// Do we want a debug context?
|
||||
bool debug = love::graphics::isDebugEnabled();
|
||||
|
||||
Reference in New Issue
Block a user