- NSIS Discussion
- Apache,MySql,php
Archive: Apache,MySql,php
Ethernal
18th March 2003 14:30 UTC
Apache,MySql,php
hello, im trying to create an install script to acording to the user's component
choices :'Apache','MySQL','PHP' to install the software, both apache and mysql have install programs i need to execute in order and php is zipped wich i need to unzip to 'C:\php4' and copy some of its DLL's to c:\windows\system32 ...
i know how to do all the operations but where do i put them? im macros, pages????
also i need to detect somethings after apache is installed like its install dir, that i do using ReadRegStr
how to conjugate all of this?
thanks
kichik
18th March 2003 14:46 UTC
Welcome to the forum! :D
What you should do is download 2.0b3a and have a look in the new tutorial (or read it online). As it was written for first time users of NSIS I hope it will able to help you ;)
If, after you read, you still don't know that what you are looking for are sections then we'd love to hear that and improve the tutorial.
BTW, how come there are so many users lately asking about Apache, Tomcat, MySQL and PHP? Is there a contest for the best installer or something like that? :)
Ethernal
18th March 2003 14:59 UTC
the problem is that web aplications are a bit complex to install, for example, an application using MySQL, Apache and PHP you sell to a client that barely knows it's way around M$ Office :)
If u dont want or cannot go install it yourself, the steps required are dificult to a simple user's point of view ...
1. Install Apache
2. Install PHP
3. Setup PHP
4. Setup the application inside Apache ServerRoot
it seems easy doesnt it? :D
but it splits into multiple small tasks
:hang: a simple user has dificulties in
kichik
18th March 2003 15:07 UTC
Show me one user that doesn't know all of the options PHP has! :p
Ethernal
18th March 2003 15:30 UTC
err im reading the tutorial and i on the job :D i detect apache and execute the installer as needed:
-----------------------------------
...
ReadRegStr $1 HKLM "SOFTWARE\Apache Group\Apache\2.0.44" ServerRoot
; check if Apache is already installed using the registry
StrCmp $1 "" 0 Continue ; IF Apache in not installed
MessageBox MB_OK "O servidor Apache vai ser instalado"
; Apache Installer execution
ExecWait "$EXEDIR\apache_2.0.44.exe"
Continue:
ReadRegStr $1 HKLM "SOFTWARE\Apache Group\Apache\2.0.44" ServerRoot
MessageBox MB_OK "Apache installed in $1"
...
----------------------------------
now how can i detect if a directory exists ? :D like c:\mysql or even better if the file 'winmysqladmin.exe' exists inside 'c:\mysql\bin' ???
kichik
18th March 2003 15:34 UTC
Use IfFileExists.
Ethernal
18th March 2003 15:58 UTC
I noticed you are from Jerusalem, Israel ... you live there? Unfortunatly thing are going to heat up in there :\
I dont know who's worst, if Bush or Saddam ...
kichik
18th March 2003 16:02 UTC
Don't worry, I have my gas mask ready... :D
Ethernal
18th March 2003 16:07 UTC
yeeahh that's the spirit laddy :D
NSIS fun continues :) i believe the NSIS need better flow control suport like if (condition ) then else ... that GotoLabel stuff in functions like StrCmp, IfFile exists etc etc is alittle confusing, i had 2 splitt Apache and mysql in 2 sections :\
Ethernal
18th March 2003 16:15 UTC
Also how can i get values from the user ? :D like password and user :)
kichik
18th March 2003 16:17 UTC
If, else, and other language extensions are planned for NSIS 3.
To get input from the user use InstallOptions (see examples in Contrinb\InstallOptions, Examples\Modern UI).
Ethernal
18th March 2003 16:33 UTC
PS.: sorry for being a pain in the ass :D the other webpage i have loaded is the manual but it's a little confusing also ;)
i would sugest more examples :)
kichik
18th March 2003 16:37 UTC
Well, we are working on it :D
If you, or anyone else, have any suggestion we'd love to hear.
Ethernal
18th March 2003 17:07 UTC
anotehr thing, InstallOptions muhahaha :)
Left=10
Right=-10
Top=17
Bottom=25
what type of coordenates are these? it says in the manual :
"All sizes should be set in dialog units. To get the right dimensions for your controls, design your dialog using a resource editor and copy the dimensions to the INI file."
oh i found it :)
http://www.radsoft.net/resources/rhd/0047.html
kichik
18th March 2003 17:12 UTC
Well, the best way IMHO is just to try it out but if you want a resource editor then I recommend Resrouce Hacker.