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

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.