Difference between revisions of "Create PBIs/9.2"

From PC-BSD Wiki
Jump to: navigation, search
(Submit the PBI: example will need to be trimmed and need to adjust txtbox format method)
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>{{NavHeader|back=Test PBIs|forward=Purchase PC-BSD® Swag|custompagename=Create PBIs}}</noinclude>
+
<noinclude><translate>
  
 +
<!--T:1-->
 +
{{NavHeader|back=Test PBIs|forward=Purchase PC-BSD® Swag|custompagename=Create PBIs}}</noinclude>
 +
 +
<!--T:2-->
 
PC-BSD® provides a unique file format known as a PBI (push button installer). PBI files end with the ''.pbi'' extension and are self-contained installation programs. This means that even novice users can safely install and uninstall PBIs without inadvertently overwriting or deleting files needed by the operating system or other applications.
 
PC-BSD® provides a unique file format known as a PBI (push button installer). PBI files end with the ''.pbi'' extension and are self-contained installation programs. This means that even novice users can safely install and uninstall PBIs without inadvertently overwriting or deleting files needed by the operating system or other applications.
  
 +
<!--T:3-->
 
A PBI file includes all the runtime and library dependencies required by the application. This means that a PBI is a large file, but this does not necessarily mean that the installed PBI will be that large. During installation, the PBI system compares the currently installed libraries and files with the ones contained within the PBI file and only installs the ones that are not already installed on the system. A hash database is used to eliminate dependency problems while allowing the computer to share libraries between different programs.
 
A PBI file includes all the runtime and library dependencies required by the application. This means that a PBI is a large file, but this does not necessarily mean that the installed PBI will be that large. During installation, the PBI system compares the currently installed libraries and files with the ones contained within the PBI file and only installs the ones that are not already installed on the system. A hash database is used to eliminate dependency problems while allowing the computer to share libraries between different programs.
  
 +
<!--T:4-->
 
Once a PBI is created, it can be installed using the graphical [[Using AppCafe® | AppCafe®]] utility or from the command line using [[PBI Manager]].
 
Once a PBI is created, it can be installed using the graphical [[Using AppCafe® | AppCafe®]] utility or from the command line using [[PBI Manager]].
  
 +
<!--T:5-->
 
In order to create a PBI, the software must already be ported to FreeBSD. The easiest way to confirm whether or not a FreeBSD port exists is to search for the software at {{citelink|url=http://www.freshports.org|txt=FreshPorts.org}}. If a port does not exist, you can issue a port request at the PC-BSD® Port Requests forum using {{citelink|url=http://forums.pcbsd.org/showthread.php?t=13743|txt=these instructions}}. Alternately, if you have ported software before, the {{citelink|fbsdph||txt=Porters Handbook}} contains detailed instructions for porting software to FreeBSD.
 
In order to create a PBI, the software must already be ported to FreeBSD. The easiest way to confirm whether or not a FreeBSD port exists is to search for the software at {{citelink|url=http://www.freshports.org|txt=FreshPorts.org}}. If a port does not exist, you can issue a port request at the PC-BSD® Port Requests forum using {{citelink|url=http://forums.pcbsd.org/showthread.php?t=13743|txt=these instructions}}. Alternately, if you have ported software before, the {{citelink|fbsdph||txt=Porters Handbook}} contains detailed instructions for porting software to FreeBSD.
  
 +
<!--T:6-->
 
Creating a PBI from an existing FreeBSD port is a mostly automated process that does not require development skills. Some ports are effortless to convert while more complex ports may require some thought and simple scripting. Two utilities are available for converting a FreeBSD port into a PBI:
 
Creating a PBI from an existing FreeBSD port is a mostly automated process that does not require development skills. Some ports are effortless to convert while more complex ports may require some thought and simple scripting. Two utilities are available for converting a FreeBSD port into a PBI:
  
* '''[[Using EasyPBI | EasyPBI ]]:''' provides a graphical interface and is available in [[Control Panel]].
+
<!--T:7-->
 +
* '''[[EasyPBI2]]:''' provides a graphical interface and is available in [[Control Panel]].
  
 +
<!--T:8-->
 
* '''[[PBI_Module_Builder_Guide#Creating_a_New_PBI_with_pbi_makeport|pbi_makeport]]:''' provides a command line utility as part of the PBI Manager suite.
 
* '''[[PBI_Module_Builder_Guide#Creating_a_New_PBI_with_pbi_makeport|pbi_makeport]]:''' provides a command line utility as part of the PBI Manager suite.
  
 +
<!--T:9-->
 
{{note|icon64=before creating a PBI, check to see if one exists using the instructions in [[Submit PBI Requests]]. If you decide that you prefer to request a PBI that you need rather than to create one, that page also contains instructions for submitting a PBI request.}}
 
{{note|icon64=before creating a PBI, check to see if one exists using the instructions in [[Submit PBI Requests]]. If you decide that you prefer to request a PBI that you need rather than to create one, that page also contains instructions for submitting a PBI request.}}
  
=== Testing the PBI ===
+
=== Testing the PBI === <!--T:10-->
  
 +
<!--T:11-->
 
Once your PBI has built, test the PBI to ensure that it installs and that the application works.
 
Once your PBI has built, test the PBI to ensure that it installs and that the application works.
  
 +
<!--T:12-->
 
As the superuser, use the '''pbi_add''' command with the '''--no-checksig''' option:
 
As the superuser, use the '''pbi_add''' command with the '''--no-checksig''' option:
  
 +
<!--T:13-->
 
{{txtbox|pre|box='''pbi_add --no-checksig /path_to_pbi'''}}
 
{{txtbox|pre|box='''pbi_add --no-checksig /path_to_pbi'''}}
  
 +
<!--T:14-->
 
Once installed, start the application from the command line to determine if there are any error messages at application launch. When testing the executable, use the one located in ''/usr/pbi/(pbi-name)/bin/'' so all the linking will be properly set up. Otherwise you can get some interesting errors about missing files.
 
Once installed, start the application from the command line to determine if there are any error messages at application launch. When testing the executable, use the one located in ''/usr/pbi/(pbi-name)/bin/'' so all the linking will be properly set up. Otherwise you can get some interesting errors about missing files.
  
 +
<!--T:15-->
 
If the executable does not start the application, the executable may actually be a wrapper script rather than a binary file. If so, check the first line of the script to make sure that it is using the right path for the scripting language. For example, ''#!/bin/python'' is an incorrect path which should be changed to ''#!/usr/pbi/(pbi-name)/bin/python''.
 
If the executable does not start the application, the executable may actually be a wrapper script rather than a binary file. If so, check the first line of the script to make sure that it is using the right path for the scripting language. For example, ''#!/bin/python'' is an incorrect path which should be changed to ''#!/usr/pbi/(pbi-name)/bin/python''.
  
 +
<!--T:16-->
 
The suggested path works because each program is packaged with the proper version of the language it uses and you want to make sure it uses that one. This is usually accomplished by putting a quick '''sed''' line in the ''post-install.sh'' script to fix the first line as seen in the post install script for {{citelink|url=http://trac.pcbsd.org/browser/pbi/modules/games/fretsonfire/scripts/post-install.sh?rev=13019|txt=frets on fire}}.
 
The suggested path works because each program is packaged with the proper version of the language it uses and you want to make sure it uses that one. This is usually accomplished by putting a quick '''sed''' line in the ''post-install.sh'' script to fix the first line as seen in the post install script for {{citelink|url=http://trac.pcbsd.org/browser/pbi/modules/games/fretsonfire/scripts/post-install.sh?rev=13019|txt=frets on fire}}.
  
 +
<!--T:17-->
 
If the application starts and it is a GUI application, go through the various menus to see if they produce any errors.
 
If the application starts and it is a GUI application, go through the various menus to see if they produce any errors.
  
 +
<!--T:18-->
 
If you encounter any error messages in either starting or using the application, record them. If the fix for resolving the error messages is not clear to you, send the error report to the {{citelink|url=http://lists.pcbsd.org/mailman/listinfo/pbi-dev|txt=pbi-dev mailing list}}.
 
If you encounter any error messages in either starting or using the application, record them. If the fix for resolving the error messages is not clear to you, send the error report to the {{citelink|url=http://lists.pcbsd.org/mailman/listinfo/pbi-dev|txt=pbi-dev mailing list}}.
  
 +
<!--T:19-->
 
If your PBI works and you would like to submit its module to be included on the build server, compress it after changing to your module directory (%%PBI_APPDIR%%):
 
If your PBI works and you would like to submit its module to be included on the build server, compress it after changing to your module directory (%%PBI_APPDIR%%):
  
 +
<!--T:20-->
 
{{txtbox|pre|box=>'''cd /usr/local/my_pbis'''<br>>'''tar czvf ~/your_pbi_name.tar.gz .'''}}
 
{{txtbox|pre|box=>'''cd /usr/local/my_pbis'''<br>>'''tar czvf ~/your_pbi_name.tar.gz .'''}}
  
 +
<!--T:21-->
 
This will create a compressed tarball named ''your_pbi_name.tar.gz'' in your home directory. Send this file to the {{citelink|url=http://lists.pcbsd.org/mailman/listinfo/pbi-dev|txt=pbi-dev mailing list}}.
 
This will create a compressed tarball named ''your_pbi_name.tar.gz'' in your home directory. Send this file to the {{citelink|url=http://lists.pcbsd.org/mailman/listinfo/pbi-dev|txt=pbi-dev mailing list}}.
  
== Submit the PBI ==
+
== Submit the PBI == <!--T:22-->
 +
Include the following in your mailing list submission, this consistent format will be helpful to all:
  
Here is an example submission as seen on the mailing list:
+
<!--T:23-->
{{txtbox|box=
+
* Subject of email: "PBI Submission of <PBI name>"
From: nemysis <nemysis@gmx.ch>
+
* Name of the first PBI
To: pbi-dev@lists.pcbsd.org
+
* Description
Cc:
+
* Master sites (where the original can be obtained - listed in the port's Makefile by this variable)
Date: Thu, 17 Jan 2013 20:29:23 +0100
+
* Category'''/'''directory name (often the same as the PBI name) such as: games/epiar
Subject: [PC-BSD Pbi-dev] PBI submissions Epiar. IceBreaker, Rocks'n'Diamonds, gonvert
+
* Attachment of PBI module (this is a function of the email client, but don't forget to include it)
This are mine new or adopted FreeBSD Ports
+
  
 +
<!--T:24-->
 +
More than one PBI may be submitted by the same person in the same email, but please limit to five per message per day and be sure to include the above information for each.
 +
 +
<!--T:25-->
 +
Here is an example submission:
 +
{{txtbox|wrap|box='''Email Subject:''' PBI submission Epiar
 
Epiar
 
Epiar
  
 +
<!--T:26-->
 
Epiar (ep-ee-are) is an open source computer game, in which the player navigates space from planet to planet, saving money to buy ship upgrades and new ships. The player can also join mercenary missions, attack other ships to steal their money and technology, and explore the universe. The game combines the action/arcade elements of aircraft dogfighting and the openness of role playing games to create this experience.
 
Epiar (ep-ee-are) is an open source computer game, in which the player navigates space from planet to planet, saving money to buy ship upgrades and new ships. The player can also join mercenary missions, attack other ships to steal their money and technology, and explore the universe. The game combines the action/arcade elements of aircraft dogfighting and the openness of role playing games to create this experience.
  
 +
<!--T:27-->
 
Epiar is a space exploration/combat/trading game. The Escape Velocity (EV) series for the Mac was the major point of inspiration for this game.
 
Epiar is a space exploration/combat/trading game. The Escape Velocity (EV) series for the Mac was the major point of inspiration for this game.
 
Other notable games of this genre include:
 
Other notable games of this genre include:
  
- Elite (the original game EV was based on)
+
<!--T:28-->
- Star control 1/2 (and it's now open source successor Ur-Quan masters)
+
{{nbsp}}- Elite (the original game EV was based on)
- Star Flight
+
{{nbsp}}- Star control 1/2 (and it's now open source successor Ur-Quan masters)
- Solar Winds
+
{{nbsp}}- Star Flight
 +
{{nbsp}}- Solar Winds
  
http://epiar.net/
+
<!--T:29-->
 
+
{{http}}epiar.net/
https://github.com/knowknowledge/Epiar
+
{{https}}github.com/knowknowledge/Epiar
  
 +
<!--T:30-->
 
games/epiar
 
games/epiar
  
 
+
<!--T:31-->
 
+
'''Email Attachment:'''  
IceBreaker
+
{{nbsp|3}}epiar.tar.gz 200K
 
+
Is a game similar to JezzBall or Barrack. So, uh, there's a bunch of penguins on an iceberg in Antarctica. You have been selected to catch them so they can be shipped to Finland, where they are essential to a secret plot for world domination.
+
 
+
http://mattdm.org/icebreaker/
+
 
+
http://mattdm.org/icebreaker/notjezzball.shtml
+
 
+
games/icebreaker
+
 
+
 
+
 
+
Rocks'n'Diamonds
+
 
+
A Boulder Dash clone
+
 
+
A scrolling tile-based computer puzzle game that can be described as a combined
+
Boulder Dash, Supaplex, Emerald Mine and Sokoban clone.
+
 
+
A game for Unix/X11 by Holger Schemel, (c) 1995-99 by Holger Schemel.
+
 
+
This is a nice little game with color graphics and sound for your Unix system
+
with color X11.  You need an 8-Bit color display or better.  It will not work
+
on black&white systems, and maybe not on gray scale systems.
+
 
+
If you know the game Boulder Dash (Commodore C64) or Emerald Mine (Amiga),
+
you know what Rocks'n'Diamonds is about.
+
 
+
http://www.artsoft.org/rocksndiamonds/
+
 
+
games/rocksndiamonds
+
 
+
 
+
 
+
gonvert
+
 
+
gonvert is a conversion utility that allows conversion between many units
+
like CGS, Ancient, Imperial with many categories like length, mass, numbers,
+
etc. All units converted values shown at once as you type. Easy to add/change
+
your own units.
+
 
+
Features:
+
 
+
    - 51 categories, 981 units. See the entire list here.
+
    - All units converted values shown at once as you type.
+
    - Descriptions for many units.
+
    - Sort by Unit Name, Value, or Unit symbol.
+
    - Find Units.
+
    - Fully OPEN source so that you can add your own custom calculations
+
      and descriptions.
+
 
+
http://www.unihedron.com/projects/gonvert/
+
 
+
misc/gonvert
+
 
+
 
+
 
+
Please update Zenmap PBI to 6.25
+
 
+
Please read Description, this Port use pc-su from PC-BSD :)
+
 
+
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/175120
+
 
+
http://trac.pcbsd.org/browser/pbi/modules/security/zenmap
+
 
+
 
+
_______________________________________________
+
Pbi-dev mailing list
+
Pbi-dev@lists.pcbsd.org
+
http://lists.pcbsd.org/mailman/listinfo/pbi-dev
+
4 attachments — Download all attachments  
+
epiar.tar.gz epiar.tar.gz
+
200K   Download
+
 
}}
 
}}
  
 +
<!--T:32-->
 
<noinclude>
 
<noinclude>
 
{{refheading}}
 
{{refheading}}
 +
[[category:Create PBIs]]
 +
[[category:Supporting PC-BSD®]]
 +
  
 +
<!--T:33-->
 +
[[category:handbook]]
 +
</translate>
 +
<languages/>
 
</noinclude>
 
</noinclude>

Revision as of 01:37, 26 April 2013

(Sorry for the inconvenience)

Contents

PC-BSD® provides a unique file format known as a PBI (push button installer). PBI files end with the .pbi extension and are self-contained installation programs. This means that even novice users can safely install and uninstall PBIs without inadvertently overwriting or deleting files needed by the operating system or other applications.

A PBI file includes all the runtime and library dependencies required by the application. This means that a PBI is a large file, but this does not necessarily mean that the installed PBI will be that large. During installation, the PBI system compares the currently installed libraries and files with the ones contained within the PBI file and only installs the ones that are not already installed on the system. A hash database is used to eliminate dependency problems while allowing the computer to share libraries between different programs.

Once a PBI is created, it can be installed using the graphical AppCafe® utility or from the command line using PBI Manager.

In order to create a PBI, the software must already be ported to FreeBSD. The easiest way to confirm whether or not a FreeBSD port exists is to search for the software at FreshPorts.org[1]. If a port does not exist, you can issue a port request at the PC-BSD® Port Requests forum using these instructions[2]. Alternately, if you have ported software before, the Porters Handbook[3] contains detailed instructions for porting software to FreeBSD.

Creating a PBI from an existing FreeBSD port is a mostly automated process that does not require development skills. Some ports are effortless to convert while more complex ports may require some thought and simple scripting. Two utilities are available for converting a FreeBSD port into a PBI:

  • pbi_makeport: provides a command line utility as part of the PBI Manager suite.
NOTE: Before creating a PBI, check to see if one exists using the instructions in Submit PBI Requests. If you decide that you prefer to request a PBI that you need rather than to create one, that page also contains instructions for submitting a PBI request.

Testing the PBI

Once your PBI has built, test the PBI to ensure that it installs and that the application works.

As the superuser, use the pbi_add command with the --no-checksig option:

pbi_add --no-checksig /path_to_pbi

Once installed, start the application from the command line to determine if there are any error messages at application launch. When testing the executable, use the one located in /usr/pbi/(pbi-name)/bin/ so all the linking will be properly set up. Otherwise you can get some interesting errors about missing files.

If the executable does not start the application, the executable may actually be a wrapper script rather than a binary file. If so, check the first line of the script to make sure that it is using the right path for the scripting language. For example, #!/bin/python is an incorrect path which should be changed to #!/usr/pbi/(pbi-name)/bin/python.

The suggested path works because each program is packaged with the proper version of the language it uses and you want to make sure it uses that one. This is usually accomplished by putting a quick sed line in the post-install.sh script to fix the first line as seen in the post install script for frets on fire[4].

If the application starts and it is a GUI application, go through the various menus to see if they produce any errors.

If you encounter any error messages in either starting or using the application, record them. If the fix for resolving the error messages is not clear to you, send the error report to the pbi-dev mailing list[5].

If your PBI works and you would like to submit its module to be included on the build server, compress it after changing to your module directory (%%PBI_APPDIR%%):

>cd /usr/local/my_pbis
>tar czvf ~/your_pbi_name.tar.gz .

This will create a compressed tarball named your_pbi_name.tar.gz in your home directory. Send this file to the pbi-dev mailing list[5].

Submit the PBI

Include the following in your mailing list submission, this consistent format will be helpful to all:

  • Subject of email: "PBI Submission of <PBI name>"
  • Name of the first PBI
  • Description
  • Master sites (where the original can be obtained - listed in the port's Makefile by this variable)
  • Category/directory name (often the same as the PBI name) such as: games/epiar
  • Attachment of PBI module (this is a function of the email client, but don't forget to include it)

More than one PBI may be submitted by the same person in the same email, but please limit to five per message per day and be sure to include the above information for each.

Here is an example submission:

Email Subject: PBI submission Epiar

Epiar

Epiar (ep-ee-are) is an open source computer game, in which the player navigates space from planet to planet, saving money to buy ship upgrades and new ships. The player can also join mercenary missions, attack other ships to steal their money and technology, and explore the universe. The game combines the action/arcade elements of aircraft dogfighting and the openness of role playing games to create this experience.

Epiar is a space exploration/combat/trading game. The Escape Velocity (EV) series for the Mac was the major point of inspiration for this game. Other notable games of this genre include:

 - Elite (the original game EV was based on)  - Star control 1/2 (and it's now open source successor Ur-Quan masters)  - Star Flight  - Solar Winds

http://epiar.net/ https://github.com/knowknowledge/Epiar

games/epiar

Email Attachment:

   epiar.tar.gz 200K


References


  1. http://www.freshports.org
  2. http://forums.pcbsd.org/showthread.php?t=13743
  3. http://www.freebsd.org/doc/en/books/porters-handbook/
  4. http://trac.pcbsd.org/browser/pbi/modules/games/fretsonfire/scripts/post-install.sh?rev=13019
  5. 5.0 5.1 http://lists.pcbsd.org/mailman/listinfo/pbi-dev
Other languages:German 1% • ‎English 100% • ‎French 2%