Creating a folder

BlitzPlus Forums/BlitzPlus Programming/Creating a folder

Nike(Posted 2009) [#1]
How would I create a folder in blitzplus? Like if someone downloaded my program, could I create a folder on there computer to store my game in?


Matty(Posted 2009) [#2]
If you really want to reinvent the wheel you can write your own installer, otherwise a free one like "innosetup" would be suitable.


schilcote(Posted 2009) [#3]
Right click --> new --> folder. :)


Sauer(Posted 2009) [#4]
The CreateDir command can do this.

http://www.blitzbasic.com/bpdocs/command.php?name=CreateDir&ref=goto


Nike(Posted 2009) [#5]
Thank you!


Nike(Posted 2009) [#6]
Ok now I just have one more problem, how would I get a .exe to save it's self in that folder?


Sauer(Posted 2009) [#7]
Well, your best bet is to get an installer, like what Matty suggested. But, you could write your own setup program that places files where you need them on your user's computers.

So you would have two .exe's... one for putting stuff everywhere, and the actual game with all it's media.

This is a pretty bad solution though. Innosetup can pack all your media and game files into a single setup .exe and unpack them where the user wants, not where YOU think it should go. Also, you might run into security issues if you're trying to place things in the root directory or Program Files.

You should try Innosetup, and if that isn't your style, just pack all your media and game into a single exe using Blitz Media Linker and just distribute your game as a single .exe that doesn't install. For most small applications and games, this is your best bet.


Nike(Posted 2009) [#8]
I dont understand how to use innosetup though. Can someone explain how to use it?


Sauer(Posted 2009) [#9]
Here's a youtube video tutorial, I didn't watch it, but its the first thing that came up on ask.com search:

[a http://www.ask.com/bar?q=innosetup+tutorial&page=1&qsrc=121&ab=1&u=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2CnmtTUpwpw]http://www.ask.com/bar?q=innosetup+tutorial&page=1&qsrc=121&ab=1&u=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2CnmtTUpwpw[/a]

Just google (or ask.com) "Innosetup Tutorial" you'll find something.