Skip to content

Commit cf9dee9

Browse files
ZhilkinSergkevingranade
authored andcommitted
Get rid of Lua modding (CleverRaven#28572)
* Get rid of Lua modding
1 parent 46e2ec7 commit cf9dee9

File tree

98 files changed

+208
-7931
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+208
-7931
lines changed

.appveyor.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ cache:
1919
- 'c:\tools\vcpkg\installed'
2020
install:
2121
# Install dependency packages
22-
- cmd: vcpkg --triplet %PLATFORM%-windows-static install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext lua
23-
# Add LUA binary folder to PATH
24-
- cmd: set PATH=c:\tools\vcpkg\installed\%PLATFORM%-windows-static\tools\lua;%PATH%
25-
# Report LUA binary version
26-
- cmd: lua.exe -v
22+
- cmd: vcpkg --triplet %PLATFORM%-windows-static install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext
2723
build:
2824
parallel: true
2925
project: /msvc-full-features/Cataclysm-vcpkg-static.sln

.gitattributes

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*.cpp text
1010
*.h text
1111
*.json text
12-
*.lua text
1312
*.md text
1413
*.py text
1514
*.rc text

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
/obj/
2525
/objwin/
2626
/save/
27-
/src/lua/catabindings.cpp
2827
/src/version.h
2928
/sound/
3029
/templates/

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
sources: [*apt_sources, llvm-toolchain-trusty-6.0]
7474

7575
# macOS Tiles
76-
- env: CLANG=clang++ NATIVE=osx OSX_MIN=10.13 TILES=1 SOUND=1 LUA=1
76+
- env: CLANG=clang++ NATIVE=osx OSX_MIN=10.13 TILES=1 SOUND=1
7777
os: osx
7878
osx_image: xcode10.1
7979
compiler: clang

CMakeLists.txt

+2-27
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ SET(CMAKE_MODULE_PATH
99
)
1010

1111
# Build options
12-
option(LUA "Lua support (required for some mods)." "OFF")
1312
option(TILES "Build graphical tileset version." "OFF")
1413
option(CURSES "Build curses version." "ON" )
1514
option(SOUND "Support for in-game sounds & music." "OFF")
@@ -18,9 +17,8 @@ option(USE_HOME_DIR "Use user's home directory for save files." "ON" )
1817
option(LOCALIZE "Support for language localizations. Also enable UTF support." "ON" )
1918
option(LANGUAGES "Compile localization files for specified languages." "" )
2019
option(DYNAMIC_LINKING "Use dynamic linking. Or use static to remove MinGW dependency instead." "ON")
21-
option(LUA_BINARY "Lua binary name or path. You can try to use luajit for extra speed." "")
2220
option(GIT_BINARY "Git binary name or path." "")
23-
OPTION(PREFIX "Location of Data,GFX, & Lua directories" "")
21+
OPTION(PREFIX "Location of Data & GFX directories" "")
2422

2523
include(CTest)
2624

@@ -140,10 +138,6 @@ ENDIF (${CMAKE_SYSTEM_NAME} MATCHES Windows)
140138
MESSAGE(STATUS "${PROJECT_NAME} build options --\n")
141139

142140
# Preset variables
143-
IF (NOT LUA_BINARY)
144-
SET (LUA_BINARY "lua")
145-
ENDIF (NOT LUA_BINARY)
146-
147141
IF(NOT LANGUAGES)
148142
SET (LANGUAGES de es_AR es_ES fr it_IT ja ko pt_BR ru zh_CN zh_TW)
149143
ENDIF(NOT LANGUAGES)
@@ -192,16 +186,12 @@ ELSE (CMAKE_BUILD_TYPE STREQUAL Debug)
192186
MESSAGE(STATUS "PIXMAPS_UNITY_ENTRY_PATH : ${PIXMAPS_UNITY_ENTRY_PATH}")
193187
MESSAGE(STATUS "MANPAGE_ENTRY_PATH : ${MANPAGE_ENTRY_PATH}\n")
194188
ADD_DEFINITIONS(-DRELEASE)
195-
# Use PREFIX as storage of data,gfx,lua etc.. Usefull only on *nix OS.
189+
# Use PREFIX as storage of data,gfx, etc.. Usefull only on *nix OS.
196190
IF (PREFIX AND NOT WIN32)
197191
ADD_DEFINITIONS(-DDATA_DIR_PREFIX)
198192
ENDIF (PREFIX AND NOT WIN32)
199193
ENDIF (CMAKE_BUILD_TYPE STREQUAL Debug)
200194

201-
MESSAGE(STATUS "LUA : ${LUA}")
202-
IF (LUA)
203-
MESSAGE(STATUS "LUA_BINARY : ${LUA_BINARY}")
204-
ENDIF (LUA)
205195
MESSAGE(STATUS "GIT_BINARY : ${GIT_EXECUTABLE}")
206196
MESSAGE(STATUS "DYNAMIC_LINKING : ${DYNAMIC_LINKING}")
207197
MESSAGE(STATUS "TILES : ${TILES}")
@@ -309,16 +299,6 @@ IF(SOUND)
309299
ENDIF(NOT SDL2_MIXER_FOUND)
310300
ENDIF(SOUND)
311301

312-
IF(LUA)
313-
FIND_PACKAGE(Lua)
314-
IF(NOT LUA_FOUND)
315-
MESSAGE(FATAL_ERROR
316-
"You need the Lua development library to be able to compile with Lua support.\nSee INSTALL file for details and more info\n"
317-
)
318-
ENDIF(NOT LUA_FOUND)
319-
ADD_DEFINITIONS(-DLUA)
320-
ENDIF(LUA)
321-
322302
IF(BACKTRACE)
323303
ADD_DEFINITIONS(-DBACKTRACE)
324304
ENDIF(BACKTRACE)
@@ -347,11 +327,6 @@ IF(USE_HOME_DIR)
347327
ADD_DEFINITIONS(-DUSE_HOME_DIR)
348328
ENDIF(USE_HOME_DIR)
349329

350-
IF(LUA)
351-
add_subdirectory(lua)
352-
add_subdirectory(src/lua)
353-
ENDIF(LUA)
354-
355330
add_subdirectory(src)
356331
add_subdirectory(data)
357332
if (NOT MSVC)

CMakeModules/FindLua.cmake

-117
This file was deleted.

COMPILING-CMAKE.md

+3-20
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ order to build CataclysmDDA:
3131
* `zlib`
3232
* `bzip2`
3333
* Optional
34-
* `lua51`
3534
* `gettext`
3635
* Curses
3736
* `ncurses`
@@ -68,7 +67,6 @@ Obtain packages specified above with your system package manager.
6867
pacman -S mingw-w64-i686-toolchain msys/git \
6968
mingw-w64-i686-cmake \
7069
mingw-w64-i686-SDL2_{image,mixer,ttf} \
71-
mingw-w64-i686-lua51 \
7270
ncurses-devel \
7371
gettext-devel
7472
```
@@ -82,7 +80,6 @@ Obtain packages specified above with your system package manager.
8280
pacman -S mingw-w64-x86_64-toolchain msys/git \
8381
mingw-w64-x86_64-cmake \
8482
mingw-w64-x86_64-SDL2_{image,mixer,ttf} \
85-
mingw-w64-x86_64-lua51 \
8683
ncurses-devel \
8784
gettext-devel
8885
```
@@ -178,9 +175,6 @@ The above example creates a build directory inside the source directory, but tha
178175
* `libintl-8.dll`
179176
* `libiconv-2.dll`
180177

181-
* LUA deps:
182-
* `lua51.dll`
183-
184178
* TILES deps:
185179
* `SDL2.dll`
186180
* `SDL2_ttf.dll`
@@ -216,7 +210,7 @@ The above example creates a build directory inside the source directory, but tha
216210
CMake can generate `.sln` and `.vcxproj` files used either by Visual Studio itself or by MSBuild command line compiler (if you don't want
217211
a full fledged IDE) and have more "native" binaries than what MSYS/Cygwin can provide.
218212

219-
At the moment only a limited combination of options is supported (tiles only, no lua, no localizations, no backtrace).
213+
At the moment only a limited combination of options is supported (tiles only, no localizations, no backtrace).
220214

221215
Get the tools:
222216
* CMake from the official site - https://cmake.org/download/.
@@ -229,7 +223,6 @@ Get the required libraries:
229223
* `SDL2_image` - https://www.libsdl.org/projects/SDL_image/
230224
* `SDL2_mixer` (optional, for sound support) - https://www.libsdl.org/projects/SDL_mixer/
231225
* Unsupported (and unused in the following instructions) optional libs:
232-
* `Lua` - http://luabinaries.sourceforge.net/
233226
* `gettext`/`libintl` - http://gnuwin32.sourceforge.net/packages/gettext.htm
234227
* `ncurses` - ???
235228

@@ -315,11 +308,6 @@ Run the game. Should work.
315308
Support for in-game sounds & music.
316309

317310

318-
* LUA=`<boolean>`
319-
320-
This enables Lua support. Needed only for full-fledged mods.
321-
322-
323311
* USE_HOME_DIR=`<boolean>`
324312

325313
Use user's home directory for save files.
@@ -342,16 +330,11 @@ Run the game. Should work.
342330
-DLANGUAGES="cs;de;el;es_AR;es_ES"
343331
```
344332

345-
* LUA_BINARY=`<str>`
346-
347-
Override default Lua binary name or path. You can try to use `luajit` for extra speed.
348-
349-
350333
* GIT_BINARY=`<str>`
351334

352335
Override default Git binary name or path.
353336

354-
So a CMake command for building Cataclysm-DDA in release mode with tiles, sound and lua support will look as follows, provided it is run in build directory located in the project.
337+
So a CMake command for building Cataclysm-DDA in release mode with tiles and sound support will look as follows, provided it is run in build directory located in the project.
355338
```
356-
cmake ../ -DCMAKE_BUILD_TYPE=Release -DTILES=ON -DSOUND=ON -DLUA=ON
339+
cmake ../ -DCMAKE_BUILD_TYPE=Release -DTILES=ON -DSOUND=ON
357340
```

COMPILING-MSYS.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pacman -Su
3939
4. Install packages required for compilation with:
4040

4141
```bash
42-
pacman -S git git-extras-git make mingw-w64-x86_64-{astyle,ccache,gcc,libmad,libwebp,lua,ncurses,pkg-config,SDL2} mingw-w64-x86_64-SDL2_{image,mixer,ttf}
42+
pacman -S git git-extras-git make mingw-w64-x86_64-{astyle,ccache,gcc,libmad,libwebp,ncurses,pkg-config,SDL2} mingw-w64-x86_64-SDL2_{image,mixer,ttf}
4343
```
4444

4545
5. Update paths in system-wide profile file (e.g. `C:\msys64\etc\profile`) as following:
@@ -88,10 +88,10 @@ cd Cataclysm-DDA
8888
2. Compile with following command line:
8989

9090
```bash
91-
make CCACHE=1 RELEASE=1 MSYS2=1 DYNAMIC_LINKING=1 LUA=1 SDL=1 TILES=1 SOUND=1 LOCALIZE=1 LANGUAGES=all LINTJSON=0 ASTYLE=0 RUNTESTS=0
91+
make CCACHE=1 RELEASE=1 MSYS2=1 DYNAMIC_LINKING=1 SDL=1 TILES=1 SOUND=1 LOCALIZE=1 LANGUAGES=all LINTJSON=0 ASTYLE=0 RUNTESTS=0
9292
```
9393

94-
**Note**: This will compile release version with Lua, Sound and Tiles support and all localization languages, skipping checks and tests and using ccache for faster build. You can use other switches, but `MSYS2=1`, `DYNAMIC_LINKING=1` and probably `RELEASE=1` are required to compile without issues.
94+
**Note**: This will compile release version with Sound and Tiles support and all localization languages, skipping checks and tests and using ccache for faster build. You can use other switches, but `MSYS2=1`, `DYNAMIC_LINKING=1` and probably `RELEASE=1` are required to compile without issues.
9595

9696
## Running:
9797

COMPILING-VS-VCPKG.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,26 @@ vcpkg integrate install
3434
#### install 64 bit dependencies:
3535

3636
```cmd
37-
vcpkg --triplet x64-windows install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext lua
37+
vcpkg --triplet x64-windows install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext
3838
```
3939

4040
or (if you want to build statically linked executable)
4141

4242
```cmd
43-
vcpkg --triplet x64-windows-static install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext lua
43+
vcpkg --triplet x64-windows-static install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext
4444
```
4545

4646

4747
#### install32 bit dependencies:
4848

4949
```cmd
50-
vcpkg --triplet x86-windows install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext lua
50+
vcpkg --triplet x86-windows install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext
5151
```
5252

5353
or (if you want to build statically linked executable)
5454

5555
```cmd
56-
vcpkg --triplet x86-windows-static install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext lua
56+
vcpkg --triplet x86-windows-static install sdl2 sdl2-image sdl2-mixer sdl2-ttf gettext
5757
```
5858

5959
#### upgrade all dependencies:
@@ -75,4 +75,4 @@ cd Cataclysm-DDA
7575

7676
2. Open one of provided solutions (`msvc-full-features\Cataclysm-vcpkg.sln` for dynamically linked executable or `msvc-full-features\Cataclysm-vcpkg-static.sln` for statically linked executable) in `Visual Studio`, select configuration (`Release` or `Debug`) an platform (`x64` or `x86`) and build it.
7777

78-
**Note**: This will compile release version with Lua, Sound, Tiles and Localization support (language files won't be automatically compiled).
78+
**Note**: This will compile release version with Sound, Tiles and Localization support (language files won't be automatically compiled).

0 commit comments

Comments
 (0)