Skip to content

Commit

Permalink
Drop Lua support
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Manga authored and Felipe Manga committed Dec 16, 2023
1 parent 4cab2a3 commit c2d7773
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 289 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: update
run: sudo apt-get update
- name: boost
run: sudo apt-get install cmake g++ libcurl4-gnutls-dev libfreetype6-dev libgif-dev libgtest-dev libjpeg-dev liblua5.3-dev libpixman-1-dev libpng-dev libsdl2-dev libsdl2-image-dev libtinyxml2-dev libx11-dev libxcursor-dev ninja-build libnode-dev zlib1g-dev libarchive-dev
run: sudo apt-get install cmake g++ libcurl4-gnutls-dev libfreetype6-dev libgif-dev libgtest-dev libjpeg-dev libpixman-1-dev libpng-dev libsdl2-dev libsdl2-image-dev libtinyxml2-dev libx11-dev libxcursor-dev ninja-build libnode-dev zlib1g-dev libarchive-dev
# build project
- name: git
run: git submodule update --init --recursive
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cmakeMacOs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: install deps
run: |
brew install gnutls freetype jpeg googletest lua pixman sdl2 sdl2_image tinyxml2 tinyxml libarchive ninja zlib xmlto dylibbundler
brew install gnutls freetype jpeg googletest pixman sdl2 sdl2_image tinyxml2 tinyxml libarchive ninja zlib xmlto dylibbundler
- name: git
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/cmakeWin32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
mingw-w64-i686-freetype
mingw-w64-i686-giflib
mingw-w64-i686-libjpeg-turbo
mingw-w64-i686-lua
mingw-w64-i686-libpng
mingw-w64-i686-libwebp
mingw-w64-i686-pixman
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: update
run: sudo apt-get update
- name: boost
run: sudo apt-get install cmake g++ libcurl4-gnutls-dev libfreetype6-dev libgif-dev libgtest-dev libjpeg-dev liblua5.3-dev libpixman-1-dev libpng-dev libsdl2-dev libsdl2-image-dev libtinyxml2-dev libarchive-dev libx11-dev libxcursor-dev ninja-build libnode-dev zlib1g-dev
run: sudo apt-get install cmake g++ libcurl4-gnutls-dev libfreetype6-dev libgif-dev libgtest-dev libjpeg-dev libpixman-1-dev libpng-dev libsdl2-dev libsdl2-image-dev libtinyxml2-dev libarchive-dev libx11-dev libxcursor-dev ninja-build libnode-dev zlib1g-dev
# build project
- name: git
run: git submodule update --init --recursive
Expand Down
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,6 @@ include_directories(${GIF_INCLUDE_DIRS})
find_package(JPEG REQUIRED)
include_directories(${JPEG_INCLUDE_DIRS})

# Lua
find_package(Lua)
if(LUA_FOUND)
add_definitions(-DSCRIPT_ENGINE_LUA=1)
include_directories(${LUA_INCLUDE_DIR})
endif()

# v8
find_package(V8)
if(V8_FOUND)
Expand Down
8 changes: 4 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,24 @@ You'll need the following dependencies to compile LibreSprite:

Debian/Ubuntu:

sudo apt-get install cmake g++ libcurl4-gnutls-dev libfreetype6-dev libgif-dev libgtest-dev libjpeg-dev liblua5.4-dev libpixman-1-dev libpng-dev libsdl2-dev libsdl2-image-dev libtinyxml2-dev libnode-dev ninja-build zlib1g-dev libarchive-dev
sudo apt-get install cmake g++ libcurl4-gnutls-dev libfreetype6-dev libgif-dev libgtest-dev libjpeg-dev libpixman-1-dev libpng-dev libsdl2-dev libsdl2-image-dev libtinyxml2-dev libnode-dev ninja-build zlib1g-dev libarchive-dev

Fedora:

sudo dnf install g++ cmake libcurl-devel freetype-devel giflib-devel gtest-devel libjpeg-devel lua-devel pixman-devel libpng-devel SDL2-devel SDL2_image-devel tinyxml2-devel zlib-devel ninja-build nodejs-devel libarchive-devel
sudo dnf install g++ cmake libcurl-devel freetype-devel giflib-devel gtest-devel libjpeg-devel pixman-devel libpng-devel SDL2-devel SDL2_image-devel tinyxml2-devel zlib-devel ninja-build nodejs-devel libarchive-devel

### Windows dependencies

To install the required dependencies with msys2, run the following in mingw32:

pacman -S base-devel mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-make mingw-w64-i686-curl mingw-w64-i686-freetype mingw-w64-i686-giflib mingw-w64-i686-libjpeg-turbo mingw-w64-i686-lua mingw-w64-i686-libpng mingw-w64-i686-libwebp mingw-w64-i686-pixman mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_image mingw-w64-i686-tinyxml2 mingw-w64-i686-v8 mingw-w64-i686-zlib mingw-w64-i686-libarchive
pacman -S base-devel mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-make mingw-w64-i686-curl mingw-w64-i686-freetype mingw-w64-i686-giflib mingw-w64-i686-libjpeg-turbo mingw-w64-i686-libpng mingw-w64-i686-libwebp mingw-w64-i686-pixman mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_image mingw-w64-i686-tinyxml2 mingw-w64-i686-v8 mingw-w64-i686-zlib mingw-w64-i686-libarchive

### MacOS dependencies

On MacOS you will need Mac OS X 11.0 SDK and the corresponding Xcode.
In a terminal, install the dependencies using brew:

brew install gnutls freetype jpeg googletest lua pixman sdl2 sdl2_image tinyxml2 libarchive ninja zlib xmlto dylibbundler
brew install gnutls freetype jpeg googletest pixman sdl2 sdl2_image tinyxml2 libarchive ninja zlib xmlto dylibbundler

## Compiling

Expand Down
14 changes: 14 additions & 0 deletions data/scripts/Random.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// LibreSprite
// Copyright (C) 2024 LibreSprite contributors

const col = app.pixelColor;
const img = app.activeImage;
const h = img.height;
const w = img.width;

for (var y = 0; y < h; ++y) {
for (var x = 0; x < w; ++x) {
const c = Math.random() * 256 >>> 0;
img.putPixel(x, y, col.rgba(c, c, c, 255))
}
}
14 changes: 0 additions & 14 deletions data/scripts/Random.lua

This file was deleted.

1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ target_link_libraries(libresprite ${KEEP_INJECTIONS_BEGIN}
${PNG_LIBRARIES}
${WEBP_LIBRARIES}
${ZLIB_LIBRARIES}
${LUA_LIBRARIES}
${V8_LIBRARIES}
${FREETYPE_LIBRARIES}
${PLATFORM_LIBS})
Expand Down
1 change: 0 additions & 1 deletion src/script/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ endif()
add_library(duktape ${DUKTAPE_DIR}/duktape.c)
add_library(script-lib
duktape/engine.cpp
lua/engine.cpp
v8/engine.cpp
cout_delegate.cpp)

Expand Down
258 changes: 0 additions & 258 deletions src/script/lua/engine.cpp

This file was deleted.

0 comments on commit c2d7773

Please sign in to comment.