You have not properly planned the distribution of your program and now you need to consider your options. There are many options, some good, some less good and some outright bad.
You have stated your problems as follows:
- Your friend knows nothing of computers
- Your friend lives far away
- Your program uses a database
- Your program is web based
From that, I draw the following conclusions:
- The installation process must be completely automatic, either by clicking an icon or preferably by your friend not needing to do anything
- You can't go over to your friend to fix things. Telephone support will be costly if not impossible.
- You need to carry the whole database with your program, and the less installation the database requires the better.
- You need to either create a GUI, or have a webserver that your friend then can access with the browser.
From these requirements, I see the following options emerging:
- PAR executable with a GUI - this is most likely the best way to distribute your application. Create a single file out of your program with PAR, burn that on the CD and send it to your friend. The friend will have to start the program from the CD or copy it to the HD and start it from there. You will need to create a GUI, using Tk or Win32::GUI or wxPerl. You will need to switch your database from MySQL to DBD::SQLite, as SQLite can be embedded in the PAR executable and requires no further installation.
- PAR executable with embedded web server - this is the second best solution from the user point of view and likely the best solution, as you only need to write a small Perl HTTP server thant then runs your (CGI) program as normal. You also launch a browser window which your friend then uses to connect to your application. Again, you will need to switch your database to SQLite, as you can't really install or embed MySQL.
- Custom Knoppix CD which launches your program - this will be hard work, but it will allow you to create a really stand-alone application that doesn't even need an OS. Your friend boots from the CD and gets launched directly into your application. Here, you can install MySQL onto the OS and also have Apache on the CD. The drawback is, that your friend will have to reboot just to use your application and no other applications will work at the same time. It is also hard work to create/remaster such a CD, but once your friend boots it, there is a complete Linux installation running.
- Application Service Provider You could also host the application for your friend by renting a webserver and letting your program run there and let him use it from there. This is most likely the easiest way for both of you, but it may be expensive if you don't already have a server you can use for that.
I recommend the PAR route, if the Application Service Provider route can't be taken.
| [reply] |
I've had an almost similar problem there in the sense that I wanted to makes running perl scripts from a removable media.
A good and a bad consequences when running from CD-Rom are:
- The bad is that the media is read only.
- The good is that you have reasonnable space left on it to embed all you need (perl, apache, mod_perl, mysql,...).
Autostart may be made with the help of Win32 autorun features and perl-in-batch scripts like those you may find in Indigo Perl install script (setup.bat):
I can't tell you a lot about MySql, but your bootstrap script may copy database dump from cdrom somewhere writable (eg. $ENV{TEMP}), alter environment variables and registry, rewrite configuration files, then start MySql, Apache and open a browser targeted a choosen url.
____
HTH, Dominique
My two favorites:
If the only tool you have is a hammer, you will see every problem as a nail. --Abraham Maslow
Bien faire, et le faire savoir...
| [reply] [d/l] |
I don't mean to be a stick in the mud, but what the heck does any of this have to do with Perl? I'll take a stab at a response, anyway.
First of all, what is your friend going to do with it? If all he is going to do is view the data in the database, then convert the script to cgi, put it and the database on a server that has internet access, and give him the url. If he is going to modify the data, then he is going to have to learn sql and possibly Perl.
So how do I burn all those file in the CD
get cd burning software, install it, and RTFM.
I consider about compiling it to .exe but how to do that?
google Perl2EXE or PerlApp
and what about my database(MySql)?
If he is going to run the perl Program locally he will need to install MySql.
any further questions really need to be asked somewhere else.
davidj | [reply] |
If you and your friend have no idea on how to transfer stuff using a CD then you need a lot of help. Your best bet would be to convert it to cgi and put it on a server that has access to the net. Then your friend can view it without the hassle of converting it to .exe or sending the database and files on a CD through the mail. | [reply] |