diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2ae9811f..c9f0f7ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,11 +5,13 @@ on: paths: - 'src/**' - 'build-*/**' + - 'CMakeLists.txt' - '.github/workflows/**.yml' pull_request: paths: - 'src/**' - 'build-*/**' + - 'CMakeLists.txt' - '.github/workflows/**.yml' jobs: @@ -42,8 +44,10 @@ jobs: install: >- base-devel mingw-w64-x86_64-toolchain - autotools + mingw-w64-x86_64-cmake + mingw-w64-x86_64-ninja mingw-w64-x86_64-curl + mingw-w64-x86_64-glew mingw-w64-x86_64-gtk3 mingw-w64-x86_64-libpng mingw-w64-x86_64-libjpeg-turbo @@ -56,21 +60,21 @@ jobs: - name: Build run: | - cd build-windows/ - ./autogen.sh - ./configure - ./go --silent --release + mkdir build + cd build + cmake .. -G Ninja + ninja -j4 - name: Bundle together run: | - cd build-windows/ - bash make_release.sh + cd build + bash ../packaging/windows_release.sh - name: Upload output as artifact uses: actions/upload-artifact@v3 with: name: principia-setup.exe - path: build-windows/principia-setup.exe + path: build/principia-setup.exe android: runs-on: ubuntu-20.04 diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f7663a7..38f7d695 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,11 +84,7 @@ if(NOT SCREENSHOT_BUILD) ${GLEW_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS}) - if(WIN32) # TODO: Fix Luasocket building on Windows - set(USE_LUASOCKET false) - else() - option(USE_LUASOCKET "Build with Luasocket support" TRUE) - endif() + option(USE_LUASOCKET "Build with Luasocket support" TRUE) else() set(USE_LUASOCKET false) endif() @@ -98,10 +94,10 @@ if(USE_LUASOCKET) set(LUASOCKET_FLAGS "-DBUILD_LUASOCKET") if(WIN32) - set(LUAROCKS_PLAT_SRC src/luasocket/wsocket.c) + set(LUASOCKET_PLAT_SRC src/luasocket/wsocket.c) else() set(LUASOCKET_FLAGS "${LUASOCKET_FLAGS} -DLUASOCKET_INET_PTON") - set(LUAROCKS_PLAT_SRC + set(LUASOCKET_PLAT_SRC src/luasocket/usocket.c src/luasocket/unix.c) endif() @@ -117,7 +113,8 @@ if(USE_LUASOCKET) src/luasocket/select.c src/luasocket/tcp.c src/luasocket/timeout.c - src/luasocket/udp.c) + src/luasocket/udp.c + ${LUASOCKET_PLAT_SRC}) endif() include_directories(src/tms/backends/${TMS_BACKEND}/)