|
|
#1 |
|
Junior Member
Join Date: May 2007
Location: hyderabad
Posts: 12
|
php & php-gtk
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 |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: May 2007
Location: hyderabad
Posts: 12
|
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 |
|
|
|
|
|
#3 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
Let's see:
PHP Code:
2. Do you reall need Abort there? * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: May 2007
Location: hyderabad
Posts: 12
|
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 |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: May 2007
Location: hyderabad
Posts: 12
|
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 |
|
|
|
|
|
#6 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
Maybe you are using IfErrors incorrectly, because I have php installer..and this both works propertly:
PHP Code:
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: May 2007
Location: hyderabad
Posts: 12
|
thanx a lot it solved my problem
|
|
|
|
|
|
#8 |
|
Junior Member
Join Date: May 2007
Location: hyderabad
Posts: 12
|
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....... |
|
|
|
|
|
#9 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
There's a ZipDll plugin for extractig ZIPs.
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
|
|
|
|
#10 |
|
Junior Member
Join Date: May 2007
Location: hyderabad
Posts: 12
|
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 .... |
|
|
|
|
|
#11 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
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 * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
|
|
|
|
#12 |
|
Junior Member
Join Date: May 2007
Location: hyderabad
Posts: 12
|
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 |
|
|
|
|
|
#13 | |
|
Junior Member
Join Date: Apr 2007
Location: Seltz, France
Posts: 46
|
Just saw this thread today,
Quote:
ReadRegStr .... IfErrors <JumptoIfError> <JumpToIfNoError> In all the snippets except the one using LogicLib the jumps were vice-versa. So the following should work: code: |
|
|
|
|
|
|
#14 |
|
Junior Member
Join Date: May 2007
Location: hyderabad
Posts: 12
|
I am still struggling with "Transfer error"...
can anybody give me a hint .. |
|
|
|
|
|
#15 | ||
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
Quote:
Quote:
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
||
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|