Hi guys...
I am new as a nsis programming, making package for my project for that i have to check is php and php- gtk is installed or not and get the correct version
Can someone pls direct me or tell links
how to do that??
thanx
php & php-gtk
15 posts
i have tried to code but unable to detect php
as
Section "PHP"
ReadRegStr $4 HKLM "Software\Microsoft\PHP" "CurrentVersion"
IfErrors 0 done
MessageBox MB_OK "Your system has PHP"
call peoceed
done:
MessageBox MB_OK "Your system doesn't have php"
Abort
proceed:
SectionEnd
it is giving me the error as::
Error:resolving install function "proceed" in install section "PHP"
Note:uninstall functionsmust begin with "un." ,and install function must not
Can somebody help in finding wat is the error
as
Section "PHP"
ReadRegStr $4 HKLM "Software\Microsoft\PHP" "CurrentVersion"
IfErrors 0 done
MessageBox MB_OK "Your system has PHP"
call peoceed
done:
MessageBox MB_OK "Your system doesn't have php"
Abort
proceed:
SectionEnd
it is giving me the error as::
Error:resolving install function "proceed" in install section "PHP"
Note:uninstall functionsmust begin with "un." ,and install function must not
Can somebody help in finding wat is the error
Let's see:
2. Do you reall need Abort there?
Section "PHP"
ReadRegStr $4 HKLM "Software\Microsoft\PHP" "CurrentVersion"
IfErrors 0 done
MessageBox MB_OK "Your system has PHP"
call peoceed
done:
MessageBox MB_OK "Your system doesn't have php"
Abort
proceed:
SectionEnd 1. What's peoceed? Do you mean proceed? If so, use goto instead of Call.2. Do you reall need Abort there?
When i put tried this in my example you can see the exaple at
http://students.iiit.ac****~dinesh/example.html
it compiles but it behaves starange which i can't understand
in the installer it comes as ...............
InstallDir: "$PROGRAMFILES\example2"
InstallRegKey: "HKLM\Software\NSIS_example2\Install_Dir"
Section: "PHP"
ReadRegStr $4 HKLM\Software\MicrosoftPHP\CurrentVersion
IfErrors ?0:done
MessageBox: 0: "Your system has PHP"
Goto: proceed
MessageBox: 0: "Your system doesn't have php"
Quit
SectionEnd
................
it should not go in done and proceed function then why it is going i used quit instead of "Abort"
Thanx for yr reply
http://students.iiit.ac****~dinesh/example.html
it compiles but it behaves starange which i can't understand
in the installer it comes as ...............
InstallDir: "$PROGRAMFILES\example2"
InstallRegKey: "HKLM\Software\NSIS_example2\Install_Dir"
Section: "PHP"
ReadRegStr $4 HKLM\Software\MicrosoftPHP\CurrentVersion
IfErrors ?0:done
MessageBox: 0: "Your system has PHP"
Goto: proceed
MessageBox: 0: "Your system doesn't have php"
Quit
SectionEnd
................
it should not go in done and proceed function then why it is going i used quit instead of "Abort"
Thanx for yr reply
example is ..
; example2.nsi
;
; This script is based on example1.nsi, but it remember the directory,
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install example2.nsi into a directory that the user selects,
;--------------------------------
; The name of the installer
Name "example2"
; The file to write
OutFile "example2.exe"
; The default installation directory
InstallDir $PROGRAMFILES\example2
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\NSIS_example2" "Install_Dir"
;--------------------------------
; The stuff to install
/* php detection */
Section "PHP"
ReadRegStr $4 HKLM "Software\MicrosoftPHP" "CurrentVersion"
IfErrors 0 done
MessageBox MB_OK "Your system has PHP"
goto proceed
done:
MessageBox MB_OK "Your system doesn't have php"
Quit
proceed:
SectionEnd
Section "file_association"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File "example2.nsi"
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\NSIS_example2 "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\example2" "DisplayName" "NSIS_example2"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\example2" "UninstallString" '"$INSTDIR\uninstall.exe"'
SectionEnd
; example2.nsi
;
; This script is based on example1.nsi, but it remember the directory,
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install example2.nsi into a directory that the user selects,
;--------------------------------
; The name of the installer
Name "example2"
; The file to write
OutFile "example2.exe"
; The default installation directory
InstallDir $PROGRAMFILES\example2
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\NSIS_example2" "Install_Dir"
;--------------------------------
; The stuff to install
/* php detection */
Section "PHP"
ReadRegStr $4 HKLM "Software\MicrosoftPHP" "CurrentVersion"
IfErrors 0 done
MessageBox MB_OK "Your system has PHP"
goto proceed
done:
MessageBox MB_OK "Your system doesn't have php"
Quit
proceed:
SectionEnd
Section "file_association"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File "example2.nsi"
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\NSIS_example2 "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\example2" "DisplayName" "NSIS_example2"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\example2" "UninstallString" '"$INSTDIR\uninstall.exe"'
SectionEnd
Maybe you are using IfErrors incorrectly, because I have php installer..and this both works propertly:
!include "LogicLib.nsh"
Name "example2"
OutFile "example2.exe"
ShowInstDetails show
InstallDir $EXEDIR
Section "PHP"
ReadRegStr $4 HKLM "Software\\Microsoft\\PHP" "CurrentVersion"
${IF} $4 = ""
DetailPrint "Your system doesn't has PHP"
${ELSE}
DetailPrint "Your system does have php: $4"
${ENDIF}
SectionEnd BTW, use [ code ][ /code ] tagsthanx a lot it solved my problem
Onr more thing ,, I will ckecks the presence of php and php-gtk in the system by regisrty keys .. it they will not there i have to install them first ans then continue further ..
for this issue I just need to attach windows binaries as
File "php-5.2.2-win32.zip" or should i also make an seprate package in which i will put all of the files for php-5.2.2
thanx foe the replis.......
for this issue I just need to attach windows binaries as
File "php-5.2.2-win32.zip" or should i also make an seprate package in which i will put all of the files for php-5.2.2
thanx foe the replis.......
There's a ZipDll plugin for extractig ZIPs.
I am trying to download the files using NSISdl as
>NSISdl::download http://www.programmersheaven.com/d/c...F6656&AltURL=2 $0
i have also tried "download_quiet"
But it also didn't work..
it always shows error as "unable to open "
I can further extract it by zipdll plugin...
Can you suggest the error ....
>NSISdl::download http://www.programmersheaven.com/d/c...F6656&AltURL=2 $0
i have also tried "download_quiet"
But it also didn't work..
it always shows error as "unable to open "
I can further extract it by zipdll plugin...
Can you suggest the error ....
unable to open can be:
1. bad url format.
2. url doesn't exists.
3. Can't connect to the server.
4. Firewall blocked.
5. No internet connection.
6. Connection to the server was too long or busy
1. bad url format.
2. url doesn't exists.
3. Can't connect to the server.
4. Firewall blocked.
5. No internet connection.
6. Connection to the server was too long or busy
instead of , nsisdl i used "inetload" but it is always giving
tranfer error;;;
code is
InetLoad::load "http://www.awitness.org/prophecy.zip" $4
Pop $0
StrCmp $0 "OK" dlok
MessageBox MB_OK|MB_ICONEXCLAMATION "Download Error, { $0 }click OK to abort installation" /SD IDOK
;Abort
dlok:
.....
$0 always contains transfer error ...
Can anybody help me in this
tranfer error;;;
code is
InetLoad::load "http://www.awitness.org/prophecy.zip" $4
Pop $0
StrCmp $0 "OK" dlok
MessageBox MB_OK|MB_ICONEXCLAMATION "Download Error, { $0 }click OK to abort installation" /SD IDOK
;Abort
dlok:
.....
$0 always contains transfer error ...
Can anybody help me in this
Just saw this thread today,
ReadRegStr ....
IfErrors <JumptoIfError> <JumpToIfNoError>
In all the snippets except the one using LogicLib the jumps were vice-versa.
So the following should work:
Originally posted by JoelYes, that's what I stumbled upon, when I read the initial post.
[B]Maybe you are using IfErrors incorrectly, because I have php installer..and this both works propertly:
ReadRegStr ....
IfErrors <JumptoIfError> <JumpToIfNoError>
In all the snippets except the one using LogicLib the jumps were vice-versa.
So the following should work:
ReadRegStr $4 HKLM "Software\\Microsoft\\PHP"
IfErrors 0 proceed
DetailPrint "Your system does have php: $4"
proceed:
SectionEnd
I am still struggling with "Transfer error"...
can anybody give me a hint ..
can anybody give me a hint ..
Originally posted by dinesh_oi
I am still struggling with "Transfer error"...
can anybody give me a hint ..
Originally posted by JoelJust pick one or more...!!!!
unable to open can be:
1. bad url format.
2. url doesn't exists.
3. Can't connect to the server.
4. Firewall blocked.
5. No internet connection.
6. Connection to the server was too long or busy