Skip to content

Latest commit

 

History

History
113 lines (84 loc) · 2.6 KB

BUILDING.md

File metadata and controls

113 lines (84 loc) · 2.6 KB

Windows

  1. Get MinGW installer, and install the following with the package manager:
  • gcc
  • lua
  • sdl2
  1. Install msys
  2. Add mingw/bin and msys/bin to system path
  3. Open msys/bin/msys to open command line
./build.sh
./play.sh

Mac OS X

  • Install Command Line Tools for XCode (you need an apple developer account, free)

  • Install Lua 5.2

    curl -R -O http://www.lua.org/ftp/lua-5.2.0.tar.gz
    tar zxf lua-5.2.0.tar.gz
    cd lua-5.2.0
    make macosx test
    sudo make install
  • Install SDL2

    • Download
    • Copy SDL2.Framework to /Library/Frameworks/
./build.sh
./play.sh

Creating the Mac Bundle

I don't actually understand how Mac builds work currently. I am piggiebacking off TyrQuake's Makefile "bundles" task with some workarounds to compensate for two things:

  • The makefile expects 32bit and 64bit Lua installations to be available (I only know how to install one at a time)
  • The Launcher isn't trying to use its bundled SDL2.Framework folder

So these are the wonky, unautomated steps to build the mac bundle:

  1. go to lua 5.2 folder (from previous section) and modify src/Makefile lines 22-23 to force a 32bit build.

    MYCFLAGS= -arch i386
    MYLDFLAGS= -arch i386
    
  2. build and install lua (from previous section)

  3. go back to this project's engine/ directory, and run make bundles

  4. it should succeed with the 32bit build, but fail when linking the 64bit build.

  5. Rebuild/install lua with 64bit, with the following edits:

    MYCFLAGS= -arch x86_64
    MYLDFLAGS= -arch x86_64
    
  6. run make bundles again.

  7. It should succeed with the 64bit, and fail when reaching the opengl build (that's okay)

  8. The Bundle will be in dist/osx/Tyr-Quake.app

  9. Run the following to allow Launcher to find its bundled SDL2 framework

    install_name_tool -add_rpath @executable_path/../Frameworks dist/osx/Tyr-Quake.app/Contents/MacOS/Launcher
    
  10. Rename Tyr-Quake.app to Blinky.app

Linux

  • Install Lua 5.2

    • On Debian or Ubuntu:

      sudo apt-get install liblua5.2-dev
    • Otherwise install from source:

      curl -R -O http://www.lua.org/ftp/lua-5.2.0.tar.gz
      tar zxf lua-5.2.0.tar.gz
      cd lua-5.2.0
      make linux test
      sudo make install
  • Install SDL 2

    sudo apt-get install libsdl2-dev
  • Install Xxf86dga

    sudo apt-get install libxxf86dga-dev
./build.sh
./play.sh