PDA

View Full Version : 32-bit vs 64-bit



NewsArchive
12-12-2013, 06:30 AM
How does one differentiate Program Files folders in various environments?

For 32-bit machines, apps usually are in C:\Program Files whereas on 64-bit
machines 32-bit apps are usually in C:\Program Files(X86) and 64-bit apps
usually are in C:\Program Files.
Is "%PROGRAMFILESDIR%" sufficient? Does MS Windows handle the decision
making or is there something else one should know and do, to be able to
distribute the same installer?

Sim

NewsArchive
12-12-2013, 06:30 AM
Sim,

> How does one differentiate Program Files folders in various environments?
>
> For 32-bit machines, apps usually are in C:\Program Files whereas on
> 64-bit machines 32-bit apps are usually in C:\Program Files(X86) and
> 64-bit apps usually are in C:\Program Files.
> Is "%PROGRAMFILESDIR%" sufficient? Does MS Windows handle the decision
> making or is there something else one should know and do, to be able to
> distribute the same installer?

The SetupBuilder installer handles this automatically for you. If it is
running in 32-bit mode, then it will access the 32-bit file/folder and
registry resources on Windows x64 machines.

To install into 64-bit resources (only for native 64-bit apps!!), you simply
switch the installer into 64-bit processing mode using the "Set x64 Mode..."
script function.

BTW, yes, the %PROGRAMFILESDIR% runtime variable always points to the
correct folder on x86 and x64 machines. It's handled automatically
behind-the-scenes.

Friedrich

NewsArchive
12-13-2013, 01:50 AM
Thanks Friedrich. That's great.

Regarding your last statement, how does one do this using LSUzip?

Sim

NewsArchive
12-13-2013, 01:50 AM
Sim,

> Regarding your last statement, how does one do this using LSUzip?

LSUnZip is a DLL. You simply pass (from your own application) the target
path. Whether it is a 32-bit or a 64-bit resource. If your own application
can access the path, so can LSZip.

Friedrich

NewsArchive
12-13-2013, 01:50 AM
What I mean is how does one implement %PROGRAMFILESDIR% in Clarion?

Sim

NewsArchive
12-13-2013, 01:51 AM
> What I mean is how does one implement %PROGRAMFILESDIR% in Clarion?

There is a CSIDL value for it.

If your program (which is a 32bit program) asks for the Program Files
folder by CSIDL value, it will always return "Program Files (x86)" on a 64
bit OS - which is where your program would be installed by SetupBuilder.

Unless you have the need to access a file placed under "Program Files" by a
64 bit program (again on the 64 bit OS), then you should never have a need
to access that folder at all.

The whole idea of it all is that 32 bit programs running on a 64 bit OS are
isolated from the 64 bit programs by the OS itself.

That is why (with few exceptions) you never try to manipulate the direct
path to the files yourself. You are always better off to use SetupBuilder
for the installs and the CSIDL locations within your Clarion apps.

Then the whole (x86) thing is transparent and something you never have to
worry about.

FWIW - this is true in reading and writing the Registry as well. There is
a separate node for 32 bit apps but SetupBuilder handles it for you and
your 32 bit Clarion app will read the 32 bit node automatically (not the 64
bit node).


Charles

--
-------------------------------------------------------------------------------------------------------
Charles Edmonds

www.clarionproseries.com - ProScan, ProImage, ProPath and other Clarion
developer tools!
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms - Now with PNG support!
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
12-16-2013, 02:02 AM
Many thanks indeed.

Sim

NewsArchive
10-02-2014, 02:03 AM
I see that other installers provide for one setup EXE which is compatible
with either 32-bit or 64-bit.
How does one do that with SetupBuilder?

Sim

NewsArchive
10-02-2014, 02:03 AM
Sim,

> I see that other installers provide for one setup EXE which is compatible
> with either 32-bit or 64-bit.
> How does one do that with SetupBuilder?

SetupBuilder can package both 32-bit and 64-bit files into the same
setup.exe. You can install 32-/64-bit files and manipulate 32-/64-bit
resources from the same installer. Please see the "Set x64 Mode..." script
function.

Friedrich

NewsArchive
10-02-2014, 02:04 AM
BTW, I don't think that you have any native 64-bit application file to
install. Your application is native 32-bit, right? So "Installer Type"
should be the standard "Windows 32-bit".

Friedrich

NewsArchive
10-02-2014, 02:04 AM
Confused.

I compiled using (GUI - Generator tab) "Installer Type" "Windows 32-bit".
64-bit users complain that the resultant setup EXE crashes.
I then recompiled using "Installer Type" "Windows 64-bit" which succeeds for
them, but not on 32-bit systems.
What setting does one use to make it compatible either way?

Sim
__________________________________________________ ___

NewsArchive
10-02-2014, 02:05 AM
Sim Scherer,

> Confused.

You need to generate for 32-bit Windows since your program is 32-bit.
The attached screen capture works on 32 and 64 just fine, at least for
me.

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Creative Reporting: http://www.CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
10-02-2014, 02:06 AM
Sim,

> Confused.
>
> I compiled using (GUI - Generator tab) "Installer Type" "Windows 32-bit".
> 64-bit users complain that the resultant setup EXE crashes.
> I then recompiled using "Installer Type" "Windows 64-bit" which succeeds
> for them, but not on 32-bit systems.
> What setting does one use to make it compatible either way?

What Lee said. And "Windows 64-bit" installer types do not even run on x86
systems.

BTW, what SetupBuilder version are you on? Perhaps your installer is not
Windows 7 or Windows 8 or Windows 8.1 aware?

Friedrich