Highlighted

AIR 29 on Windows: Detecting if 64 bit runtime

Community Beginner ,
Mar 09, 2018

Copy link to clipboard

Copied

Now that we have 64 bit support with AIR 29 on Windows, is there any way to detect if the application is 64 bit or not during runtime? The Capabilities class does not appear to provide this information.

I will distribute both 32 and 64 bit versions, and would like to show that information to users and send it along in crash reports. Of course, I could change a constant in code between builds, but I'd rather not since that complicates the release process and could easily be missed.

parsing the XML descriptor does not guarantee you that the executable is 32-bit or 64-bit
case where you do a release build from Flash Builder with AIR_WIN_ARCH=64
and the app XML indicate no architecture or a an architecture of 32

to be sure you can load the AIR executable and parse the PE header
to detect the machine type

see here

https://discuss.as3lang.org/t/how-do-you-detect-if-air-is-32-bit-or-64-bit/1221

TOPICS
Air beta

Views

1.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

AIR 29 on Windows: Detecting if 64 bit runtime

Community Beginner ,
Mar 09, 2018

Copy link to clipboard

Copied

Now that we have 64 bit support with AIR 29 on Windows, is there any way to detect if the application is 64 bit or not during runtime? The Capabilities class does not appear to provide this information.

I will distribute both 32 and 64 bit versions, and would like to show that information to users and send it along in crash reports. Of course, I could change a constant in code between builds, but I'd rather not since that complicates the release process and could easily be missed.

parsing the XML descriptor does not guarantee you that the executable is 32-bit or 64-bit
case where you do a release build from Flash Builder with AIR_WIN_ARCH=64
and the app XML indicate no architecture or a an architecture of 32

to be sure you can load the AIR executable and parse the PE header
to detect the machine type

see here

https://discuss.as3lang.org/t/how-do-you-detect-if-air-is-32-bit-or-64-bit/1221

TOPICS
Air beta

Views

1.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 09, 2018 0
Engaged ,
Mar 10, 2018

Copy link to clipboard

Copied

I have the same question.

Adobe, is there are plans to add new property to Capabilities class to detect 64-bit runtime?

Workaround for now: parse application XML descriptor and find value of "architecture" tag.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 10, 2018 2
Enthusiast ,
Mar 12, 2018

Copy link to clipboard

Copied

parsing the XML descriptor does not guarantee you that the executable is 32-bit or 64-bit
case where you do a release build from Flash Builder with AIR_WIN_ARCH=64
and the app XML indicate no architecture or a an architecture of 32

to be sure you can load the AIR executable and parse the PE header
to detect the machine type

see here

https://discuss.as3lang.org/t/how-do-you-detect-if-air-is-32-bit-or-64-bit/1221

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 12, 2018 0
Community Beginner ,
Mar 14, 2018

Copy link to clipboard

Copied

Wow, thank you for the in depth post! I will try your solution.

Hopefully this will be added to the Capabilities class though.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 14, 2018 0
Engaged ,
Mar 14, 2018

Copy link to clipboard

Copied

Check this topic: 64bit Windows app for native installs?

My code have inside what you need.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 14, 2018 0
Enthusiast ,
Mar 14, 2018

Copy link to clipboard

Copied

hferreira80  wrote

Check this topic: 64bit Windows app for native installs? 

My code have inside what you need.

No it doesn't

Capabilities.supports64BitProcesses detect if the OS support 64-bit
it is not the same thing as detecting if the current process is 32-bit or 64-bit

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 14, 2018 0
itlancer LATEST
Engaged ,
Mar 17, 2018

Copy link to clipboard

Copied

Feature request for that: Tracker

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 17, 2018 1