Difference between revisions of "PBI Module Builder Guide"
Drulavigne (Talk | contribs) (→Creating a New PBI with pbi_makeport) |
Svererenov (Talk | contribs) |
||
| Line 1: | Line 1: | ||
| − | + | == PBI Module Builder Guide == | |
| − | + | This guide is intended to help explain how modify and create new modules for building PBI files via the PBI Builder Software. | |
| − | + | === Getting a Module === | |
| − | + | When starting the process of creating a [http://www.rushessay.com custom essay] and new module for the PBI Builder, it is often easiest to begin by downloading an existing module from SVN, and modifying it to suit your programs needs, or by downloading a template and adapting it. | |
| − | + | Modules currently in the PC-BSD Subversion repo can be browsed via the [http://trac.pcbsd.org/browser/pbibuild/modules web] | |
| − | + | To download a specific module, use the following commands, replacing "firefox" with the specific module you intend to checkout. | |
| − | + | ||
| − | + | ||
| − | + | # cd /pbi-build/modules | |
| + | # svn co svn://svn.pcbsd.org/pbibuild/modules/webbrowsers/firefox webbrowsers/firefox | ||
| − | + | If you wish to start with a blank module template, you may download by using these commands: | |
| − | + | # cd /pbi-build/modules | |
| + | # fetch http://www.pcbsd.org/files/templates/module-template.tgz | ||
| + | # tar xvzf module-template.tgz | ||
| − | + | === Module Structure === | |
| − | + | A proper module will contain several files and directories: | |
| − | + | '''Required files / directories''' | |
| − | + | {| | |
| + | | '''pbi.conf''' | ||
| + | | - | ||
| + | | The main configuration file for the module. | ||
| + | |- | ||
| + | | '''copy-files''' | ||
| + | | - | ||
| + | | Listing of the files / directories you wish to copy from the pbisandbox environment to your finished PBI file. | ||
| + | |- | ||
| + | | '''kmenu-dir''' | ||
| + | | - | ||
| + | | Directory of configuration entries for the K menu. | ||
| + | |- | ||
| + | | '''overlay-dir''' | ||
| + | | - | ||
| + | | Directory of contents to be applied to base PBI directory. Icons, PBI setup scripts, and most other files not added via copy-files are placed here. | ||
| + | |} | ||
| − | |||
| − | + | '''Optional Files used on a per-need basis''' | |
| − | + | {| | |
| + | | '''build.sh''' | ||
| + | | - | ||
| + | | Script to run after the port make and copy-files are processed. | ||
| + | |- | ||
| + | | '''preportmake.sh''' | ||
| + | | - | ||
| + | | Script to run in pbisandbox prior to the port make being executed. | ||
| + | |- | ||
| + | | '''mime-dir''' | ||
| + | | - | ||
| + | | Directory of mime entries for your PBI. | ||
| + | |} | ||
| − | |||
| − | + | ==== The pbi.conf file ==== | |
| − | + | This file is the first thing you read for each module. | |
| − | + | The available variables are explained with the example of "FireFox" below: | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| + | # Program Name | ||
| + | # The name of the PBI file being built | ||
| + | PROGNAME="Firefox" | ||
| + | |||
# Program Website | # Program Website | ||
| − | + | # Website of the program the module is building | |
| + | PROGWEB="http://www.mozilla.com" | ||
| + | |||
| + | # Program Author | ||
| + | # Who created / maintains the program being built | ||
| + | PROGAUTHOR="The Mozilla Foundation" | ||
| + | |||
| + | # Default Icon | ||
| + | # Relative to overlay-dir, the main icon you want to show up for this PBI | ||
| + | PROGICON="share/pixmaps/FireFox-128.png" | ||
| + | |||
| + | # Port we want to build | ||
| + | # The port the server will track to determine when it's time for a rebuild | ||
| + | PBIPORT="/usr/ports/www/firefox/" | ||
| + | |||
| + | # Set to "Auto or NONE" to have the PBI creator auto-populate libs or not | ||
| + | # This allows you to also use the autolibs/ directory in your overlay-dir as a location for extra | ||
| + | # library files | ||
| + | PROGLIBS="Auto" | ||
| + | |||
| + | # PBI Update URL set to "" or the http:// URL of update checker | ||
| + | # Leave this as update.pbidir.com normally | ||
| + | PBIUPDATE="http://update.pbidir.com" | ||
| + | |||
| + | # Other Ports we need built | ||
| + | # One per line, any additional ports that need to be built for this PBI | ||
| + | OTHERPORT="" | ||
| + | |||
| + | # Enter your custom make options here | ||
| + | # Options that will be put into the make.conf for the build of this port | ||
| + | MAKEOPTS="" | ||
| + | |||
| + | # FBSD7BASE - (7.1 or 7.2) | ||
| + | # This variable can be used to set the specific version of FreeBSD this port needs to be compiled | ||
| + | # under. Use this is a port is known to not build / work when compiled on FreeBSD 7.0 (the default) | ||
| + | FBSD7BASE="7.2"; export FBSD7BASE | ||
| + | |||
| + | # This option determines if the pbi-builder will auto-copy files from the target port | ||
| + | # Can be set to YES/NO/FULL | ||
| + | # YES - Copy only target port files automatically | ||
| + | # No - Don't copy any target port files (will need to use copy-files config instead) | ||
| + | # FULL - Copy target port files, and recursive dependency files as well (Makes very large PBI) | ||
| + | PBIAUTOPOPULATE="YES" ; export PBIAUTOPOPULATE | ||
| + | |||
| + | # Can be set to OFF/NO to disable copying all files from ports made with the OTHERPORT variable | ||
| + | # Leaving this unset will have the builder auto-copy all files from OTHERPORT targets | ||
| + | PBIAUTOPOPULATE_OTHERPORT="" ; export PBIAUTOPOPULATE_OTHERPORT | ||
| + | |||
| + | # Set this variable to any target ports you want to autopopulate files from, in addition to | ||
| + | # the main target port | ||
| + | # List additional ports one-per-line | ||
| + | PBIAUTOPOPULATE_PORTS="/usr/ports/www/mplayer-plugin/" ; export PBIAUTOPOPULATE_PORTS | ||
| + | |||
| + | # By default the PBI will remove any xorg-fonts, and create a sym-link to the the users system fonts | ||
| + | # Setting this to YES keeps the PBIs internal fonts and doesn't create a link | ||
| + | # PBIDISABLEFONTLINK="" ; export PBIDISABLEFONTLINK | ||
| + | |||
| + | # By default the libGL* libraries will be removed from a PBI in order to use the systems libGL | ||
| + | # Set this to YES to keep the PBIs libGL* libraries, and not use the system's | ||
| + | # PBIKEEPGL="" ; export PBIKEEPGL | ||
| + | |||
| + | # By default we prune any include/ files used for building, | ||
| + | # Set this to NO to keep any include/ directories in the resulting PBI | ||
| + | # PBIPRUNEINCLUDE="" ; export PBIPRUNEINCLUDE | ||
| + | |||
| + | # By default we prune the python files used for building, | ||
| + | # Set this to NO to keep any python files in the resulting PBI | ||
| + | # PBIPRUNEPYTHON="" ; export PBIPRUNEPYTHON | ||
| + | |||
| + | # By default we prune any perl files used for building, | ||
| + | # Set this to NO to keep any perl files in the resulting PBI | ||
| + | # PBIPRUNEPERL="" ; export PBIPRUNEPERL | ||
| + | |||
| + | # By default we prune any doc files (such as man, info, share/doc) | ||
| + | # Set this to NO to keep any doc files in the resulting PBI | ||
| + | # PBIPRUNEDOC="" ; export PBIPRUNEDOC | ||
| + | |||
| + | # Build Key - Change this to anything else to trigger a rebuild | ||
| + | # - The rebuild will take place even if port is still the same ver | ||
| + | BUILDKEY="01" | ||
| − | + | ==== The copy-files configuration ==== | |
| − | + | ||
| − | + | This file is very straight forward, simply list the files you want to copy from the installed port, and where they should go in your PBI directory structure. The first argument should be the file/directory you wish to copy, and the 2nd argument will be the directory within the PBI it needs to be copied to. | |
| − | + | ||
| − | + | Example copy-files from FileZilla: | |
| − | + | ||
| − | + | /usr/local/bin/filezilla bin/ | |
| − | + | /usr/local/bin/fzsftp bin/ | |
| − | + | /usr/local/bin/gst-* bin/ | |
| − | + | /usr/local/bin/wxrc* bin/ | |
| + | /usr/local/bin/wxgtk2* bin/ | ||
| + | /usr/local/share/filezilla share/filezilla | ||
| − | + | ==== The preportmake.sh script ==== | |
| − | + | ||
| − | + | ||
| − | + | This script, if it present is run right before starting the "make install" of your port. This allows you to make modifications to the pbisandbox environment or to the port building source itself. Normally this won't be | |
| − | + | necessary, unless working with a very tricky program to get compiled. | |
| − | + | ||
| − | + | ||
| − | + | Example: | |
| − | + | #!/bin/sh | |
| + | # Script to grab the java files and place them in the right directory | ||
| + | # before starting the build | ||
| + | |||
| + | cd /usr/ports/distfiles | ||
| + | |||
| + | fetch ftp://ftp.pcbsd.org/pub/autobuildpkgs/javapack.tbz | ||
| + | tar xvjf javapack.tbz | ||
| + | |||
| + | cd /usr/ports/java/jdk16/ | ||
| + | echo "#!/bin/sh | ||
| + | exit 0" > /usr/ports/java/jdk16/files/license.sh | ||
| + | |||
| + | cd /usr/ports/devel/automake15 | ||
| + | make install clean | ||
| − | + | ==== The build.sh script ==== | |
| − | + | Below is the example of the build.sh script, which runs after all the files have been copied to your PBI directory. This allows you to make mods to specific things for your PBI to work properly. In this example we modify the uninstall script to use the right version. | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | #!/bin/sh | |
| − | + | # PBI building script | |
| − | + | # This will run after your port build is complete | |
| − | + | # Build your PBI here, and exit 0 on success, or exit 1 on failure. | |
| − | + | ############################################################################## | |
| − | + | # Available Variables | |
| − | + | # PBIDIR = The location of where you can populate your PBI directory | |
| + | # MODULEDIR = The location of the module directory for this PBI | ||
| + | # PORTVER = Version number of the port we used to build | ||
| + | ############################################################################## | ||
| − | + | # Save the right version number in the removepbi.sh script | |
| − | # | + | sed -e "s,CHANGEME,Firefox${PORTVER},g" ${PBIDIR}/scripts/removepbi.sh > /tmp/removepbi.sh |
| − | + | mv /tmp/removepbi.sh ${PBIDIR}/scripts/removepbi.sh | |
| − | + | chmod 755 ${PBIDIR}/scripts/removepbi.sh | |
| + | ==== The kmenu-dir directory ==== | ||
| − | + | In this directory you may make any number of files, which contain the .pbc configuration for your kmenu icons. This defines where you would like icons created for your users desktop | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | Example of kmenu-dir/firefox file: | |
| − | + | ExePath: bin/firefox | |
| + | ExeIcon: share/pixmaps/FireFox-128.png | ||
| + | ExeDescr: FireFox | ||
| + | ExeNoDesktop: 0 | ||
| + | ExeNoMenu: 0 | ||
| + | ExeNoCrashHandler: 0 | ||
| + | ExeRunRoot: 0 | ||
| + | ExeRunShell: 0 | ||
| + | ExeNotify: 1 | ||
| + | ExeLink: 0 | ||
| + | ExeWebLink: 0 | ||
| + | ExeTaskbar: 0 | ||
| + | ExeOwndir: 1 | ||
| + | ExeKdeCat: Internet | ||
| − | + | Line-By-Line description of each entry: | |
| + | ---- | ||
| − | + | '''ExePath''': bin/firefox | |
| − | + | This line indicates the binary / script we want this icon to run when the user clicks it. This is relative to the PBI directory, so we use bin/firefox | |
| − | + | '''ExeIcon''': share/pixmaps/FireFox-128.png | |
| − | + | This is the icon you want to show up for this program, again it is relative to the PBI directory | |
| − | + | '''ExeDescr''': FireFox | |
| − | + | This would be the name of the icon in the kmenu or on the users desktop. | |
| − | + | '''ExeNoDesktop''': 0 | |
| − | + | This allows you to disable creating a desktop icon for this entry. Set it to '0' if you want a desktop icon, or '1' if you don't wish an icon. | |
| − | + | '''ExeNoMenu''': 0 | |
| − | + | This allows you to disable creating a kmenu icon for this entry. Set it to '0' if you want a kmenu icon, or '1' if you don't wish an icon. | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | '''ExeNoCrashHandler''': 0 | |
| − | + | This option enables / disables the usage of the PC-BSD CrashHandler program. This dialog warns the user that the application has crashed if it returns status non-zero (0), and provides the option to save the output of stdout and stderr from the application. Setting this to "1" disables the CrashHandler helper, which is useful for programs which normally return non-0, such as Window Managers and various apps. | |
| − | + | '''ExeRunRoot''': 0 | |
| − | + | This indicates if you want your program to be run as "root" when the user clicks it. Set it to '0' to run as a regular user, or '1' to run kdesu and switch to "root" Set this to '0' | |
| − | ''' | + | '''ExeRunShell''': 0 |
| − | + | This indicates if you want your program to be executed in a konsole session, which may be useful for command-line applications. Set it to '0' if you dont want it to run in konsole, or set it to '1' if you do. | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | '''ExeNotify''': 1 | |
| − | + | This indicates if you want to enable launch feedback in KDE, which is the bouncing icon, showing that the program is loading. Set it to '0' to disable launch feedback, or set it to '1' if you want this enabled. Normally it is | |
| + | best to leave this enabled. | ||
| − | + | '''ExeLink''': 0 | |
| − | + | This is used to indicate if the ExePath variable was set to a local file / document you want opened with konqueror insetead of just being "run". This is useful for README type documents. Set this to '1' if you want your document opened with konq, or '0' to just run it as normal. | |
| − | + | '''ExeWebLink''': 0 | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | This is similar to above, and instead indicates that the ExePath being opened is actual a web URL. Set this to '1' to open it the ExePath with Konq, or '0' to just run it as normal. | |
| − | ''' | + | '''ExeTaskbar''': 0 |
| − | + | This indicates if you want this application icon added to the taskbar. Set it to '1' to add it, or '0' to leave it disabled. (THIS FEATURE IS CURRENTLY UNAVAILABLE, BUT WILL BE ADDED DOWN THE ROAD) | |
| − | + | '''ExeOwndir''': 1 | |
| − | + | This option is used to specify where you want your Kmenu icon to be placed, and may be set to 0, 1, 2 | |
| − | + | 0 = Place kmenu icon directory in top level. | |
| + | I.E. Kmenu -> Firefox -> Firefox | ||
| + | 1 = Place kmenu icon in its own directory in the sub category indicated by ExeKdeCat: | ||
| + | I.E. Kmenu -> Internet -> Firefox -> Firefox | ||
| + | 2 = Place kmenu icon directly in the sub category indicated by ExeKdeCat: | ||
| + | I.E. Kmenu -> Internet -> Firefox | ||
| − | + | '''ExeKdeCat''': Internet | |
| − | + | This allows you to choose a kmenu sub-directory to place your icons / directory into, when ExeOwnDir is set to 1 or 2. | |
| − | + | Available options are: | |
| − | + | ExeKdeCat: Development | |
| − | + | ExeKdeCat: Editors | |
| − | + | ExeKdeCat: Edutainment/Languages | |
| − | + | ExeKdeCat: Edutainment/Math | |
| − | + | ExeKdeCat: Edutainment/Misc | |
| − | + | ExeKdeCat: Edutainment/Science | |
| − | + | ExeKdeCat: Edutainment/Teaching | |
| − | + | ExeKdeCat: Games/Arcade | |
| − | + | ExeKdeCat: Games/Board | |
| − | + | ExeKdeCat: Games/Card | |
| − | + | ExeKdeCat: Games/Kidsgames | |
| − | + | ExeKdeCat: Games/TacticStrategy | |
| − | + | ExeKdeCat: Games | |
| − | + | ExeKdeCat: Graphics | |
| − | + | ExeKdeCat: Internet | |
| + | ExeKdeCat: Multimedia | ||
| + | ExeKdeCat: Office | ||
| + | ExeKdeCat: System | ||
| + | ExeKdeCat: Toys | ||
| + | ExeKdeCat: Utilities | ||
| − | === | + | ==== The mime-dir directory ==== |
| − | + | This directory allows to you specify mime types for your applications defined in the kmenu-dir entries. | |
| − | + | Example of mime-dir/exe file: | |
| − | + | MimeExt: *.exe; *.EXE | |
| + | MimeIcon: win_apps.png | ||
| + | MimeProg: 0 | ||
| − | + | The only catch to this is to note that the "MimeProg: 0" is a pointer to a file in the kmenu-dir structure. In this case you would have to ensure that the application you want to open .exe files gets added first to the template | |
| + | the server creates. Files in the kmenu-dir are added in the order of a "ls" listing, so if you have a wine-exe entry, you may wish to rename it to 00wine-exe to ensure it is added first, which would make this MimeProg: 0 | ||
| + | entry work with it. | ||
| − | If | + | If you have more than 1 mime-type, you would then increment the MimeProg: 0 number to MimeProg: 1, MimeProg: 2, and so forth. Then you would do the same with your kmenu-dir entries, such as 00wine-exe, 01wine-bat, 02wine-msi |
| − | The | + | ==== The overlay-dir directory ==== |
| − | + | This folder contains any of the files you wish placed into your PBI program directory. Here is an example from firefox: | |
| − | + | leftside.png | |
| + | PBI.FirstRun.sh autolibs lib | ||
| + | PBI.RemoveScript.sh bin scripts | ||
| + | PBI.SetupScript.sh header.png share | ||
| − | + | In this example you see we have added our PBI.* setup scripts, and the custom graphics we want for the PBI installer. You may also create directories that will be populated with the copy-files configuration, such as share/ or others you may need. | |
| − | + | == Getting Help == | |
| − | + | To submit a new module, bugfix, or simply ask a question please contact us via the [http://lists.pcbsd.org/mailman/listinfo/pbi-dev PBI Developers mailing list] | |
| − | + | Oh! That's great! Thank you for post! Awesome!And one more thing:If you will have some free time, you can find many goods for yourself here - That's just about [http://customessayorder.com/custom-essay.php essay writing] | |
| − | + | ||
| − | + | ||
| − | [ | + | |
| − | + | ||
| − | + | ||
| − | + | ||
Revision as of 13:34, 10 December 2012
Contents |
PBI Module Builder Guide
This guide is intended to help explain how modify and create new modules for building PBI files via the PBI Builder Software.
Getting a Module
When starting the process of creating a custom essay and new module for the PBI Builder, it is often easiest to begin by downloading an existing module from SVN, and modifying it to suit your programs needs, or by downloading a template and adapting it.
Modules currently in the PC-BSD Subversion repo can be browsed via the web
To download a specific module, use the following commands, replacing "firefox" with the specific module you intend to checkout.
# cd /pbi-build/modules # svn co svn://svn.pcbsd.org/pbibuild/modules/webbrowsers/firefox webbrowsers/firefox
If you wish to start with a blank module template, you may download by using these commands:
# cd /pbi-build/modules # fetch http://www.pcbsd.org/files/templates/module-template.tgz # tar xvzf module-template.tgz
Module Structure
A proper module will contain several files and directories:
Required files / directories
| pbi.conf | - | The main configuration file for the module. |
| copy-files | - | Listing of the files / directories you wish to copy from the pbisandbox environment to your finished PBI file. |
| kmenu-dir | - | Directory of configuration entries for the K menu. |
| overlay-dir | - | Directory of contents to be applied to base PBI directory. Icons, PBI setup scripts, and most other files not added via copy-files are placed here. |
Optional Files used on a per-need basis
| build.sh | - | Script to run after the port make and copy-files are processed. |
| preportmake.sh | - | Script to run in pbisandbox prior to the port make being executed. |
| mime-dir | - | Directory of mime entries for your PBI. |
The pbi.conf file
This file is the first thing you read for each module. The available variables are explained with the example of "FireFox" below:
# Program Name # The name of the PBI file being built PROGNAME="Firefox" # Program Website # Website of the program the module is building PROGWEB="http://www.mozilla.com" # Program Author # Who created / maintains the program being built PROGAUTHOR="The Mozilla Foundation" # Default Icon # Relative to overlay-dir, the main icon you want to show up for this PBI PROGICON="share/pixmaps/FireFox-128.png" # Port we want to build # The port the server will track to determine when it's time for a rebuild PBIPORT="/usr/ports/www/firefox/" # Set to "Auto or NONE" to have the PBI creator auto-populate libs or not # This allows you to also use the autolibs/ directory in your overlay-dir as a location for extra # library files PROGLIBS="Auto" # PBI Update URL set to "" or the http:// URL of update checker # Leave this as update.pbidir.com normally PBIUPDATE="http://update.pbidir.com" # Other Ports we need built # One per line, any additional ports that need to be built for this PBI OTHERPORT="" # Enter your custom make options here # Options that will be put into the make.conf for the build of this port MAKEOPTS="" # FBSD7BASE - (7.1 or 7.2) # This variable can be used to set the specific version of FreeBSD this port needs to be compiled # under. Use this is a port is known to not build / work when compiled on FreeBSD 7.0 (the default) FBSD7BASE="7.2"; export FBSD7BASE # This option determines if the pbi-builder will auto-copy files from the target port # Can be set to YES/NO/FULL # YES - Copy only target port files automatically # No - Don't copy any target port files (will need to use copy-files config instead) # FULL - Copy target port files, and recursive dependency files as well (Makes very large PBI) PBIAUTOPOPULATE="YES" ; export PBIAUTOPOPULATE # Can be set to OFF/NO to disable copying all files from ports made with the OTHERPORT variable # Leaving this unset will have the builder auto-copy all files from OTHERPORT targets PBIAUTOPOPULATE_OTHERPORT="" ; export PBIAUTOPOPULATE_OTHERPORT # Set this variable to any target ports you want to autopopulate files from, in addition to # the main target port # List additional ports one-per-line PBIAUTOPOPULATE_PORTS="/usr/ports/www/mplayer-plugin/" ; export PBIAUTOPOPULATE_PORTS # By default the PBI will remove any xorg-fonts, and create a sym-link to the the users system fonts # Setting this to YES keeps the PBIs internal fonts and doesn't create a link # PBIDISABLEFONTLINK="" ; export PBIDISABLEFONTLINK # By default the libGL* libraries will be removed from a PBI in order to use the systems libGL # Set this to YES to keep the PBIs libGL* libraries, and not use the system's # PBIKEEPGL="" ; export PBIKEEPGL # By default we prune any include/ files used for building, # Set this to NO to keep any include/ directories in the resulting PBI # PBIPRUNEINCLUDE="" ; export PBIPRUNEINCLUDE # By default we prune the python files used for building, # Set this to NO to keep any python files in the resulting PBI # PBIPRUNEPYTHON="" ; export PBIPRUNEPYTHON # By default we prune any perl files used for building, # Set this to NO to keep any perl files in the resulting PBI # PBIPRUNEPERL="" ; export PBIPRUNEPERL # By default we prune any doc files (such as man, info, share/doc) # Set this to NO to keep any doc files in the resulting PBI # PBIPRUNEDOC="" ; export PBIPRUNEDOC # Build Key - Change this to anything else to trigger a rebuild # - The rebuild will take place even if port is still the same ver BUILDKEY="01"
The copy-files configuration
This file is very straight forward, simply list the files you want to copy from the installed port, and where they should go in your PBI directory structure. The first argument should be the file/directory you wish to copy, and the 2nd argument will be the directory within the PBI it needs to be copied to.
Example copy-files from FileZilla:
/usr/local/bin/filezilla bin/ /usr/local/bin/fzsftp bin/ /usr/local/bin/gst-* bin/ /usr/local/bin/wxrc* bin/ /usr/local/bin/wxgtk2* bin/ /usr/local/share/filezilla share/filezilla
The preportmake.sh script
This script, if it present is run right before starting the "make install" of your port. This allows you to make modifications to the pbisandbox environment or to the port building source itself. Normally this won't be necessary, unless working with a very tricky program to get compiled.
Example:
#!/bin/sh # Script to grab the java files and place them in the right directory # before starting the build cd /usr/ports/distfiles fetch ftp://ftp.pcbsd.org/pub/autobuildpkgs/javapack.tbz tar xvjf javapack.tbz cd /usr/ports/java/jdk16/ echo "#!/bin/sh exit 0" > /usr/ports/java/jdk16/files/license.sh cd /usr/ports/devel/automake15 make install clean
The build.sh script
Below is the example of the build.sh script, which runs after all the files have been copied to your PBI directory. This allows you to make mods to specific things for your PBI to work properly. In this example we modify the uninstall script to use the right version.
#!/bin/sh
# PBI building script
# This will run after your port build is complete
# Build your PBI here, and exit 0 on success, or exit 1 on failure.
##############################################################################
# Available Variables
# PBIDIR = The location of where you can populate your PBI directory
# MODULEDIR = The location of the module directory for this PBI
# PORTVER = Version number of the port we used to build
##############################################################################
# Save the right version number in the removepbi.sh script
sed -e "s,CHANGEME,Firefox${PORTVER},g" ${PBIDIR}/scripts/removepbi.sh > /tmp/removepbi.sh
mv /tmp/removepbi.sh ${PBIDIR}/scripts/removepbi.sh
chmod 755 ${PBIDIR}/scripts/removepbi.sh
In this directory you may make any number of files, which contain the .pbc configuration for your kmenu icons. This defines where you would like icons created for your users desktop
Example of kmenu-dir/firefox file:
ExePath: bin/firefox ExeIcon: share/pixmaps/FireFox-128.png ExeDescr: FireFox ExeNoDesktop: 0 ExeNoMenu: 0 ExeNoCrashHandler: 0 ExeRunRoot: 0 ExeRunShell: 0 ExeNotify: 1 ExeLink: 0 ExeWebLink: 0 ExeTaskbar: 0 ExeOwndir: 1 ExeKdeCat: Internet
Line-By-Line description of each entry:
ExePath: bin/firefox
This line indicates the binary / script we want this icon to run when the user clicks it. This is relative to the PBI directory, so we use bin/firefox
ExeIcon: share/pixmaps/FireFox-128.png
This is the icon you want to show up for this program, again it is relative to the PBI directory
ExeDescr: FireFox
This would be the name of the icon in the kmenu or on the users desktop.
ExeNoDesktop: 0
This allows you to disable creating a desktop icon for this entry. Set it to '0' if you want a desktop icon, or '1' if you don't wish an icon.
ExeNoMenu: 0
This allows you to disable creating a kmenu icon for this entry. Set it to '0' if you want a kmenu icon, or '1' if you don't wish an icon.
ExeNoCrashHandler: 0
This option enables / disables the usage of the PC-BSD CrashHandler program. This dialog warns the user that the application has crashed if it returns status non-zero (0), and provides the option to save the output of stdout and stderr from the application. Setting this to "1" disables the CrashHandler helper, which is useful for programs which normally return non-0, such as Window Managers and various apps.
ExeRunRoot: 0
This indicates if you want your program to be run as "root" when the user clicks it. Set it to '0' to run as a regular user, or '1' to run kdesu and switch to "root" Set this to '0'
ExeRunShell: 0
This indicates if you want your program to be executed in a konsole session, which may be useful for command-line applications. Set it to '0' if you dont want it to run in konsole, or set it to '1' if you do.
ExeNotify: 1
This indicates if you want to enable launch feedback in KDE, which is the bouncing icon, showing that the program is loading. Set it to '0' to disable launch feedback, or set it to '1' if you want this enabled. Normally it is best to leave this enabled.
ExeLink: 0
This is used to indicate if the ExePath variable was set to a local file / document you want opened with konqueror insetead of just being "run". This is useful for README type documents. Set this to '1' if you want your document opened with konq, or '0' to just run it as normal.
ExeWebLink: 0
This is similar to above, and instead indicates that the ExePath being opened is actual a web URL. Set this to '1' to open it the ExePath with Konq, or '0' to just run it as normal.
ExeTaskbar: 0
This indicates if you want this application icon added to the taskbar. Set it to '1' to add it, or '0' to leave it disabled. (THIS FEATURE IS CURRENTLY UNAVAILABLE, BUT WILL BE ADDED DOWN THE ROAD)
ExeOwndir: 1
This option is used to specify where you want your Kmenu icon to be placed, and may be set to 0, 1, 2
0 = Place kmenu icon directory in top level.
I.E. Kmenu -> Firefox -> Firefox
1 = Place kmenu icon in its own directory in the sub category indicated by ExeKdeCat:
I.E. Kmenu -> Internet -> Firefox -> Firefox
2 = Place kmenu icon directly in the sub category indicated by ExeKdeCat:
I.E. Kmenu -> Internet -> Firefox
ExeKdeCat: Internet
This allows you to choose a kmenu sub-directory to place your icons / directory into, when ExeOwnDir is set to 1 or 2. Available options are:
ExeKdeCat: Development ExeKdeCat: Editors ExeKdeCat: Edutainment/Languages ExeKdeCat: Edutainment/Math ExeKdeCat: Edutainment/Misc ExeKdeCat: Edutainment/Science ExeKdeCat: Edutainment/Teaching ExeKdeCat: Games/Arcade ExeKdeCat: Games/Board ExeKdeCat: Games/Card ExeKdeCat: Games/Kidsgames ExeKdeCat: Games/TacticStrategy ExeKdeCat: Games ExeKdeCat: Graphics ExeKdeCat: Internet ExeKdeCat: Multimedia ExeKdeCat: Office ExeKdeCat: System ExeKdeCat: Toys ExeKdeCat: Utilities
The mime-dir directory
This directory allows to you specify mime types for your applications defined in the kmenu-dir entries.
Example of mime-dir/exe file:
MimeExt: *.exe; *.EXE MimeIcon: win_apps.png MimeProg: 0
The only catch to this is to note that the "MimeProg: 0" is a pointer to a file in the kmenu-dir structure. In this case you would have to ensure that the application you want to open .exe files gets added first to the template the server creates. Files in the kmenu-dir are added in the order of a "ls" listing, so if you have a wine-exe entry, you may wish to rename it to 00wine-exe to ensure it is added first, which would make this MimeProg: 0 entry work with it.
If you have more than 1 mime-type, you would then increment the MimeProg: 0 number to MimeProg: 1, MimeProg: 2, and so forth. Then you would do the same with your kmenu-dir entries, such as 00wine-exe, 01wine-bat, 02wine-msi
The overlay-dir directory
This folder contains any of the files you wish placed into your PBI program directory. Here is an example from firefox:
leftside.png PBI.FirstRun.sh autolibs lib PBI.RemoveScript.sh bin scripts PBI.SetupScript.sh header.png share
In this example you see we have added our PBI.* setup scripts, and the custom graphics we want for the PBI installer. You may also create directories that will be populated with the copy-files configuration, such as share/ or others you may need.
Getting Help
To submit a new module, bugfix, or simply ask a question please contact us via the PBI Developers mailing list
Oh! That's great! Thank you for post! Awesome!And one more thing:If you will have some free time, you can find many goods for yourself here - That's just about essay writing