how to make our c++ application bootable ? so we can boot from usb .... ?
please help my friends i have searched a lot on internet but couldn't find appropriate thing ?
thanks in advance ?
Well, this topic isn't particularly C++ related, but....
When you say bootable, do you mean that you simply want it to auto-run from the USB stick when the USB stick is inserted?
Or do you mean that you want the computer to boot from USB into your product when the computer is turned on?
If it's just a case of auto-running the app when the USB stick plugged in, then you just need to create an autorun.inf script file which will run your application when the USB device is inserted. But you should note that for security reasons, a lot of savvy Windows users will have auto-play disabled. So this could prove more or less pointless as windows users with autoplay disabled would have to manually start your program themselves.
But if you want to boot into your app from startup via USB; As far as I'm aware, you'll need to create and include your own minimalist version of an OS on the USB drive to run the app in.
In other words, your minimal OS boots from the USB drive and then runs your application.
I don't think it's possible to do this with Windows, for starters you'd have to have to install a heavily cut-down and customised version of windows on each USB stick you distribute which would prove expensive for you what with the cost of Windows licences. Secondly, I'm not sure whether Microsoft would allow this kind of modification. I guess you'd have to contact them to find out more.
But if your application will run on Linux, or could be ported to run on Linux, then perhaps you could create your own minimal linux 'liveCD'-style distro which could be put onto a USB stick with your app. Thus allowing you boot into linux and auto-run your application.
This would be rather a lot of work though and would require a lot of knowledge of the Linux OS. You'd have to pick an existing linux distribution, remove all of the unnecessary system components and install any additional dependencies your app has. And then there are shedloads of other changes that would need to be made (all kinds of esoteric config files and settings).
Otherwise, you could perhaps take a look at the Linux From Scratch project and create your own custom linux distribution from the ground up. So you start with literally nothing and work your way up to your own Linux OS. That way you have full control of everything that goes into the OS.
Aranaths link should also be useful for you!
Hope this is of some help.