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

Instamaker

Started by RoD, 06 August 2013 - 04:32 PM
RoD #1
Posted 06 August 2013 - 06:32 PM
InstaMaker 0.5 - Create install programs easily!
This is the first of many updates, i hope! :D/> I was making a program and i wanted to have some "resources" so that the main program could run them without having it in the code. So i saw that there was a lot of files and really messy, so i created a simple installer(no internet connection or http need) to make it easy. The installer will unpack the files and save them in a folder and unpack the main program normaly, then the installer will create a uninstall program to easly delete all the file created by the installer.
I got some trouble and it was getting hard, but i finished it with no -visible- bugs.
Then i wonder if i could make it more simple and easy to make. And then i started working in InstaMaker, the program to create installers easily!

Features of InstaMaker:
-its easy to use
-create one single file to install multiple files without internet connection
-automatically create uninstall file wich uninstall all the files created by the installer
-has some options(so far, add a progress bar or not and installer name)

ScreenShots:
Spoiler
file:///C:/Users/Rodrigo%20Neves/Downloads/screenies/46ee2b99dea3490a3e14f2f6b1232df2.png

Bugs:
-sometimes, when asked if want to add more file to installer, the command doesn't work and asks again(not a big deal but working on fix)
-if no file is loaded or try to load a unexistent file it gives an error
-not a bug, but so far it don't suport capital letters commands
-please post a unknown bug that you experienced below

Incoming features:
>Already working on it:
  • Folders suport(to load files in folders)
  • Uninstaller with progress bar
  • Commands: "dir()" to see the files without exiting the instamaker, and the "f()" to add a folder
>Maybe implemented:
  • Http and pastebin connection
  • GUI
Please remember to tell all the bugs you found, tell your ideas and help improve the code! Thanks :)/>


Download: pastebin get jNUrS2dt instamaker
svdragster #2
Posted 07 August 2013 - 09:56 AM
Nice job!
At first, a bug :/

uninstall = fs.open("uninstall" , "a")
uninstall.write[[fs.delete("mw")
]]
uninstall.close()
At this part it errors: attempt to index ? (nil value)
and I have no idea why :blink:/>

Also to make your program more safe, don't use shell.run("clear").
Make a function which sets the cursor to pos 1, 1 and clears the screen.

Some people want to troll and make a program with the same name to do malicious things.
RoD #3
Posted 07 August 2013 - 10:17 AM
Nice job!
At first, a bug :/

uninstall = fs.open("uninstall" , "a")
uninstall.write[[fs.delete("mw")
]]
uninstall.close()
At this part it errors: attempt to index ? (nil value)
and I have no idea why :blink:/>

Also to make your program more safe, don't use shell.run("clear").
Make a function which sets the cursor to pos 1, 1 and clears the screen.

Some people want to troll and make a program with the same name to do malicious things.
Ah thanks for reporting the bug and the sugestion! :D/> i really want to make that function but so far i am more focused in the program itself :P/>
About the bug… this may be caused by the instamaker tryed to open an file that does not exist, but as i can see the error is in the installer and not in the instamaker so this may just a conflict with that same error. I didn't get that error so maybe if you could tell the options and the files that you choosed i may figure out what happen :P/>
Sorry about my english and thanks for the replie :D/>
svdragster #4
Posted 07 August 2013 - 11:37 AM
Actually append mode doesn't work anywhere :o/>

You should do the clear function right now I guess. You could just make the 4 line function and then do find + replace all the shell.runs to clear() :P/>


If this thing is ever gonna work or me I and support multiple folders I will definetly use it for my upcoming program!
RoD #5
Posted 07 August 2013 - 12:43 PM
Actually append mode doesn't work anywhere :o/>

You should do the clear function right now I guess. You could just make the 4 line function and then do find + replace all the shell.runs to clear() :P/>


If this thing is ever gonna work or me I and support multiple folders I will definetly use it for my upcoming program!
great :D/> i will work on that right now
RoD #6
Posted 07 August 2013 - 02:44 PM
Actually append mode doesn't work anywhere :o/>

You should do the clear function right now I guess. You could just make the 4 line function and then do find + replace all the shell.runs to clear() :P/>


If this thing is ever gonna work or me I and support multiple folders I will definetly use it for my upcoming program!
Already replaced the shell.run("clear") and the download link is updated, try the program :)/>
DarkEspeon #7
Posted 07 August 2013 - 08:08 PM
uninstall = fs.open("uninstall" , "a")
uninstall.write[[fs.delete("mw")
]]
uninstall.close()

Change fs.open(filename, "a") to fs.open(filename, "w") because it creates the file in write mode, but not in append mode, also, I never knew that doing filename.write[[fs.delete("mw")]] worked… interesting…
RoD #8
Posted 08 August 2013 - 08:11 AM
all right so the append mode isnt working because its the first file to be written? I mean if i change it to "w" it will delete all the content in the uninstall file and replace it by that and i dont want that :/
svdragster #9
Posted 08 August 2013 - 11:36 AM
you could get all the contents of the file, store it, and write it into the file with the new stuf.
I never knew that doing filename.write[[fs.delete("mw")]] worked… interesting…
I think it's just like " ", it works everywhere.
DarkEspeon #10
Posted 08 August 2013 - 12:09 PM
you could get all the contents of the file, store it, and write it into the file with the new stuf.
-snip-
true, wouldn't be to hard to write up… If i wanted to I could probably get a function that does that if you needed…
svdragster #11
Posted 09 August 2013 - 08:05 AM
That would be less than 10 lines.
RoD #12
Posted 02 September 2013 - 05:49 AM
Maybe… And sorry for the delay(i was on vocations) so any improvements or ideas?
nutcase84 #13
Posted 02 September 2013 - 07:26 PM
Screenies? I might use this for my secret project I've been working on…
RoD #14
Posted 09 September 2013 - 12:20 PM
Screenies? I might use this for my secret project I've been working on…
Done!