Archive: NSIS: detect WIN32-WIN64


NSIS: detect WIN32-WIN64
Hi,

We would like to extend the nsis installer for the Tomcat
(http://tomcat.apache.org) with the automatic detection
of the underlaying OS/CPU.

For now, we are using it only for WIN32/x86, but would
like to extend it to WIN64/amd64 and later WIN64/ia64.

The problem is that we have WIN32/x86 native files
named tomcat6.exe and tomcat6w.exe. Beyond those we
have tomcat6.exe.amd64 and tomcat6w.exe.amd64 that would
need to be installed as tomcat6.exe/tomcat6w.exe if the
underlaying OS is WIN64/amd64.

The installer itself (apache-tomcat-x.x.x.exe) should
run on all platforms, so it should be 32 bit, with
platform specific files.

For the platform specific files we have to scenarios:
1. Integrated within installer
2. Downloadable by the installer.

In general, all that we would need is a simple variable
that would give OS and other the CPU.

BTW, the .nsi for Apache Tomcat is at:
http://svn.apache.org/viewvc/tomcat/...si?view=markup

Anyone knows how to do that?
I read lots of posts about WIN32/WIN64, but there are no
'real howto'

Regards,
Mladen.


Did you try the GetVersion plugin?
http://nsis.sourceforge.net/GetVersi...ows%29_plug-in

-Stu


Nope.
Will it allow to distinguish the WIN32/x86, WIN64/amd64?
Further more, the feature has to be the part of the 'core'
distribution.


since the nsis stub is always 32bit, im using this code:


System::Call "kernel32::GetCurrentProcess() i .s"
System::Call "kernel32::IsWow64Process(i s, *i .r0)"
StrCmp $0 "0" is32bit is64bit


beware of the fs and registry redirection for wow64 processes (eg api Wow64DisableWow64FsRedirection)

regards