Jump to content




[Fixed] Package Maker - Easy Program Distribution

utility

24 replies to this topic

#1 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, 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 by oeed, 30 May 2015 - 08:57 AM.


#2 Shnupbups

  • Members
  • 596 posts
  • LocationThat place over there. Y'know. The one where I am.

Posted 17 March 2013 - 11:12 PM

YUS.

Imma mehbeh yoose thiss.

#3 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, 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.

#4 1lann

  • Members
  • 516 posts
  • LocationSeattle

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

#5 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, 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.

#6 Kingdaro

    The Doctor

  • Members
  • 1,636 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.

#7 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, 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.

#8 Mackan90096

  • Signature Abuser
  • 518 posts
  • LocationIn my basement.

Posted 31 March 2013 - 08:56 AM

Can I make it exxtract to the root folder?

#9 MudkipTheEpic

  • Members
  • 639 posts
  • LocationWhere you'd least expect it.

Posted 31 March 2013 - 09:17 AM

 Mackan90096, on 31 March 2013 - 08:56 AM, said:

Can I make it exxtract to the root folder?

Extract to "/" I think.

#10 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, New Zealand

Posted 31 March 2013 - 11:54 AM

 Mackan90096, on 31 March 2013 - 08:56 AM, said:

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.

#11 gamax92

  • Members
  • 157 posts

Posted 31 March 2013 - 06:35 PM

May I recommend trying http://www.computerc...738-compressor/ for a compressor?

It works pretty well and is easy to make into a function/API

#12 Mackan90096

  • Signature Abuser
  • 518 posts
  • LocationIn my basement.

Posted 01 April 2013 - 06:27 AM

Quote

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.

#13 TeaPartyIdiot

  • Members
  • 12 posts
  • LocationAperture Enrichment Center

Posted 31 May 2013 - 05: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!

#14 nutcase84

  • Members
  • 711 posts
  • LocationIn My Lonely Little Computer Corner

Posted 07 June 2013 - 02:18 PM

YES! I will use this for my OS...

#15 ArchAngel075

  • Members
  • 149 posts

Posted 08 June 2013 - 12: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!

#16 MCGamer20000

  • Members
  • 49 posts

Posted 08 June 2013 - 09: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

#17 apemanzilla

  • Members
  • 1,421 posts

Posted 23 September 2013 - 10: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?

#18 MarioBG

  • Members
  • 43 posts
  • LocationSpain (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!
Posted Image

#19 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 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.

#20 oeed

    Oversimplifier

  • Members
  • 2,095 posts
  • LocationAuckland, 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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users