|
1 year ago | |
---|---|---|
.. | ||
SDL2 | 2 years ago | |
SDL2_mixer | 2 years ago | |
TinyGL | 1 year ago | |
freetype2 | 1 year ago | |
libmpg123 | 2 years ago | |
libpng | 2 years ago | |
libtheora | 2 years ago | |
libvorbis | 2 years ago | |
libwebp | 1 year ago | |
libxmp-lite | 2 years ago | |
lictool | 1 year ago | |
mbedtls | 1 year ago | |
misc | 2 years ago | |
ogg | 2 years ago | |
zstd | 1 year ago | |
Makefile | 1 year ago | |
README.md | 2 years ago | |
about.c | 2 years ago | |
actions.c | 2 years ago | |
alerts.c | 2 years ago | |
assimp.h | 2 years ago | |
attrs.c | 2 years ago | |
bin2h.c | 2 years ago | |
chars.c | 2 years ago | |
choosers.c | 2 years ago | |
crafts.c | 2 years ago | |
credits.c | 2 years ago | |
cutscn.c | 1 year ago | |
dialogs.c | 1 year ago | |
elements.c | 1 year ago | |
fileops.c | 2 years ago | |
fonts.c | 2 years ago | |
hud.c | 2 years ago | |
image.c | 2 years ago | |
lang.h | 2 years ago | |
lang_de.h | 2 years ago | |
lang_en.h | 2 years ago | |
lang_es.h | 2 years ago | |
lang_fr.h | 2 years ago | |
lang_hu.h | 2 years ago | |
lang_ja.h | 2 years ago | |
lang_pt.h | 2 years ago | |
lang_ru.h | 2 years ago | |
lang_zh.h | 2 years ago | |
libSDL.supp | 2 years ago | |
libsfn.c | 2 years ago | |
libsfn.h | 2 years ago | |
license.c | 2 years ago | |
loadproj.c | 2 years ago | |
m3d.h | 2 years ago | |
m3dobj.h | 2 years ago | |
main.c | 2 years ago | |
main.h | 2 years ago | |
mainmenu.c | 2 years ago | |
maps.c | 2 years ago | |
media.c | 1 year ago | |
newproj.c | 2 years ago | |
newsprite.c | 2 years ago | |
newsprite3d.c | 2 years ago | |
npcs.c | 2 years ago | |
objects.c | 2 years ago | |
ogg.c | 2 years ago | |
palette.c | 2 years ago | |
project.c | 2 years ago | |
project.h | 2 years ago | |
quests.c | 2 years ago | |
saveext.c | 2 years ago | |
spawners.c | 2 years ago | |
spr.c | 2 years ago | |
sprgen.c | 2 years ago | |
sprites.c | 2 years ago | |
ssfn.h | 2 years ago | |
startup.c | 2 years ago | |
stb_image.h | 2 years ago | |
theora.c | 2 years ago | |
theora.h | 2 years ago | |
tiles.c | 2 years ago | |
tng.c | 2 years ago | |
tng.h | 2 years ago | |
translate.c | 2 years ago | |
ui.c | 2 years ago | |
ui.h | 2 years ago | |
ui_cmd.c | 2 years ago | |
ui_wgt.c | 2 years ago | |
zlib.c | 2 years ago | |
zlib.h | 2 years ago |
Source of TirNanoG Editor, the tnge
executable. Also contains stripped down version of libraries it depends on.
You have multiple options on how to compile. You can compile everything statically and produce a dependency-free, single portable executable.
Or you can choose to compile dynamically, in which case the final executable will be much smaller, however it will require certain .so files and DLLs to be installed on the end user's computer in order to run.
Makefile rules: clean
will delete all objects for tnge, but won't touch the libraries. distclean
will purge all
binaries, even in dependencies. all
will compile, and finally package
will create a distributable archive file.
For Linux, I'd recommend using the dynamic linking method, as Linux distros have a package manager which can install the dependencies easily. Keep in mind, you might run into problems if your distro does not ship sufficiently up-to-date versions of the libraries.
As simple as:
$ make all package
NOTE: I had to remove wayland support from the static SDL2, because it did not compile due to a bug in wayland scanner and
xml2c converter (wait, what?), it wasn't SDL's fault. If wayland f*cked up tool gets fixed, remove --disable-video-wayland
from the Makefile.
Luckily you can compile everything statically in from the source tree, except SDL. To do this, use
$ USE_DYNSDL=1 make all package
This linking option also has a rule to create a debian package instead of a tarball:
$ USE_DYNSDL=1 make all deb
Creating a deb file uses only the standard GNU toolchain, no third party tools required.
Using your repo's package management system, install development versions of the dependencies. They are probably called:
libsdl2-dev
, libsdl2-mixer-dev
, libvorbis-dev
, libtheora-dev
, libpng-dev
, libfreetype2-dev
, libmpg123-dev
,
libzstd-dev
(actual names vary on distros).
Then
$ USE_DYNLIBS=1 make all package
NOTE: your distro could ship outdated versions of these libraries, and (in lack of strict configuration for just the necessary features only) they might have additional dependencies too! Most notably the default SDL installation has lots of further dependencies, and the shared library version of SDL2_mixer does not support Mix_MusicDuration, so there'll be no progressbar when you import audio files.
Requires MSYS2 and MinGW. Under Windows, where there's no package managment at all, I'd recommend static linking to create a portable executable. Note that dynamic linking is NOT recommended.
$ make all package
Just like under Linux, you can compile everything statically in, except SDL. To do that, use
$ USE_DYNSDL=1 make all package
NOTE: the linker will complain about resources, something like "duplicate leaf: type: 10 (VERSION)", this is okay, it
happens because all libraries try to set their own version info. Don't care, tnge.exe
will be generated just fine.
Use MSYS2's pacman to install the dependencies (listed above in Linux's Dynamically section), then
$ USE_DYNLIBS=1 make all package
Just for completeness, this should not be needed, as MSYS2's pacman should provide the correct version of SDL2.
Download the mingw version of the SDL2 library from the official repo, libsdl.org.
After unpack, it should contain a i686-w64-mingw32
subdirectory. Specify the directory where you have extracted:
$ USE_DYNLIBS=1 USE_MINGWSDL=../../SDL2-mingw make all package
Known to have issues with compiling the libraries, officially not supported, but dynamically linking with the SDL2 framework
from its official repo, libsdl.org should work (download the dmg under section development
and extract it to /Library/Frameworks
). Everything else must be statically compiled in, if you have issues with this, let me
know.
$ USE_DYNSDL=1 make all package
Feedback and patches are welcome.