-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added instructions to create your own package
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Make your own package | ||
|
||
Making your own packages is simple and easy. | ||
|
||
1. Open the packages-devel directory | ||
|
||
2. Create a JSON file with the details of your program | ||
|
||
3. In a terminal, run ```portprog --devel``` | ||
|
||
4. Run ```environment.bat``` and then test your new package | ||
|
||
## The JSON file | ||
|
||
What do you put in your JSON file? Let's take a look at cmder.json | ||
|
||
```json | ||
{ | ||
"Name" : "cmder", | ||
"Zip" : "cmder.7z", | ||
"Url" : "https://github.com/cmderdev/cmder/releases/download/v1.3.11/cmder.7z", | ||
"Fetch" : "web", | ||
"Plan" : "zipWithNoDirectory", | ||
"Type" : "Application", | ||
"BinDir": "/" | ||
} | ||
``` | ||
|
||
The JSON file contains all the information needed to download and install your program. Let's take a look at the fields: | ||
|
||
* Url - Download the zip from here | ||
* Zip - The name of the zip file that will appear on disk. We use wget to download the zips, so you can check this manually with wget | ||
* Name - is the name of the target directory in the install directory. See the options ```zipWithDirectory``` and ```zipWithNoDirectory``` for more information | ||
* Fetch - only web is supported for now | ||
* Plan - Currently has three options | ||
1. ```zipWithDirectory``` - Your program is in a zip file (.zip, .tar, .7z, .rar). The zip file contains a directory, and all your programs are inside that. In this case, you MUST use the name of that directory in the ```Name``` field. | ||
2. ```zipWithNoDirectory``` - Your program is in a zip file, but all the files are at the top level. Portprog will create the directory named in the ```Name``` field, and unpack your directory there. | ||
3. ```msi``` - You are using an MSI installer package. The package will be unpacked into the directory named in the ```Name``` field, and your program probably won't work | ||
4. There is no 4 | ||
* Type - Only application, for now. If your zip file doesn't contain an application (e.g. it is just data), leave the field empty | ||
* BinDir - The directory, _inside the zip file_, that contains the executables for your program. Usually "/bin" or just "/" | ||
|
||
Good luck and enjoy! |