Skip to content

Commit

Permalink
remove luv from actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Bauumm committed Oct 24, 2024
1 parent 095b564 commit 390c638
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 143 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ jobs:
mv sqlite3-android/libs/x86/libsqlite3.so love-android/app/src/main/jniLibs/x86
mv sqlite3-android/libs/x86_64/libsqlite3.so love-android/app/src/main/jniLibs/x86_64
- name: Build luv
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
export ANDROID_NDK="$(realpath android-ndk-r21e)"
./extra/android/build_luv.sh
- name: Assemble Debug APK
run: |
export ANDROID_NDK="$(realpath android-ndk-r21e)"
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ jobs:
mkdir lib
clang -shared -fPIC sqlite-amalgamation-3430100/sqlite3.c -o lib/libsqlite3.dylib
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DVIDEO_EXPORT=0

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Install
working-directory: ${{github.workspace}}/build
run: cmake --install .

- name: Create App bundle
run: |
# get love osx binary
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ jobs:
mkdir lib
gcc -shared -fPIC sqlite-amalgamation-3430100/sqlite3.c -o lib/libsqlite3.so
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DVIDEO_EXPORT=0

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Install
working-directory: ${{github.workspace}}/build
run: cmake --install .

- name: Create App image
run: |
# required for app image creation
Expand All @@ -50,7 +40,6 @@ jobs:
chmod +x love-*.AppImage
./love-*.AppImage --appimage-extract
# put libs in their place
cp ../../lib/luv.so squashfs-root/share/games/oh3
cp ../../lib/libsqlite3.so squashfs-root/lib
# remove unneeded parts
rm -r squashfs-root/share/applications/ squashfs-root/share/icons/ squashfs-root/share/lua squashfs-root/share/mime/ squashfs-root/share/pixmaps/ squashfs-root/love.desktop squashfs-root/love.svg
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/exe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
install: >-
git
p7zip
mingw-w64-x86_64-libsodium
mingw-w64-x86_64-libluv
mingw-w64-x86_64-sqlite3
update: true

Expand All @@ -39,9 +37,7 @@ jobs:
mv love-*-win64 oh3
mkdir oh3/lib
cp /mingw64/bin/libsqlite3-0.dll oh3/lib/libsqlite3.dll
cp /mingw64/bin/libluv.dll oh3/lib/luv.dll
cp /mingw64/bin/libwinpthread-1.dll oh3
cp /mingw64/bin/libuv-1.dll oh3
cp -r *.lua assets compat extlibs game game_handler server ui input_schemes oh3
cp extra/windows/launch.bat oh3
Expand Down
30 changes: 0 additions & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,6 @@ cmake_minimum_required(VERSION 3.17)
# Assuming user runs cmake from a build sub folder
set(CMAKE_INSTALL_PREFIX ..)

# ----------------------- CPM ------------------------
set(CPM_DOWNLOAD_VERSION 0.37.0)

if(CPM_SOURCE_CACHE)
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
else()
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
endif()

if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION}))
message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}")
file(DOWNLOAD
https://github.com/TheLartians/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
${CPM_DOWNLOAD_LOCATION}
)
endif()

include(${CPM_DOWNLOAD_LOCATION})

# luv
CPMAddPackage("gh:luvit/luv#1.45.0-0")
install(TARGETS luv LIBRARY DESTINATION lib)

# -------------- video encoding library --------------
option(VIDEO_EXPORT "Compile the library for video export." TRUE)
if(VIDEO_EXPORT)
Expand All @@ -51,8 +26,3 @@ if(VIDEO_EXPORT)

install(TARGETS encode RUNTIME DESTINATION lib)
endif()


# make a custom target with ALL that depends on the imported targets from CPM in order to actually build them
add_custom_target(oh3 ALL)
add_dependencies(oh3 luv)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ A potential rewrite for Open Hexagon by Vittorio Romeo using Love2D.

*(omg it's finally happening)*

You can get the game by downloading an actions artifact by clicking on a build [here](https://github.com/Open-Hexagon/oh3/actions).

## External dependencies
Apart from the pure lua dependencies that are present in the repository, the game relies on:
- Love2D 12.0
> --> download it from actions artifact by clicking on a build <a href="https://github.com/Open-Hexagon/oh3/actions">here</a>
- SQLite
- Luv
- libsodium (for server)
- ffmpeg (for video export)

Expand Down
75 changes: 0 additions & 75 deletions extra/android/build_luv.sh

This file was deleted.

6 changes: 1 addition & 5 deletions main.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
if love.system.getOS() == "Android" then
-- require can't find it on android
package.preload.luv = package.loadlib("libluv.so", "luaopen_luv")
end
local log = require("log")(...)
local async = require("async")
local args = require("args")
Expand Down Expand Up @@ -75,7 +71,7 @@ local main = async(function()
-- make sure no level accesses malicious files via symlinks
love.filesystem.setSymlinksEnabled(false)

-- find luasodium and luv
-- find libs
add_require_path("extlibs/?.lua")
add_c_require_path("lib/??")

Expand Down

0 comments on commit 390c638

Please sign in to comment.