2151 posts
Location
Auckland, New Zealand
Posted 17 March 2013 - 10:06 PM
Update 2015: I haven't touched this in over two years, but checkout
this which replaces this and adds a bit more.
Update, 3rd April I've updated the Package Maker to support using the root folder and some crashes.
In short, what this does is it gets all the files in a folder and puts the in to one file. When you run that file is will extract all the files back in to their original file/folder structure.
Almost everyone these days is making their own fancy install script that downloads each file one by one. But what are the people that don't have the HTTP API meant to do? Or what about the people who don't know how to make an install script? Package Maker makes HTTP based installers a thing of the past.
My main 'goal' in ComputerCraft is to essentially allow non-coders/tech savvy people to use the computers. Most people either can't be bothered or don't know how to enabled the HTTP API. Nor can they be bothered/have access to copying files in to their save file. So, what is a way the we can get information to the users computer with out them having access to the internet or their save folder? The user. We simply get the user to copy and paste the package code in to their Lua prompt hit enter and Voilà! You have a new OS, etc. on your computer. Now, you can of course use Pastebin to download the package, then simply run the file.
So this makes it possible to:Give users without access to their save file (Multiplayer) or the HTTP API the ability to use your program.Remove the need for the developer to make a special installer.Remove the need for the developer to have to host tons and tons of files.
Usage
PkgMake <path to the source folder> <name of the package>
For making a package of the root folder simply use '/'.
Download
(I recommend you save the file as 'PkgMake', but it's up to you)
pastebin get K8Bc0WB3 PkgMake
If you have any feedback/problems, give me a yell.
Also, I would like feedback on the copy and paste method. I would like to make it fool proof. Was the method above easy/did it workIt It
It has become apparent that copy and pasting will not work, any other ideas on how to do this?
Edited on 30 May 2015 - 07:57 AM
671 posts
Location
That place over there. Y'know. The one where I am.
Posted 17 March 2013 - 11:12 PM
YUS.
Imma mehbeh yoose thiss.
2151 posts
Location
Auckland, New Zealand
Posted 17 March 2013 - 11:15 PM
Sorry, I've just found a huge bug. I've requested this to be taken down, I'll repost when it's fixed.
515 posts
Location
Australia
Posted 18 March 2013 - 12:28 AM
Was the bug that you had an excrutiatingly large amount of \s? If so, I had the same problem when trying to make my own system of packaging :P/>
2151 posts
Location
Auckland, New Zealand
Posted 18 March 2013 - 10:02 AM
Damn they didn't take it down…
And yes, It was. I had a serialisation issue. I have fixed it now.
1688 posts
Location
'MURICA
Posted 30 March 2013 - 05:17 AM
This is a good idea, minus the fact that larger projects/groups of programs are bound to span at least thousands of characters long.
You should, perhaps, include some sort of compression - either obfuscate the program further (as in, replacing all variables with a,b,c and the likes, like real obfuscation) or compress it into a string, then include an uncompression algorithm in your package string.
2151 posts
Location
Auckland, New Zealand
Posted 30 March 2013 - 12:22 PM
What is the problem with spanning thousands of characters? If size is anything to go by, PearOS has a bit over 270000 charters in a package.
Now, I've tried copying and pasting and it doesn't really work, unfortunately. However, there's no problem when using a package.
If get around to it I will add compression.
695 posts
Location
In my basement.
Posted 31 March 2013 - 09:56 AM
Can I make it exxtract to the root folder?
892 posts
Location
Where you'd least expect it.
Posted 31 March 2013 - 10:17 AM
Can I make it exxtract to the root folder?
Extract to "/" I think.
2151 posts
Location
Auckland, New Zealand
Posted 31 March 2013 - 12:54 PM
Can I make it exxtract to the root folder?
This is one thing I need to fix. If you do that it also includes all the rom files.
156 posts
Posted 31 March 2013 - 07:35 PM
May I recommend trying
http://www.computercraft.info/forums2/index.php?/topic/10738-compressor/ for a compressor?
It works pretty well and is easy to make into a function/API
695 posts
Location
In my basement.
Posted 01 April 2013 - 07:27 AM
This is one thing I need to fix. If you do that it also includes all the rom files.
Well.. I think I can live with that.
11 posts
Location
Aperture Enrichment Center
Posted 31 May 2013 - 06:44 PM
I'm having a problem with compressing the Aperture Operating System (
http://www.computerc...upgraded-to-v3/), which contains a number of files and folders. It will begin, but I get a serialization error, and only part of the file will be compressed. It also doesn't seem to close the created file properly, either. Thanks for any help!
770 posts
Location
In My Lonely Little Computer Corner
Posted 07 June 2013 - 03:18 PM
YES! I will use this for my OS…
149 posts
Posted 08 June 2013 - 01:45 PM
suggestion :
Perhaps a gui based packeger can be made. use a file browser to add directories and paths you wish to package. This can function to help "ignore" certain files?
suggestion2/question :
Is there away to make it ignore certain paths?
if not then request for such an option.
But overall great program and ill be abusing this for save games and game distributing with platformMe!
45 posts
Posted 08 June 2013 - 10:30 PM
I made a new version fixing the glitch where if a file happens to have !@#& in it, it creates a new line. It also makes it so the saved file is on multiple lines and not just one. Also, unneeded white space is removed.
pastebin get rhksm0kC PkgMake
1610 posts
Posted 23 September 2013 - 11:37 AM
Haven't tried this yet, but if I'm correct this takes multiple files and combines them into one abnormally long string? Sweet! I'll have to try this!
Also, I read that you can paste the code into it to use it without http, but the paste function is limited from what I can tell, only pasting the first bit of the string - is there any way I could make the paste function work?
43 posts
Location
Spain (or Hisperia)
Posted 12 February 2015 - 05:27 PM
Hello!
I run into an error when trying to unpack anything. It seems to create the package well, but when unpackaging, this happens.
I have modified the generated code to show where it fails, and it seems to be when writing. Any help would be greatly appreciated. Thanks!
8543 posts
Posted 12 February 2015 - 05:46 PM
The issue may be due to the fact that this program was created back when the serialization function returned a single-line serialized table. Now that it returns a more readable multi-line table, the processing to extract the files may be choking due to being given garbage data.
2151 posts
Location
Auckland, New Zealand
Posted 12 February 2015 - 08:57 PM
Yea, I haven't really touched this program in almost two years. I have a program a bit like this which I've mainly been using for personal use. Instead of having to unpackage though you can simply run the package as a program, as well as being able to extract it. I might post it at some point.
350 posts
Posted 29 May 2015 - 08:42 PM
Right now when i run the extractor the files are just blank.
http://pastebin.com/kPPfaT89
7083 posts
Location
Tasmania (AU)
Posted 30 May 2015 - 01:49 AM
As mentioned on the previous page, it hasn't been updated to account for changes in ComputerCraft since it was first posted.
350 posts
Posted 30 May 2015 - 09:51 AM
Sorry i was in haste when i posted the problem i didn't even researched before. My bad.
2151 posts
Location
Auckland, New Zealand
Posted 30 May 2015 - 09:56 AM
Yeah I haven't really touched this in about two years.
I made something that replaces this though, Compilr, it's not publically released as it was really just to help me get stuff from my emulator to servers.
You can check it out here:
http://pastebin.com/dJd0B0V8If I recall correctly, simply run it as:
compilr your/path/hereIt will save it to /build
This actually makes all the files one executable (and extractable with the argument –extrac) program as well.
Edited on 30 May 2015 - 07:58 AM
350 posts
Posted 30 May 2015 - 11:20 AM
Thank you that would be useful as i needed your package maker to also send programs from emulator-server. :)/>