13 posts
Posted 10 October 2015 - 12:24 PM
how do i make a proper installer where it copys from my disk to the pc.
installer:
http://pastebin.com/7tGKJj8ki get a error everytime i run it:
bios:14: [string "install"]:2: '=' expected
thanks in advance :)/>
1583 posts
Location
Germany
Posted 10 October 2015 - 07:53 PM
You can't run commands (to be more precise, programs) from within another program by simply writing down what you would use while in shell.
To run another program you have to use shell.run()
Your script could/should look like this then:
version = "1.0"
shell.run("cd /")
shell.run("mkdir os")
shell.run("cp /disk/os /os")
shell.run("cp /disk/gui /gui")
212 posts
Location
Somewhere in this dimension... I think.
Posted 10 October 2015 - 09:35 PM
Better yet I recommend using the APIs built for each use.
version = "1.0" #-- or 1.0 without quotes depending on use
fs.makeDir("os")
fs.copy("disk/os", "os")
fs.copy("disk/gui", "gui")
Edited on 11 October 2015 - 02:24 PM
1583 posts
Location
Germany
Posted 11 October 2015 - 04:43 AM
Better yet I recommend using the APIs built for each use.
version = "1.0" #-- or 1.0 without quotes depending on use
fs.makeDir("os")
fs.copy("disk/os", "os")
fs.copy("gui", "gui")
Yes, this would be " better" performance-wise (less Funktion calls) but it also makes it harder for the OP to write the script.
1023 posts
Posted 11 October 2015 - 05:12 AM
Better yet I recommend using the APIs built for each use.
version = "1.0" #-- or 1.0 without quotes depending on use
fs.makeDir("os")
fs.copy("disk/os", "os")
fs.copy("gui", "gui")
Yes, this would be " better" performance-wise (less Funktion calls) but it also makes it harder for the OP to write the script.
It is generally bad practice to use shell.run for things that can be done with normal functions. It is a horrible thing to learn when you are just starting.
Either way it should be fs.copy("disk/gui","gui")
Edited on 11 October 2015 - 03:12 AM
13 posts
Posted 18 October 2015 - 08:34 AM
i ended up finding out about fs.copy() before i did of shell() so il stick to it, thanks for the ideas :)/>