This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
LNETeam's profile picture

CCAPT v2

Started by LNETeam, 26 April 2015 - 01:37 AM
LNETeam #1
Posted 26 April 2015 - 03:37 AM
Hello Computercraft Forums



It's been some time since I did anything in regard to CC, so I figured I'm past due. With work I've been dabbling more in the arts of Linux command line. We all know we need some way to get programs from the internets, to us; right? Well that's what package managers are for, in this case: apt-get. I taken the liberty of making a simple yet fluid and dynamic environment to submit applications to a repo which contains definitions to Github repos that users can download. For example, in order to use my git program, you'd need to download it, drag it in customize and then you can use it for your applications, yet you lack package management. Well I'd like to introduce CCAPT!



CCAPT? What?



CCAPT is a command line program for fetching files, installing them and registering them to a registry so you can update and remove them. I developed a front end developer port online You can see the login portal at: http://lneteam.ddns.net.



YOU CAN NOW MAKE YOUR OWN ACCOUNT: http://lneteam.ddns.net/reg.php



Features
  • Project dependency resolving: The developer simply adds a INSTALL file to the root of their Github repo with a few lines of code. Within that code, a developer could point to other packages as prerequisites and will attempt to install those dependencies prior to installation.
  • Post and Pre Operations: A developer can add optional pre install actions, for example to prepare a certain file system, whatever. They can also issue post install actions to run at the conclusion of install. for example if you downloaded an install script, you could have that execute immediately after install. (Kinda like MySQL during install)
  • Dynamic Developer base: Everyone gets their own console to add, update, and remove their packages. We store passwords in an encrypted database hash to ensure YOUR security.
Thank you for looking and hopefully see your project in the repo!





Current Web Server: http://lneteam.ddns.net





P.S If you have a Github, please submit any issue tickets so I can address them. Thanks! :D/>



Info: Your INSTALL file should be in the root of your repo and the link you provide, must be a RAW link to it. Most repos will allow you to view a file in a raw format, click that and paste the link for your location.


install =
{
		PreAction = function()
				if (fs.exists("/sys")) then
						fs.delete("/sys")
				end
		end,
		Dependencies = {"ccgit"},
		InstallHierarchy =
		{
				{"/M-Tech/startup","/startup"},
				{"/M-Tech/sys/boot/main.int","/sys/boot/main.int"},
				{"/M-Tech/sys/boot/portal.int","/sys/boot/portal.int"},
				{"/M-Tech/sys/boot/version.info","/sys/boot/version.info"},
				{"/M-Tech/sys/boot/~iso-temp/BIOS","/sys/boot/~iso-temp/BIOS"},
				{"/M-Tech/sys/boot/~iso-temp/bootstrap","/sys/boot/~iso-temp/bootstrap"},
				{"/M-Tech/sys/config/bootPrefs.cfg","/sys/config/bootPrefs.cfg"},
				{"/M-Tech/sys/config/sys.cfg","/sys/config/sys.cfg"},
				{"/M-Tech/sys/frameworks/CAUTH.frmk","/sys/frameworks/CAUTH.frmk"},
				{"/M-Tech/sys/frameworks/CUIKit.frmk","/sys/frameworks/CUIKit.frmk"},
				{"/M-Tech/sys/frameworks/kernel.frmk","/sys/frameworks/kernel.frmk"},
				{"/M-Tech/sys/frameworks/mtech-boot.frmk","/sys/frameworks/mtech-boot.frmk"},
				{"/M-Tech/sys/frameworks/mtech-core.frmk","/sys/frameworks/mtech-core.frmk"},
				{"/M-Tech/sys/lib/errors/0x001C.libx","/sys/lib/errors/0x001C.libx"},
				{"/M-Tech/sys/lib/errors/0x001D.libx","/sys/lib/errors/0x001D.libx"},
				{"/M-Tech/sys/program_files/plc","/sys/program_files/plc"},
				{"/M-Tech/sys/programs/os/antiviral.af","/sys/programs/os/antiviral.af"},
				{"/M-Tech/sys/programs/os/dataman.af","/sys/programs/os/dataman.af"},
				{"/M-Tech/sys/programs/os/hpr","/sys/programs/os/hpr"},
				{"/M-Tech/sys/programs/security/portman.af","/sys/programs/security/portman.af"},
				{"/M-Tech/sys/programs/security/togglev2","/sys/programs/security/togglev2"},
				{"/M-Tech/sys/programs/c-chat.af","/sys/programs/c-chat.af"},
				{"/M-Tech/sys/programs/vman.af","/sys/programs/vman.af"},
		},
		PostAction = function() os.reboot() end,
}
return install

This is what an INSTALL file should look like. postAction and preAction are optional

Here is the current list of enhancements/bugs: https://github.com/L...am/CCAPT/issues
If you want anything or have a problem, report them here.

Pleased to announce that it is now working! Some features are still not implemented but, it now can download single scripts from the repo. I used MKlegoman357's Redfile for a demo.









Edited on 26 April 2015 - 01:38 AM
Creator #2
Posted 26 April 2015 - 11:34 AM
Wow, this is real great. We are on our way to have a script repository. So, it gets programs from github?
LNETeam #3
Posted 26 April 2015 - 02:07 PM
Yes, users add their programs to github then add an install file to properly install them