Posted 06 May 2013 - 11:07 PM
ccPackager
What it does?
The packager will take a directory and turn it into one file. This file can then be distributed through HTTP or other methods. Once the client receives the file, they can execute it (without having any dependencies installed (except for CC and its APIs of course)) and it will recreate the directory structure with all the files that were there originally. It's quite a simple program and it does not require the client to have anything installed beforehand.
Why I made it?
I saw a lot of people doing this:
shell.run("pastebin", "get", "code1", "file1")
shell.run("pastebin", "get", "code2", "file2")
shell.run("pastebin", "get", "code3", "file3")
shell.run("pastebin", "get", "code4", "file4")
shell.run("pastebin", "get", "code5", "file5")
shell.run("pastebin", "get", "code6", "file6")
shell.run("pastebin", "get", "code7", "file7")
That is a lot of unnecessary HTTP requests. It is both inefficient and slow for the client. If you were using ccPackager, you would only need to make one HTTP request.Since a lot of people use the method above, it is very hard for someone who doesn't have the HTTP API enabled to download the files and recreate the directory structure. They must download each file individually and create each directory individually.
How to use it?
If you want to make a package, then simply download ccPackager (download link below). Run the file with 2 arguments - sourceDir, destination.
For example, if I saved the program as ccPackager, I would run:
ccPackager myProject-v1.0 myProject
myProject-v1.0 will be the directory of my project and myProject will be the file that ccPackager will generate.If you want to extract a package, it's simple, all you need is the package and just run (assuming package name was 'myProject'):
myProject /programs/myProject
This will extract the program to /programs/myProjectNote: If you extract the package to a directory that already exists, it will replace files that already exist with the ones in the package. It will leave all other files untouched. This makes it possible to use ccPackager for auto-updating your programs as well.
DOWNLOAD
To-do:
- Add an advanced package option which lets you toggle files/directories you want to extract.
v1.0
- Initial release.
Any suggestions and constructive criticisms are appreciated.