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
Next revision Both sides next revision
tutorial:program:oppm [2015/01/14 23:40]
127.0.0.1 external edit
tutorial:program:oppm [2020/06/05 00:30]
vexatos [Registering packages globally]
Line 2: Line 2:
 ============================================ ============================================
  
-The OpenPrograms Package Manager, called OPPM, is a program available through a dungeon loot disk in OpenComputers. It provides a large variety of programs, from now on called "​packages",​ for you to download and install easily. It is meant to make users able to easily distribute their programs, it is supposed to make installing, updating and uninstalling packages just as easy as creating and registering them.+The OpenPrograms Package Manager, called OPPM, is a program available through a dungeon ​[[item:​loot_disks|loot disk]] in OpenComputers. It provides a large variety of programs, from now on called "​packages",​ for you to download and install easily. It is meant to make users able to easily distribute their programs, it is supposed to make installing, updating and uninstalling packages just as easy as creating and registering them.
  
 ##Using OPPM ##Using OPPM
Line 35: Line 35:
     --default installation path     --default installation path
     path="/​usr",​     path="/​usr",​
-    --Additional repositories and packages go here, for correct package syntax, check https://​github.com/​OpenPrograms/​Vexatos-Programs/​blob/​master/​op-manager/etc/opconfig.cfg+    --Additional repositories and packages go here, for correct package syntax, check https://​github.com/​OpenPrograms/​Vexatos-Programs/​blob/​master/​oppm/etc/oppm.cfg
     repos={     repos={
     }     }
Line 41: Line 41:
 ``` ```
  
-You might notice the table called `repos`. That's where you can register your own packages. Package registration follows a rather strict syntax to make sure it will be detected properly. This is an example oppm.cfg file, having added two different packages to oppm (The first one as a [[https://​github.com/​OpenPrograms/​Vexatos-Programs/​blob/​master/​op-manager/​etc/​example-config.cfg|reference]],​ the second one as an actual example):+You might notice the table called `repos`. That's where you can register your own packages. Package registration follows a rather strict syntax to make sure it will be detected properly. This is an example oppm.cfg file, having added two different packages to oppm (The first one as a [[https://​github.com/​OpenPrograms/​Vexatos-Programs/​blob/​master/​oppm/​etc/​example-config.cfg|reference]],​ the second one as an actual example):
  
 ```lua ```lua
Line 47: Line 47:
   --default installation path   --default installation path
   path="/​usr",​   path="/​usr",​
-  --Additional repositories and packages go here, for correct package syntax, check https://​github.com/​OpenPrograms/​Vexatos-Programs/​blob/​master/​op-manager/​etc/​example-config.cfg+  --Additional repositories and packages go here, for correct package syntax, check https://​github.com/​OpenPrograms/​Vexatos-Programs/​blob/​master/​oppm/​etc/​example-config.cfg
   repos={   repos={
     ["​YourUsername/​YourRepo"​] = {     ["​YourUsername/​YourRepo"​] = {
Line 54: Line 54:
           ["​master/​somefolder/​bar.lua"​] = "/",​--"/"​ means the file will be placed inside the folder the user specified, defaults to /usr           ["​master/​somefolder/​bar.lua"​] = "/",​--"/"​ means the file will be placed inside the folder the user specified, defaults to /usr
           ["​master/​somefolder/​barinfo.txt"​] = "//​etc",​ -- double slash for using an absolute path           ["​master/​somefolder/​barinfo.txt"​] = "//​etc",​ -- double slash for using an absolute path
 +          [":​master/​otherfolder"​] = "/​share/​something",​ -- A colon marks a folder, will include everything in that folder
 +          [":​master/​otherfolder"​] = "//​etc/​something",​ -- This also works with absolute paths
           ["​master/​somefolder/​barlib.lua"​] = "/​subfolder",​--Places the file in a subfolder in the user-specified folder           ["​master/​somefolder/​barlib.lua"​] = "/​subfolder",​--Places the file in a subfolder in the user-specified folder
           ["​master/​somefolder/​libfolder/"​] = "/"​           ["​master/​somefolder/​libfolder/"​] = "/"​
         },         },
         dependencies = {         dependencies = {
-          ["some-dependency"] = "/​lib"​--This package is installed into the specified subfolder+          ["GML"] = "/​lib"​--This package is installed into the specified subfolder
         },         },
         name = "​Package name",​--This is for "oppm info"         name = "​Package name",​--This is for "oppm info"
Line 68: Line 70:
       },       },
       ["​yet-another-package"​] = {       ["​yet-another-package"​] = {
-                    --...--+              ​...
       }       }
     },     },
Line 93: Line 95:
 ##​Registering packages globally ##​Registering packages globally
  
-If you want to make your packages globally available (so that everyone that wants to is able to easily install your programs), you need to ask Vexatos on the [[http://​oc.cil.li/​index.php?/​index|OpenComputers forums]] or on IRC to register your GitHub repository. This repo will need to have a file called programs.cfg in the root folder for OPPM to recognize it. That is where all your packages are registered. This is the reference for what is allowed to be in your programs.cfg file (See [[https://​github.com/​OpenPrograms/​Vexatos-Programs/​blob/​master/​op-manager/​example.cfg|example.cfg]]):​+If you want to make your packages globally available (so that everyone that wants to is able to easily install your programs), you need to ask Vexatos on the [[http://​oc.cil.li/​index.php?/​index|OpenComputers forums]] or on IRC to register your GitHub repository. This repo will need to have a file called programs.cfg in the root folder for OPPM to recognize it. That is where all your packages are registered. This is the reference for what is allowed to be in your programs.cfg file (See [[https://​github.com/​OpenPrograms/​Vexatos-Programs/​blob/​master/​oppm/​example.cfg|example.cfg]]):​
  
 ```lua ```lua
Line 101: Line 103:
       ["​master/​somefolder/​bar.lua"​] = "/",​--"/"​ means the file will be placed inside the folder the user specified, defaults to /usr       ["​master/​somefolder/​bar.lua"​] = "/",​--"/"​ means the file will be placed inside the folder the user specified, defaults to /usr
       ["​master/​somefolder/​barinfo.txt"​] = "//​etc",​ -- double slash for using an absolute path       ["​master/​somefolder/​barinfo.txt"​] = "//​etc",​ -- double slash for using an absolute path
 +      [":​master/​otherfolder"​] = "/​share/​something",​ -- A colon marks a folder, will include everything in that folder
 +      [":​master/​otherfolder"​] = "//​etc/​something",​ -- This also works with absolute paths
       ["​master/​somefolder/​barlib.lua"​] = "/​subfolder",​--Places the file in a subfolder in the user-specified folder       ["​master/​somefolder/​barlib.lua"​] = "/​subfolder",​--Places the file in a subfolder in the user-specified folder
-      ["​master/​somefolder/​libfolder/"] = "/"​+      ["?master/​somefolder/​something.cfg"] = "/" ​-- This file will only be installed or updated if it doesn'​t exist already, unless option -f is specified
     },     },
     dependencies = {     dependencies = {
Line 115: Line 119:
   },   },
   ["​yet-another-package"​] = {   ["​yet-another-package"​] = {
-      ​...+          ​...
   }   }
 } }
Line 136: Line 140:
   ["​oppm"​] = {   ["​oppm"​] = {
     files = {     files = {
-      ["​master/​op-manager/​oppm.lua"​] = "/​bin",​ +      ["​master/​oppm/​oppm.lua"​] = "/​bin",​ 
-      ["​master/​op-manager/​etc/​oppm.cfg"​] = "//​etc",​ +      ["​master/​oppm/​etc/​oppm.cfg"​] = "//​etc",​ 
-      ["​master/​op-manager/​lib/​oppm.lua"​] = "/​lib"​+      ["​master/​oppm/​lib/​oppm.lua"​] = "/​lib"​
     },     },
     name = "​OpenPrograms Package Manager",​     name = "​OpenPrograms Package Manager",​
Line 144: Line 148:
     authors = "​Vexatos",​     authors = "​Vexatos",​
     note = "If you are running this program on a floppy disk, run 'oppm install oppm' to install this program locally on your main Hard Drive.\n Consider running 'oppm update oppm' to get the latest version of this program.",​     note = "If you are running this program on a floppy disk, run 'oppm install oppm' to install this program locally on your main Hard Drive.\n Consider running 'oppm update oppm' to get the latest version of this program.",​
-    repo = "​tree/​master/​op-manager"+    repo = "​tree/​master/​oppm"
   },   },
   ["​drama"​] = {   ["​drama"​] = {