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.