Module::Build::SDL man page on OpenSuSE

Man page or keyword search:  
man Server   25941 pages
apropos Keyword Search (all sections)
Output format
OpenSuSE logo
[printable version]

Module::Build::SDL(3) User Contributed Perl DocumentationModule::Build::SDL(3)

NAME
       Module::Build::SDL - Module::Build subclass for building SDL apps/games
       [not stable yet]

SYNOPSIS
       When creating a new SDL application/game you can create Build.PL like
       this:

	use Module::Build::SDL;

	my $builder = Module::Build::SDL->new(
	    module_name	  => 'Games::Demo',
	    dist_version  => '1.00',
	    dist_abstract => 'Demo game based on Module::Build::SDL',
	    dist_author	  => 'coder@cpan.org',
	    license	  => 'perl',
	    requires	  => {
		'SDL'	  => 0,
	    },
	    #+ others Module::Build options
	)->create_build_script();

       Once you have created a SDL application/game via Module::Build::SDL as
       described above you can use some extra build targets/actions:

       ·   you can create a PAR distribution like:

	    $ perl ./Build.PL
	    $ ./Build
	    $ ./Build par

	   There are some extra parameters related to 'par' action you can
	   pass to Module::Build::SDL->new():

	    parinput  => 'bin/scriptname.pl'
	    paroutput => 'filename.par.exe',
	    parlibs   => [ qw/SDL SDL_main SDL_gfx/ ],	#external libraries (.so/.dll) to be included into PAR
	    parmods   => [ qw/Module::A Module::B/ ],	#extra modules to be included into PAR

       ·   to run the game from distribution directory you can use:

	    $ perl ./Build.PL
	    $ ./Build
	    $ ./Build run

       ·   TODO: maybe some additional actions: parexe, parmsi, deb, rpm

DESCRIPTION
       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.

APPLICATION/GAME LAYOUT
       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:

       ·   bin - one or more perl scripts (*.pl) to start the actual
	   application/game

       ·   lib - application/game specific modules (*.pm) organized in dir
	   structure in "usual perl manners"

       ·   data - directory for storing application data (pictures, sounds
	   etc.). This subdirectory is handled as a "ShareDir" (see
	   File::ShareDir for more details)

       ·   As the project is (or could be) composed as a standard perl
	   distribution it also support standard subdirectory 't' (with
	   tests).

RULES TO FOLLOW
       When creating a SDL application/game based on Module::Build::SDL it is
       recommended to follow these rules:

       ·   Use the name for your game from Games::* namespace; it will make
	   the later release to CPAN much easier.

       ·   Put all data files into data subdirectory and access the data
	   subdir only via File::ShareDir (namely by calling distdir()
	   function)

       ·   TODO: maybe add more

perl v5.18.1			  2013-09-28		 Module::Build::SDL(3)
[top]

List of man pages available for OpenSuSE

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net