index
Repository installation
users can host their own file repository, this allows them to share their own programs with the world wide web, host a fork or run their own private/local repository without needing access to minux's primary servers.
how a repo/apt works
when installing a package, mapt will look trough it's source list and contact the listed url's looking for a manifest file
this file tells mapt if the package exists, what version is it, what files it contains, etc.
requirement - webserver
You will need to host a real webserver for APT to function, it uses HTTPS. webhosts (including free ones) could work if they don't alter pages or requests.
local network or localhost works, it does not need to be accessible over the internet if you intend to use it on your local network.
still it needs to be an actual webserver (eg: apache) using HTTPS and not an ingame system.
make sure to test your webserver by having an index.html file in the webroot and visiting this page with your computer, if you can open it then your webserver is done.
downloading a base
download a version of the repository files here
pick your favorite version, we recommend latest.
Installing the files
create a folder in your webserver's webroot, this will be used to host the repository.
extract the files. in our case this folder is "/3.0/"
you can now point APT to your own server using apt -s or point other people to it.
what URL to point mapt at?
where you extracted the files and "manifest" and "repository" split, THAT is the start of the repostory
eg:"https://apt.minux.cc/" is the domain name (or ip) of our server, add the folder you made in your webroot to this url, for us this is "/3.0/"
"https://apt.minux.cc/3.0/" is the url to point mapt to, the command becomes "mapt addsource https://apt.minux.cc/3.0/"
making a custom netinstaller for your repo
this final step is not required, it will allow you to use the netinstaller without having to manually type your apt url each and every time.
open the netinstaller in your favorite editor, change the "server" url variable at the top of the file to yours and set your preferred default configuration.
that's it.
we are done with the repo server itself.
below follows more information on the mapt system itself.
what does mapt do?
when the "getpack" function is called, mapt will look for the requested package manifest file in "/3.0/manifest/programname.db"
this file contains installation instructions so mapt knows what files to download, where to find them, what dependencies are required, etc.
mapt will first install the missing dependencies (or update them) in the order provided in the manifest.
now mapt will download and install all files from the filelist in the manifest.
it will then run the "install=" line if provided, launching the program's installation instructions or setup wizard.
finally it will rebuild the system's bootup cycle to include your program's instructions and soft-reboot.
the update function will download just the manifest and if it finds the version number to be different it will trigger getpack
adding software to your repository
program files - the files of your program.
create a folder with your program's name inside the "repository" (eg: /3.0/repository/myprogram) folder, place your software in there as you would on the CC computer (example)
Manifest file - download instructions for mapt
create a manifest file in the folder "manifest/" (eg: /3.0/manifest/) with your program's name and the extention .db (eg: /3.0/manifest/minesweeper.db)
add the following content to said file:
MAPT=true | you can switch the true to false if you want your program to be unavailable for a while. must be on the first line.
version=x.x | version number used to check for updates, changing this number will trigger mapt to reinstall the program on update check.
author=yourname |optional, credits to the authors are a must, of course. fill in your name or alias.
install=pathtoinstaller |optional, script to run on installation, this will run directly after the install is completed.
cleanup=pathtoinstaller |optional, script to run on removal, this will run just before the files are deleted.
marking dependency's - optional
if you want apt to also install another program (dependency/library) you can instruct apt by starting a line with [depstart], then each additional program on a new line, end with [depstop]
eg:
[depstart]
netlib
minesweeper
[depstop]
file list - required
last step is adding the file list, this is used when the software is removed using apt -r, start a new line with [filelist] followed up by a list of your program's files. while apt will work and install software without this step it will not be able to uninstall if this list is missing.