bzt a17c945e0a Fixed dynamic linking issues under Fedora 1 year ago
..
SDL2 c2b1368a43 Initial release 2 years ago
SDL2_mixer c2b1368a43 Initial release 2 years ago
TinyGL 2cceed00fb Fixed all missing Makefiles 1 year ago
freetype2 2cceed00fb Fixed all missing Makefiles 1 year ago
libmpg123 c2b1368a43 Initial release 2 years ago
libpng c2b1368a43 Initial release 2 years ago
libtheora c2b1368a43 Initial release 2 years ago
libvorbis c2b1368a43 Initial release 2 years ago
libwebp 2cceed00fb Fixed all missing Makefiles 1 year ago
libxmp-lite c2b1368a43 Initial release 2 years ago
lictool 2cceed00fb Fixed all missing Makefiles 1 year ago
mbedtls 2cceed00fb Fixed all missing Makefiles 1 year ago
misc 983e3060f5 Added altitude 2 years ago
ogg c2b1368a43 Initial release 2 years ago
zstd 2cceed00fb Fixed all missing Makefiles 1 year ago
Makefile a17c945e0a Fixed dynamic linking issues under Fedora 1 year ago
README.md c2b1368a43 Initial release 2 years ago
about.c c2b1368a43 Initial release 2 years ago
actions.c d4a44930ec Minor fixes 2 years ago
alerts.c 71670fa73f Added WebP support 2 years ago
assimp.h c2b1368a43 Initial release 2 years ago
attrs.c d2e7acbd11 More bytecode compiler stuff 2 years ago
bin2h.c c2b1368a43 Initial release 2 years ago
chars.c 504a954c20 Minor fixes on character options export 2 years ago
choosers.c 8f80b2c60c Minor UI bugfix and more docs 2 years ago
crafts.c 5dbf2252e6 Crafts 2 years ago
credits.c fa0a0e8d68 Many many minor fixes 2 years ago
cutscn.c a17c945e0a Fixed dynamic linking issues under Fedora 1 year ago
dialogs.c a17c945e0a Fixed dynamic linking issues under Fedora 1 year ago
elements.c a17c945e0a Fixed dynamic linking issues under Fedora 1 year ago
fileops.c 71670fa73f Added WebP support 2 years ago
fonts.c e689a7c3f4 Minor fixes 2 years ago
hud.c 740a3e6c77 Match previews with player 2 years ago
image.c 71670fa73f Added WebP support 2 years ago
lang.h 98ee0f3878 Added altitude 2 years ago
lang_de.h 98ee0f3878 Added altitude 2 years ago
lang_en.h 98ee0f3878 Added altitude 2 years ago
lang_es.h 98ee0f3878 Added altitude 2 years ago
lang_fr.h 98ee0f3878 Added altitude 2 years ago
lang_hu.h 98ee0f3878 Added altitude 2 years ago
lang_ja.h 98ee0f3878 Added altitude 2 years ago
lang_pt.h 98ee0f3878 Added altitude 2 years ago
lang_ru.h 98ee0f3878 Added altitude 2 years ago
lang_zh.h 98ee0f3878 Added altitude 2 years ago
libSDL.supp c2b1368a43 Initial release 2 years ago
libsfn.c 27f7483a1e Minor fixes and user's portrait in dialogs 2 years ago
libsfn.h c2b1368a43 Initial release 2 years ago
license.c c2b1368a43 Initial release 2 years ago
loadproj.c c2b1368a43 Initial release 2 years ago
m3d.h c2b1368a43 Initial release 2 years ago
m3dobj.h c2b1368a43 Initial release 2 years ago
main.c 167243dbc8 Game's website option, new translations and minor fixes 2 years ago
main.h 07d29688f9 Hungarian manual and minor fixes 2 years ago
mainmenu.c 740a3e6c77 Match previews with player 2 years ago
maps.c 22c1433d54 Make preview look the same as tngp 2 years ago
media.c a17c945e0a Fixed dynamic linking issues under Fedora 1 year ago
newproj.c 82334f305a Some minor fixes 2 years ago
newsprite.c 07d29688f9 Hungarian manual and minor fixes 2 years ago
newsprite3d.c c2b1368a43 Initial release 2 years ago
npcs.c 39d653a1aa Fixed an npc serialization bug 2 years ago
objects.c 43e57afe61 Fix projectile sprite category 2 years ago
ogg.c c2b1368a43 Initial release 2 years ago
palette.c ae2ac56d29 Updates 2 years ago
project.c a0a7f6978f Added price category 2 years ago
project.h 2c3abcd3d4 Merged object and tile sprites 2 years ago
quests.c 740a3e6c77 Match previews with player 2 years ago
saveext.c c2b1368a43 Initial release 2 years ago
spawners.c 2c3abcd3d4 Merged object and tile sprites 2 years ago
spr.c 167243dbc8 Game's website option, new translations and minor fixes 2 years ago
sprgen.c 27f7483a1e Minor fixes and user's portrait in dialogs 2 years ago
sprites.c 2c3abcd3d4 Merged object and tile sprites 2 years ago
ssfn.h 71670fa73f Added WebP support 2 years ago
startup.c d4a44930ec Minor fixes 2 years ago
stb_image.h ae2ac56d29 Updates 2 years ago
theora.c fa0a0e8d68 Many many minor fixes 2 years ago
theora.h c2b1368a43 Initial release 2 years ago
tiles.c 5afced5d9b More on script bytecode 2 years ago
tng.c b0f199833b Added sprites per layer to header 2 years ago
tng.h b0f199833b Added sprites per layer to header 2 years ago
translate.c d827f6fbdd More fixes and failsafes 2 years ago
ui.c 27f7483a1e Minor fixes and user's portrait in dialogs 2 years ago
ui.h 983e3060f5 Added altitude 2 years ago
ui_cmd.c 983e3060f5 Added altitude 2 years ago
ui_wgt.c 7dc1cc154b Made file format licensing terms simpler 2 years ago
zlib.c c2b1368a43 Initial release 2 years ago
zlib.h c2b1368a43 Initial release 2 years ago

README.md

TirNanoG Editor

Source of TirNanoG Editor, the tnge executable. Also contains stripped down version of libraries it depends on.

Compilation

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.

Linux

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.

Statically

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.

Dynamically

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.

Windows

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.

Statically

$ 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.

Dynamically

Use MSYS2's pacman to install the dependencies (listed above in Linux's Dynamically section), then

$ USE_DYNLIBS=1 make all package

Dynamically with official SDL2

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

MacOS

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.