you can create a PAR distribution like:
There are some extra parameters related to par action you can pass to Module::Build::SDL->new():
to run the game from distribution directory you can use:
|o||TODO: maybe some additional actions: parexe, parmsi, deb, rpm|
Module::Build::SDL is a subclass of Module::Build created to make easy some tasks specific to SDL applications - e.g. packaging SDL application/game into PAR archive.
Module::Build::SDL expects the following layout in project directory:
#example: game with the main *.pl script + data files + modules (*.pm) Build.PL lib/ Games/ Demo.pm bin/ game-script.pl data/ whatever_data_files_you_need.jpg
the most simple game should look like:
#example: simple one-script apllication/game Build.PL bin/ game-script.pl
In short - there are 3 expected subdirectories:
o <B>binB> - one or more perl scripts (*.pl) to start the actual application/game o <B>libB> - application/game specific modules (*.pm) organized in dir structure in usual perl manners o <B>dataB> - directory for storing application data (pictures, sounds etc.). This subdirectory is handled as a ShareDir (see File::ShareDir for more details) o As the project is (or could be) composed as a standard perl distribution it also support standard subdirectory <B>tB> (with tests).
When creating a SDL application/game based on Module::Build::SDL it is recommended to follow these rules:
o Use the name for your game from Games::* namespace; it will make the later release to CPAN much easier. o Put all data files into <B>dataB> subdirectory and access the <B>dataB> subdir only via File::ShareDir (namely by calling distdir() function) o TODO: maybe add more
|perl v5.20.3||MODULE::BUILD::SDL (3)||2016-04-05|