Topic: Premake4 Build Scripts

I started creating Premake4 build scripts, basically because there easier to maintain and use.
And I really dislike Scons smile

Note: You can get premake4 from http://industriousone.com/premake

Here is what I have so far.


Inside MCore dir create a premake4.lua script paste the following script inside

-- A solution contains projects, and defines the available configurations
solution "Maratis"
   configurations { "Release", "Debug" }
 
   -- A project defines one build target
   project "MCore"
      kind "SharedLib"
      language "C++"
      files { "Includes/**.h", "Sources/**.cpp" }
 
       configuration "Release"
         defines { "NDEBUG" }
         flags { "Optimize" } 
         
      configuration "Debug"
         defines { "DEBUG" }
         flags { "Symbols" }

Inside MEngine dir create a premake4.lua script paste the following script inside

-- A solution contains projects, and defines the available configurations
solution "Maratis"
   configurations { "Release", "Debug" }
 
   -- A project defines one build target
   project "MEngine"
      kind "SharedLib"
      language "C++"
      files { "Includes/**.h", "Sources/**.cpp" }
      includedirs { "../MCore/Includes" }
      libdirs { "libs", "../MCore" }
      links { "MCore" }
      
       configuration "Release"
         defines { "NDEBUG" }
         flags { "Optimize" } 
         
      configuration "Debug"
         defines { "DEBUG" }
         flags { "Symbols" }

Inside MGui dir create a premake4.lua script paste the following script inside
Note: I need to figure out how to automatically exclude platform specific file... Like
the WIN32 dir's when building on Linux

-- A solution contains projects, and defines the available configurations
solution "Maratis"
   configurations { "Release", "Debug" }
 
   -- A project defines one build target
   project "MGui"
      kind "SharedLib"
      language "C++"
      includedirs { "../MCore/Includes", "../../Maratis/Common"}
      excludes { "Includes/WIN32/**.h", "Sources/WIN32/**.cpp" }
      files { "Includes/**.h", "Sources/**.cpp"}
      links { "GL", "Xxf86vm", "X11" }
      
       configuration "Release"
         defines { "NDEBUG" }
         flags { "Optimize" } 
         
      configuration "Debug"
         defines { "DEBUG" }
         flags { "Symbols" }

Inside MSDK dir create a premake4.lua script and paste the following script inside

-- A solution contains projects, and defines the available configurations
solution "Maratis"
      include "MCore/"
      include "MEngine/"
      include "MGui/"

Now while in the MSDK dir type...

premake4 gmake

and then

make

The only strange thing that I am seeing is that the shared libs built with the Scons scripts are twice the size than the ones built with my premake4 scripts. But when I ldd each shared lib and compare with the Scons ones they link to they exact same librarys. Makes me think that Scons is building with Debug symbols. If so that would kill Maratis performance drastically.


I am still working on premake4 scripts for  the Rest of Maratis I can test on Linux and Win7 but you Mac folks are out of luck sad

Last edited by zester (2012-01-14 06:05:41)

Re: Premake4 Build Scripts

Yahh there is something defiantly funny with those Scons built shared libs.

I just replaced the Scons libMEngine.so with the one my premake4 script built

My premake4 libMEngine.so works perfectly so I am guessing Scons is building in Debug mode.



For the rest of you if you want to try them on a different platform

Just:

For Linux:
premake4 gmake

For Mac:
premake4 xcode3

For Windows &  Visual Studio 2010
premake4 vs2010


------------------------------------------------------------------------------

codeblocks      Generate Code::Blocks project files
codelite           Generate CodeLite project files
gmake             Generate GNU makefiles for POSIX, MinGW, and Cygwin
vs2002            Generate Microsoft Visual Studio 2002 project files
vs2003            Generate Microsoft Visual Studio 2003 project files
vs2005            Generate Microsoft Visual Studio 2005 project files
vs2008            Generate Microsoft Visual Studio 2008 project files
vs2010            Generate Visual Studio 2010 project files (experimental)
xcode3            Generate Apple Xcode 3 project files (experimental)







Once I have everything moved over to premake ill start moving the scripting from generic lua to luajit.
Then scripting with lua will almost be as fast a plain c.

Also going to look into the image loader and try for Googles WebP decoder support for the Editor that
will reduce  the memory footprint and increase performance drastically.

Last edited by zester (2012-01-14 03:39:36)

Re: Premake4 Build Scripts

Good, let us know how it is going smile

Officially for Maratis I want to support only one building system, because it has been already very hard to have one working simply and cross-platform, it was a big work for Davide Bacchet and we have a linux build in a big part thanks to that.

If at some point a better, simpler alternative is working as good as scons for all platform, we can think about switching to it, why not. Some details are more difficult than others, compiling the 3rdparty libs, making MCore/MEngine dynamic libs and linked properly for the plugin system dependency etc

What is the exact difference with scons ? Is it generating make-file and native compilers projects ?
What do you need to be installed in your computer ?

Re: Premake4 Build Scripts

anael wrote:

Good, let us know how it is going smile

Officially for Maratis I want to support only one building system, because it has been already very hard to have one working simply and cross-platform, it was a big work for Davide Bacchet and we have a linux build in a big part thanks to that.

If at some point a better, simpler alternative is working as good as scons for all platform, we can think about switching to it, why not. Some details are more difficult than others, compiling the 3rdparty libs, making MCore/MEngine dynamic libs and linked properly for the plugin system dependency etc

What is the exact difference with scons ? Is it generating make-file and native compilers projects ?
What do you need to be installed in your computer ?


Well premake is a self-contained build system that uses lua, so you don't need to install anything
you could even have it as a 3rdparty lib.

If the end user is building maratis from source then premake will bootstrap it's self and then
build the rest of maratis.

If maratis is pre-compiled then there is nothing to do.



Generating project files for different platforms:
--------------------------------
For Linux:
premake4 gmake

For Mac:
premake4 xcode3

For Windows &  Visual Studio 2010
premake4 vs2010



Building Maratis in different modes is easy.
----------------------------------

1. Maratis Dynamic in Release Mode:  Nothing to do just type
make

2. Maratis Dynamic in Debug Mode: Just do the following for all platforms.
make config=SharedDebug

3. Maratis Static in Release Mode:
make config=Static

4. Maratis Static in Debug Mode:
make config=StaticDebug



Right now I have MCore/MEngine/MGui/MaratisCommon(Plugin System) all building and linking properly.
The only thing left to do is Maratis Editor, Player and 3rdparty libs.


Scons uses Python and hard to use.
and
Premake uses Lua and is easy to use.


Here is the premake --help output.


premake4 --help
Premake 4.3, a build script generator
Copyright (C) 2002-2010 Jason Perkins and the Premake Project
Lua 5.1 Copyright (C) 1994-2008 Lua.org, PUC-Rio

Usage: premake4 [options] action [arguments]

OPTIONS

--cc=VALUE        Choose a C/C++ compiler set; one of:
     gcc                GNU GCC (gcc/g++)
     ow                 OpenWatcom

--dotnet=VALUE    Choose a .NET compiler set; one of:
     msnet           Microsoft .NET (csc)
     mono            Novell Mono (mcs)
     pnet             Portable.NET (cscc)

--file=FILE         Read FILE as a Premake script; default is 'premake4.lua'

--help               Display this information

--os=VALUE      Generate files for a different operating system; one of:
     bsd              OpenBSD, NetBSD, or FreeBSD
     linux             Linux
     macosx         Apple Mac OS X
     solaris          Solaris
     windows        Microsoft Windows

--platform=VALUE  Add target architecture (if supported by action); one of:
     x32               32-bit
     x64               64-bit
     universal       Mac OS X Universal, 32- and 64-bit
     universal32   Mac OS X Universal, 32-bit only
     universal64   Mac OS X Universal, 64-bit only
     ps3               Playstation 3 (experimental)
     xbox360        Xbox 360 (experimental)

--scripts=path  Search for additional scripts on the given path

--version           Display version information

ACTIONS

clean               Remove all binaries and generated files
codeblocks      Generate Code::Blocks project files
codelite           Generate CodeLite project files
gmake             Generate GNU makefiles for POSIX, MinGW, and Cygwin
vs2002            Generate Microsoft Visual Studio 2002 project files
vs2003            Generate Microsoft Visual Studio 2003 project files
vs2005            Generate Microsoft Visual Studio 2005 project files
vs2008            Generate Microsoft Visual Studio 2008 project files
vs2010            Generate Visual Studio 2010 project files (experimental)
xcode3            Generate Apple Xcode 3 project files (experimental)

For additional information, see http://industriousone.com/premake

Last edited by zester (2012-01-14 15:55:59)

Re: Premake4 Build Scripts

If you can get this working, I think it would be an ideal method myself as it would mean only maintaining one build system/project format and yet having support for everything. Scons does that to a degree and is quite good at it, but unfortunately doesn't create things like VS project files, so using an IDE requires maintaining the project separately.

Re: Premake4 Build Scripts

Nistur wrote:

If you can get this working, I think it would be an ideal method myself as it would mean only maintaining one build system/project format and yet having support for everything. Scons does that to a degree and is quite good at it, but unfortunately doesn't create things like VS project files, so using an IDE requires maintaining the project separately.

I can get it working for all platforms.

But I will be honest with you I am a Linux user so you will see stuff for Linux that might not be available
for Windows or Mac.

For instance I have ARM v4, 5, 6 cross-compiled toolchains already for Maratis once I have an ARM v7 toolchain
then Maratis will work on every mobile Linux device that support OpenGL ES out of the box.

A battery's included type of thing.

Re: Premake4 Build Scripts

I am usually a Linux user too, which is one of the main reasons why I found and like Maratis so much. However, being a professional game developer, the one thing which I have come to love that Microsoft made is the debugger. I can, and have, used GDB. It just doesn't compare though. So for now I'm sticking with Windows for most of my coding (although only on my PC, when I'm away from home I use my laptop which only has Archlinux on it)

But yes, I like the look of premake4

Re: Premake4 Build Scripts

Started working with Maratis on Win7 using Visual C++ 2008 and Premake, and also testing on FreeBSD 9.0 & Illumos(Open Solaris)

Software Development on Windows is nothing like Software Development on Linux, FreeBSD or Solaris that's for sure.

I defiantly prefer working on Linux and BSD system's but Windows isn't bad, somethings are "ALOT" harder to do on Window compared to and opensource os. And there are a lot of really cool core os features Windows is missing, but anyways just stopped to let you know I am still working on Maratis with Premake.

You also might want to checkout Fossil http://fossil-scm.org/index.html/doc/tr … index.wiki
its a version control system, thats what I use and I really like it. No I love it wink

Last edited by zester (2012-01-28 22:58:39)

Re: Premake4 Build Scripts

I prefer development on open source OSs too in general, it's just that, when it comes to debugging, the visual studio debugger has so many nice features. It's possible to do most of them with gdb, but much as I usually live on the command line in Linux, the visual studio debugger is so polished that it makes life so much simpler. Like I said, the debugger is the one thing that I really love that Microsoft have made. Also, you can edit and continue. On a large project, that saves _hours_

I had a look at fossil before, it looks really cool. I am really falling in love with distributed version control (see my rant about a particular source control system beginning with P) however, I also like having somewhere to back up my work, preferably off site. Not having a big project means that I can't realistically expect other people to provide a backup mirror. As such, I'm going to be sticking with git for now smile Also, sourcerepo have provided me with redmine, which pretty much covers everything else smile I will definitely have more of a play around with fossil, it's good to know that it's worth looking into smile

Re: Premake4 Build Scripts

I started working on the premake4 build system for Maratis again, all of MSDK and MCommon builds with a few warnings. I did have to go in and change some preprocesor #defines Example Linux to __linux__ and Win32 and to _Win32 there was also an error in MCore ... MGui <-- one of those smile src file were an include was asking for one of its own headers with <> instead of "" that was causing the build to also fail.

Anyways.

If you build Maratis from the top level dir you get MCore, MEngine, MGui and Common(MCommon  <-- I renamed it) all built into a single Shared or Static (Release or Debug) library.

If you build from any subdirectory like in MCommon then you get MCommon and all its sub librarys as a shared or static library.

If you build from MCommon/MLoaders then you would get MLoaders as a shared or static library.

So depending on were in Maratises dir structure you build from will depend on what you get. You could have a single shared library that contained everything or a shared library for every class.

Last edited by zester (2012-04-22 23:41:57)

Re: Premake4 Build Scripts

That sounds great! Having one set of scripts for all platforms would help me a lot tongue

Of course, with your currest setup, anything made against your version of Maratis wouldn't be compatible with the stock Maratis, unless Anael adopts your restructuring into the main repository. To be honest, I prefer having MEngine, MCore and MGui as separate shared libraries. I was wondering about the things in Common myself, I'm not adverse to creating that as a separate library, or linking it into any other existing target.

I don't mean this to sound too harsh. It's great work you've done. Would love to get my hand on it at some point tongue

Re: Premake4 Build Scripts

Premake script for building regular Maratis

-----------------------------------------------------------------------------------------------------------------------------
-- Maratis premake build
-----------------------------------------------------------------------------------------------------------------------------


    --------------------------------------  SETUP the PATHS  ----------------------------------------

    rootDir = "./"
    sourcesDir = rootDir .. "trunk/dev/"
    thirdPartyDir = rootDir .. "3rdparty/"

    -- zlib & freetype includes are set aside because they are conflicting with each other -- TODO: try "-Wl,--allow-multiple-definition" instead
    zlib_includes = thirdPartyDir .. "zlib/"
    freetype_includes = { thirdPartyDir .. "freetype/", thirdPartyDir .. "freetype/include/", thirdPartyDir .. "freetype/include/freetype/", thirdPartyDir .. "freetype/depend/" }


    -------------------------------------  SETUP THE SOLUTION  -------------------------------------

solution "Maratis"

    -- Get arguments passed to the command line
    for i=1, #_ARGS do
        if _ARGS[i] == "cygwin" then cygwin = true print("*****  Build using cygwin  *****") end
        if _ARGS[i] == "minGW" then minGW = true print("*****  Build using minGW  *****") end
    end

    -- Setup configurations and platforms
    configurations { "Debug", "Release" }
    platforms { "x32", "x64" }

    if os.is("windows") then
        defines { "_WIN32", "WIN32" }
        if minGW then defines { "__MINGW32__" } end
        if cygwin then defines { "__CYGWIN__" } end
    elseif os.is("macosx") then defines { "__APPLE__", "MACOSX" }
    elseif os.is("linux") then defines { "LINUX", "linux" } end

    configuration "Debug"
        defines { "DEBUG" }

    configuration "Release"
        defines { "NDEBUG" }
        flags { "OptimizeSpeed", "EnableSSE2" }

    ------------------------------------  INCLUDES DIRECTORIES  ------------------------------------

    includedirs {
        thirdPartyDir .. "lua",
        thirdPartyDir .. "libpng", --+ zlib
        thirdPartyDir .. "libjpeg",
        thirdPartyDir .. "devil", thirdPartyDir .. "devil/src-IL/include", thirdPartyDir .. "devil/src-ILU/include", -- + png, jpeg, zlib
        thirdPartyDir .. "glee",
        thirdPartyDir .. "tinyxml",
        thirdPartyDir .. "bullet",
        thirdPartyDir .. "npk/include", -- + zlib
        thirdPartyDir .. "assimp", thirdPartyDir .. "assimp/include", thirdPartyDir .. "assimp/code/BoostWorkaround", -- + zlib
        thirdPartyDir .. "openal/include",
        sourcesDir .. "MSDK/MCore/Includes",
        sourcesDir .. "MSDK/MEngine/Includes",
        sourcesDir .. "MSDK/MGui/Includes",
        sourcesDir .. "Maratis/Common"
    }

        if not os.is("linux") then includedirs { thirdPartyDir .. "libsndfile/include" } end -- if you get no sound, comment this line 
        if os.is("macosx") then includedirs { thirdPartyDir .. "freetype/mac" }
        elseif os.is("windows") then includedirs { thirdPartyDir .. "dirent/include" } end


    ---------------------------  PREBUILT External libraries (lib, dll, a, so, dylib)  ----------------------------

    if os.is("windows") then libdirs { thirdPartyDir .. "libsndfile/win32", thirdPartyDir .. "openal/win32" }
    elseif os.is("macosx") then libdirs { thirdPartyDir .. "libsndfile/osx"  }
    elseif os.is("linux") then libdirs { thirdPartyDir .. "libsndfile/linux", thirdPartyDir .. "openal/linux" } end


    -----------------------------  BUILD EXTERNAL LIBRARIES FROM SOURCES -----------------------------------

    -- lua
    project "lua"
        kind "StaticLib"
        language "C"
        files { thirdPartyDir .. "lua/*.h", 
                thirdPartyDir .. "lua/*.c" }

    -- zlib
    project "zlib"
        kind "StaticLib"
        language "C"
        files { thirdPartyDir .. "zlib/*.h", 
                thirdPartyDir .. "zlib/*.c" }

    -- libpng
    project "png"
        kind "StaticLib"
        language "C"
        includedirs { zlib_includes }
        files { thirdPartyDir .. "libpng/*.h", 
                thirdPartyDir .. "libpng/*.c" }

    -- libjpeg
    project "jpeg"
        kind "StaticLib"
        language "C"
        files { thirdPartyDir .. "libjpeg/*.h", 
                thirdPartyDir .. "libjpeg/*.c" }

    -- devil
    project "il"
        kind "StaticLib"
        language "C"
        includedirs { zlib_includes }
        files { thirdPartyDir .. "devil/**.h", 
                thirdPartyDir .. "devil/**.c" }
        defines { "IL_STATIC_LIB", "IL_NO_UTX" }
        --links { "jpeg", "png", "zlib" } -- for SharedLib builds

    -- Glee
    project "glee"
        kind "StaticLib"
        language "C"
        files { thirdPartyDir .. "glee/**.h", 
                thirdPartyDir .. "glee/**.c" }
        if os.is("macosx") then links { "OpenGL.framework" } end

    -- freetype
    project "freetype"
        kind "StaticLib"
        language "C"
        includedirs { freetype_includes }
        files { thirdPartyDir .. "freetype/**.h", 
                thirdPartyDir .. "freetype/*.c" }
        defines { "FT2_BUILD_LIBRARY" }
        if os.is("macosx") then links { "Cocoa.framework" } end

    -- tinyxml
    project "tinyxml"
        kind "StaticLib"
        language "C++"
        files { thirdPartyDir .. "tinyxml/*.h", 
                thirdPartyDir .. "tinyxml/*.cpp" }

    -- bullet
    project "bullet"
        kind "StaticLib"
        language "C++"
        files { thirdPartyDir .. "bullet/**.h", 
                thirdPartyDir .. "bullet/**.c*" }
        if os.is("linux") then buildoptions { "-fpermissive" } end  -- CFLAGS

    -- npk
    project "npk_dev"
        kind "StaticLib"
        language "C"
        includedirs { zlib_includes }
        files { thirdPartyDir .. "npk/**.h", 
                thirdPartyDir .. "npk/**.c" }
        --links { "zlib" } -- for SharedLib builds

    -- assimp
    project "assimp"
        kind "StaticLib"
        language "C++"
        includedirs { zlib_includes }
        files {thirdPartyDir .. "assimp/**.h", 
                thirdPartyDir .. "assimp/**.c*" }
        defines { "ASSIMP_BUILD_BOOST_WORKAROUND", "ASSIMP_BUILD_NO_OWN_ZLIB" }
        --links { "zlib" } -- for SharedLib builds


    -----------------------------------  BUILD MARATIS LIBRARIES  -----------------------------------------

    -- MCore
    project "MCore"
        kind "SharedLib"
        language "C++"
        files { sourcesDir .. "MSDK/MCore/**" }
        defines { "MCORE_DLL" }
        --linkoptions { "-Wl,--as-needed", "-Wl,--allow-multiple-definition", "-Wl,-rpath,." }

    -- MEngine
    project "MEngine"
        kind "SharedLib"
        language "C++"
        files { sourcesDir .. "MSDK/MEngine/**" }
        defines { "MENGINE_DLL" }
        if os.is("windows") then links { "MCore" } end

    -- MGui
    project "MGui"
        kind "StaticLib"
        language "C++"
        files { sourcesDir .. "MSDK/MGui/Sources/*" }
        if os.is("macosx") then files { sourcesDir .. "MSDK/MGui/Sources/COCOA/**", sourcesDir .. "MSDK/MGui/Includes/COCOA/**" }
        elseif os.is("linux") then files { sourcesDir .. "MSDK/MGui/Sources/X11/**", sourcesDir .. "MSDK/MGui/Includes/X11/**" }
        elseif os.is("windows") then files { sourcesDir .. "MSDK/MGui/Sources/WIN32/**", sourcesDir .. "MSDK/MGui/Includes/WIN32/**" } end

    project "MaratisCommon"
        kind "StaticLib"
        language "C++"
        includedirs { freetype_includes }
        files { sourcesDir .. "Maratis/Common/**" }
        defines { "M_PACKAGE_WRITABLE", "IL_STATIC_LIB" }
        --links { "npk_dev", "bullet", "tinyxml", "freetype", "glee", "il", "lua", "sndfile", "openal" } -- for SharedLib builds


    ----------------------------  BUILD MARATIS BINARIES (Editor & Player)  ---------------------------

    -- MaratisEditor
    project "MaratisEditor"
        kind "ConsoleApp"
        language "C++"
        files { sourcesDir .. "Maratis/Editor/**" }
        links { "MaratisCommon", "MGui", "MEngine", "MCore", "assimp", "npk_dev", "bullet", "tinyxml", "freetype", "glee", "il", "jpeg", "png",  "zlib", "lua" }

        if os.is("macosx") then
            links { "Cocoa.framework", "OpenGL.framework", "CoreServices.framework", "Foundation.framework", "IOKit.framework", "OpenAL.framework", "Sndfile" }

        elseif os.is("windows") then
            links { "User32", "Shell32", "Gdi32", "Comdlg32", "Winmm", "libsndfile-1" }
            if cygwin then links { "opengl32", "openal" } else links { "Opengl32", "OpenAL32" } end

        elseif os.is("linux") then
            links { "sndfile", "openal", "X11", "Xxf86vm", "GL", "dl" }
            linkoptions { "-Wl,-rpath=." }
        end


    -- MaratisPlayer
    project "MaratisPlayer"
        kind "ConsoleApp"
        language "C++"

        files { sourcesDir .. "Maratis/Player/**" }
        links {
            "MaratisCommon", "MGui", "MEngine", "MCore",
            "npk_dev", "bullet", "tinyxml", "freetype", "glee", "il", "jpeg", "png", "zlib", "lua"
        }

        if os.is("macosx") then
            links {
                "Cocoa.framework", "OpenGL.framework", "CoreServices.framework",
                "Foundation.framework", "IOKit.framework", "OpenAL.framework", "Sndfile"
            }

        elseif os.is("windows") then
            links { "User32", "Shell32", "Gdi32", "Comdlg32", "Winmm", "libsndfile-1" }
            if cygwin then links { "opengl32", "openal" } else links { "Opengl32", "OpenAL32" } end

        elseif os.is("linux") then
            links { "sndfile", "openal", "X11", "Xxf86vm", "GL", "dl" }
            linkoptions { "-Wl,-rpath=." }
        end

------------------------------------------------  THE END  ------------------------------------------------

Instructions:
In the main maratis sources folder (containing branches, trunk...):
- put the above script in a premake4.lua file
- put the libsndfile file (from the sources or from the binary distribution)
- put the font and gui folders  (from the sources or from the binary distribution)
- build

LINUX
- build using make & GCC 4.6.3 on Ubuntu Precise tongue
- build using Code::Blocks 12.11 & GCC 4.6.3 tongue

- binaries on Ubuntu Precise tongue
- binaries on Slackware 14 tongue (may require libopenal.so.1)

WINDOWS
- build using vs2010 tongue
- build using Code::Blocks minGW tongue
- build using Code::Blocks & Cygwin sad (cf issue #6 in the bug tracker)

- vs2010 binaries on Windows using Wine tongue
- codeblocks minGW binaries on Windows using Wine tongue

TODO: fix assimp for cygwin

Last edited by com3D (2013-10-23 20:26:03)

Re: Premake4 Build Scripts

Awesome!!! and great job. It looks like its time for me to start on the new Qt tools.

Re: Premake4 Build Scripts

com3D wrote:

Everything is working except publishing.
And for the first time I have sound now working in linux.

Last time I checked publishing just wasn't working for me on my linux system in general. Npk was the problem, I planed on removing
Npk from my branch anyways so it didn't matter. 

Npk is just a tar/gzip compressed archive that uses the xxtea cipher for encryption.

Plain old zip files are just faster than tar/gzip and do the same thing(Archiving/Compression). And xxtea is vulnerable to plaintext attack requiring 259 queries and negligible work. In my opinion its a useless addition to Maratis.


I was just going to add Zip File Support, AES 256 Encryption and SQLCipher a Open Source SQLite extension that provides transparent 256-bit AES full database encryption.

So I could pack and encrypt the files I wanted in a zip file and store and encrypt game settings and progress in a database.

Last edited by zester (2013-10-09 04:15:34)

Re: Premake4 Build Scripts

----- EVERYTHING WORK !!!! ----- big_smile

If someone could test it on Mac would be great...

Last edited by com3D (2013-10-17 07:46:49)

Re: Premake4 Build Scripts

Comparison between Scons & premake builds on linux:

File size for MaratisEditor, MaratisPlayer, libMCore, libMEngine:
premake:    9.86 Mo (player=2.59)
Scons:       15 Mo (player=3.76)

This file size reduction is achieved by passing '-s' (strip symbols) to the linker, so we could do it with Scons too.

Sound doesn't work with Scons, works with premake.
To fix sound issue on linux using Scons, go there.

Last edited by com3D (2013-10-25 15:18:02)

Re: Premake4 Build Scripts

For Windows users:
- Put premake4.exe in the main Maratis folder
- Put these 2 lines in a .bat file:

.\premake4 vs2010
pause

Replace vs2010 with:
- your version of visual studio
- if you're using Code::Blocks, replace with codeblocks

NB: if you're using MinGW or Cygwin, append 'minGW' or 'cygwin' to the IDE, for example:

.\premake4 codeblocks minGW
pause

Double-click on the .bat file

This will generate a "Maratis.sln" solution ready to compile in visual studio or a "Maratis.workspace" for Code::Blocks.

Last edited by com3D (2013-10-25 15:18:34)

Re: Premake4 Build Scripts

com3D wrote:

Comparison between Scons & premake builds on linux:

File size for MaratisEditor, MaratisPlayer, libMCore, libMEngine:
premake:    9.86 Mo (player=2.59)
Scons:       15 Mo (player=3.76)

Sound doesn't work with Scons build, works with premake.

I noticed that to when I was working on the premake scripts.

Re: Premake4 Build Scripts

zester wrote:

I have ARM v4, 5, 6 cross-compiled toolchains already for Maratis once I have an ARM v7 toolchain
then Maratis will work on every mobile Linux device that support OpenGL ES out of the box.

Now that we can use this build system to generate makefiles, we can easily use the Android NDK toolchain to compile the libraries for Android. From what I understand, we would then have to interface these libraries with a java activity.