PDA

View Full Version : Running 32 bit apps on a 64 bit OS



NewsArchive
12-23-2008, 02:00 AM
Interesting Link:

http://blogs.msdn.com/oldnewthing/archive/2008/12/22/9244582.aspx

- Kelly

NewsArchive
12-23-2008, 02:03 AM
Kelly,

Thanks for sharing - hope others comment - would this be a reason to use
the SetupBuilder - Developer Edition - Program Properties - Generator and
create a Windows 32/64-bit hybrid version?

I'm sure there are other considerations as well - but maybe the experts can
chime in.

Original blog quote here:

"On 64-bit Windows, 32-bit programs run in an emulation layer, and if you
don't like that, then don't use the emulator

On 64-bit Windows, 32-bit programs run in an emulation layer. This
emulation layer simulates the x86 architecture, virtualizing the CPU, the
file system, the registry, the environment variables, the system
information functions, all that stuff. If a 32-bit program tries to look at
the system, it will see a 32-bit system. For example, if the program calls
the GetSystemInfo function to see what processor is running, it will be
told that it's running on a 32-bit processor, with a 32-bit address space,
in a world with a 32-bit sky and 32-bit birds in the 32-bit trees.

And that's the point of the emulation: To keep the 32-bit program happy by
simulating a 32-bit execution environment.
Commenter Koro is writing an installer in the form of a 32-bit program that
detects that it's running on a 64-bit system and wants to copy files (and
presumably set registry entries and do other installery things) into the
64-bit directories, but the emulation layer redirects the operations into
the 32-bit locations. The question is "What is the way of finding the x64
Program Files directory from a 32-bit application?"

The answer is "It is better to work with the system than against it." If
you're a 32-bit program, then you're going to be fighting against the
emulator each time you try to interact with the outside world. Instead,
just recompile your installer as a 64-bit program. Have the 32-bit
installer detect that it's running on a 64-bit system and launch the 64-bit
installer instead. The 64-bit installer will not run in the 32-bit
emulation layer, so when it tries to copy a file or update a registry key,
it will see the real 64-bit file system and the real 64-bit registry.

Published Monday, December 22, 2008 7:00 AM by oldnewthing"

David

--
From David Troxell - Product Scope 7 - Encourager Software
Clarion Third Party Profile Exchange Online
http://encouragersoftware.com/profile/clarlinks.html
Profile Exchanges - www.encouragersoftware.com/profile/
http://www.profileexchanges.com/blog/

NewsArchive
12-23-2008, 02:04 AM
David,

> Thanks for sharing - hope others comment - would this be a reason to use
> the SetupBuilder - Developer Edition - Program Properties - Generator and
> create a Windows 32/64-bit hybrid version?
>
> I'm sure there are other considerations as well - but maybe the experts
> can chime in.

SetupBuilder 6 Developer Edition already handles this kind of installations.
SetupBuilder 6 lets you create three different types of installations:

1) 32-bit

Install your 32-bit application on 32-bit and 64-bit Windows OS.

2) Hybrid 32-/64-bit

Install your application on 32-bit and/or 64-bit Windows OS. If the
installer is running on a 32-bit OS, the installer is running in 32-bit mode
(installs to the 32-bit Windows folders, uses the 32-bit Windows registry,
registers 32-bit OCX, etc.). If the installer is executed on a 64-bit
Windows OS, the installer is running in real 64-bit mode (installs to the
64-bit Windows folders, uses the 64-bit Windows registry, registers 64-bit
OCX, etc.). You can use this option to install native 32-bit and native
64-bit versions of your software from the same installer. You only use this
option if you have a 64-bit version of your software available. For
example, if you distribute a 32-bit and 64-bit component of a PDF software,
you would use this option to use the same installer for 32-bit and 64-bit
machines.

3) 64-bit

Install your 64-bit application on 64-bit Windows OS. The installer cannot
be executed on 32-bit Windows OS.

In SetupBuilder 7, there will be another two types: MSI32 and MSI64.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
12-23-2008, 02:05 AM
Kelly,
Very interesting. Sounds a lot like the transition between the 16-bit
& 32-bit world, although I would expect this 32/64 translation to be
more efficient.

For those of us using Armadillo, keep in mind that Armadillo64 is a
separate cost that is required to protect actual 64-bit applications.
I have already verified that Armadillo32 protection works on Windows
Server 2008 x64.
-- Thanks, Roger Due

NewsArchive
12-27-2008, 03:06 AM
> David,
>
>> Thanks for sharing - hope others comment - would this be a reason to use
>> the SetupBuilder - Developer Edition - Program Properties - Generator and
>> create a Windows 32/64-bit hybrid version?
>>
>> I'm sure there are other considerations as well - but maybe the experts
>> can chime in.
>

Friedrich,

Thank you for this detailed explanation - of course, Clarion programs can
only be 32 bits at this point in time - so we choose Option 1.

David

--
From David Troxell - Product Scope 7 - Encourager Software
Clarion Third Party Profile Exchange Online
http://encouragersoftware.com/profile/clarlinks.html
Profile Exchanges - www.encouragersoftware.com/profile/
http://www.profileexchanges.com/blog/

NewsArchive
12-27-2008, 03:07 AM
Hi David,

> Thank you for this detailed explanation - of course, Clarion programs
> can only be 32 bits at this point in time - so we choose Option 1.

Yes, for Clarion programs, it's Option 1 (32-bit).

Most driver developers have to support both native 32-bit and 64-bit from
the same install (e.g. PDF drivers for Win32 and Win64). They choose Option
2. If an application is 64-bit only, Option 3 is the correct choice.

So SetupBuilder is already "well prepared for the future" (tm) <g>

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner