Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
create_pacman_package [2022/02/12 01:34] – add inlink to package installation ataricreate_pacman_package [2023/02/24 16:34] (current) – [What is pacman?] nit: Spelling maximumentropy
Line 5: Line 5:
 In Batocera **v27** and higher, you can utilize [[https://www.archlinux.org/pacman/|pacman]] to install and manage packages. It is the underlying tool behind the [[updates_and_downloads|content downloader]]. It is a straightforward package manager that's easy to work with. In Batocera **v27** and higher, you can utilize [[https://www.archlinux.org/pacman/|pacman]] to install and manage packages. It is the underlying tool behind the [[updates_and_downloads|content downloader]]. It is a straightforward package manager that's easy to work with.
  
-You don't need development skills to create a package, just a bit of patience. If you've copied files too and from directories before, you already have the skill-set required for this.+You don't need development skills to create a package, just a bit of patience. If you've copied files to and from directories before, you already have the skill-set required for this.
    
 ===== Create your own package ===== ===== Create your own package =====
Line 87: Line 87:
   * **pkgver:** The version of the package. If this number is higher than the one currently installed, Batocera will offer the user to update the package in the store. The only acceptable format for this is ''X.Y.Z-R'', following pacman's conventions.   * **pkgver:** The version of the package. If this number is higher than the one currently installed, Batocera will offer the user to update the package in the store. The only acceptable format for this is ''X.Y.Z-R'', following pacman's conventions.
   * **pkgdesc:** The package's displayed name, following by a short description. This will be what appears in the content downloader. You only have one line of text, around 80 characters, so keep it brief!   * **pkgdesc:** The package's displayed name, following by a short description. This will be what appears in the content downloader. You only have one line of text, around 80 characters, so keep it brief!
-  * **arch:** What platforms should this package be available to? Most packages are fine to leave this as "any", but some may only work on x86_64 for example.+  * **arch:** What platforms should this package be available to? Most packages are fine to leave this as "any", but some may only work on x86_64 for example. Available archs are: ''any x86_64 x86 armv7l aarch64''. Multiple archs cannot be specified, they must be made as separate packages.
   * **group:** What category should the store show this under? If you are creating a package for a specific [[:systems|system]], it must be prefixed with ''sys-'', eg. ''sys-megadrive'' for [[systems:megadrive|Megadrive/Genesis]]. For the other groups, [[#available_groups|read below]].   * **group:** What category should the store show this under? If you are creating a package for a specific [[:systems|system]], it must be prefixed with ''sys-'', eg. ''sys-megadrive'' for [[systems:megadrive|Megadrive/Genesis]]. For the other groups, [[#available_groups|read below]].
  
Line 126: Line 126:
 gamelist = nes gamelist = nes
 <game> <game>
-  <path>./Alter_Ego.nes</path> + <path>./Alter_Ego.nes</path> 
-  <name>Alter Ego</name> + <name>Alter Ego</name> 
-  <desc>Freeware puzzle game for NES, a port of the original (by Denis Grachev for the ZX Spectrum). Swap positions with your 'alter ego' to move about the level and obtain all the bouncing pixels.</desc> + <desc>Freeware puzzle game for NES, a port of the original (by Denis Grachev for the ZX Spectrum). Swap positions with your 'alter ego' to move about the level and obtain all the bouncing pixels.</desc> 
-  <rating>0.6</rating> + <rating>0.6</rating> 
-  <releasedate>20110827T000000</releasedate> + <releasedate>20110827T000000</releasedate> 
-  <developer>Shiru</developer> + <developer>Shiru</developer> 
-  <publisher></publisher> + <publisher></publisher> 
-  <genre>Puzzle</genre> + <genre>Puzzle</genre> 
-  <players>1</players> + <players>1</players> 
-  <image>./images/Alter_Ego.png</image> + <image>./images/Alter_Ego.png</image> 
-  <manual>./manuals/Alter_Ego-manual.pdf</manual>+ <manual>./manuals/Alter_Ego-manual.pdf</manual>
 </game> </game>
 </file> </file>
Line 150: Line 150:
 <WRAP center round info> <WRAP center round info>
 Only interpreters that takes a ''-c'' argument for commands are available. For example, ''exec = /bin/bash'' or ''exec = /usr/bin/python'', which are both used heavily by Batocera for its internal functions. Only interpreters that takes a ''-c'' argument for commands are available. For example, ''exec = /bin/bash'' or ''exec = /usr/bin/python'', which are both used heavily by Batocera for its internal functions.
 +</WRAP>
 +
 +<WRAP center round important>
 +This is called via the Python ''subprocess'' module, which has some limitations on what you can/can't do in bash. For instance:
 +  * Pipes (''|'') are completely unsupported.
 +  * Anything that could result in ''stdout'' being written to will also be output, even if the user is not viewing that terminal.
 +  * Any interactivity that reads from ''stdin'' will fail.
 +  * If a command continually runs in the background then the installation will never complete.
 </WRAP> </WRAP>
  
Line 195: Line 203:
 ==== Create the package ==== ==== Create the package ====
  
-Batocera uses a custom tool to create its packages: ''batocera-makepkg''.+Batocera uses a custom tool to create its packages: [[https://github.com/batocera-linux/batocera.linux/blob/master/package/batocera/utils/pacman/batocera-makepkg|batocera-makepkg]].
  
 To use it: To use it:
Line 289: Line 297:
 To see a list of installed packages and their version numbers, run ''%%pacman -Q%%''. To see a list of installed packages and their version numbers, run ''%%pacman -Q%%''.
 </WRAP> </WRAP>
 +
 +===== Hosting your own repository =====
 +
 +It is possible to [[:pacman_package_manager|host your own repository]] to test downloading and installing packages via ''batocera-store''.
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
  • create_pacman_package.1644629664.txt.gz
  • Last modified: 4 years ago
  • by atari