Skip to content

Commit

Permalink
haha oops (fix luasocket compilation)
Browse files Browse the repository at this point in the history
  • Loading branch information
rollerozxa committed Sep 4, 2023
1 parent 9a33311 commit 8eb0066
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ on:
paths:
- 'src/**'
- 'build-*/**'
- 'CMakeLists.txt'
- '.github/workflows/**.yml'
pull_request:
paths:
- 'src/**'
- 'build-*/**'
- 'CMakeLists.txt'
- '.github/workflows/**.yml'

jobs:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
13 changes: 5 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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}/)
Expand Down

0 comments on commit 8eb0066

Please sign in to comment.