Cross-Platform Modding

From EDukeWiki
Jump to navigation Jump to search

EDuke32 is cross-platform and supports Mac OS X and Linux as well as Windows. A properly made mod can run on any OS supported by EDuke32, but some considerations need to be made.

Checklist

  1. Is my mod in a file that users of other operating systems can open? (No self-extracting files or installer programs. zip, rar, and 7z files are good.)
  2. Did I type all the filenames with the same case as the actual files and directories? All Unix-like operating systems (Unix, Linux, BSD, Mac OS X) are case-sensitive. This means that MyMod.con, MYMOD.CON and mymod.con are all different files. Make sure you type the paths exactly as they appear, or EDuke32 will not find them. It is recommended (and standard practice on these systems) to always use lowercase file and directory names so that there is not confusion. The case of some filenames are hard-coded in EDuke32 and must be typed as follows:
    1. EDUKE.CON
    2. GAME.CON
    3. duke3d.def
    4. duke3d.grp
    5. tiles###.art
    6. DUKE.RTS
  1. Can my mod play nicely with other mods and existing EDuke32 installs? Operating systems like Linux keep their programs, data, and configuration in separate locations and will have only one copy of EDuke32 and a standard directory to load mods from. Therefore, well-behaved mods will keep their files separate from files for other mods and not autoload by default. If you keep your mod together in a zip file, or a directory to be loaded with "-game_dir", you should be okay. Bundling your whole working directory with a full install of EDuke32 and DukePlus, loose EDUKE.CON and duke3d.def files, and a complicated batch file is not acceptable. As simple as it may be for Windows users, it requires a lot of work for users of other operating systems to play your mod. (It may also cause problems for people that have EDuke32 set up a specific way on Windows.)
  2. Has my mod been tested on other Operating Systems? This is not always possible, but it helps to have beta testers on different systems. They can help you answer the previous checks more certainly and also reveal unexpected issues that you can fix.

Playing mods intended for Windows on Unix-like systems

Since it is impractical to force modders on Windows to check for matching case of every file, the easiest way for players on Unix-like systems is to run the mod from a case insensitive file system like FAT32. If you don't have access to such a disk partition, you can create one in a file like in the following, probably Linux-specific, example:

mkdosfs -F 32 -n 'Duke3DMods' -C dukemods.fat 1048576   # create a 1GiB FAT32 filesystem as dukemods.fat file on the local filesystem
mkdir mods
sudo mount dukemods.fat mods/ -o loop -o uid=1000 -o gid=1000   # mount as loopback device. uid and gid should be yours, get them with "id -u" and "id -g"
cd mods && unzip /someplace/YourFavouriteMod.zip && cd YourFavouriteMod && eduke32   # you get the idea
  • The EDuke32 source contains a tool "checkdefs.sh" that can be used to find mismatching case file names in DEFs and, to a certain extent, CONs. It can be found in eduke32/build/src/util.