View unanswered posts | View active topics



Reply to topic  [ 1 post ] 
SetupSDK.bat fix for x86 vs x86_64 
Author Message
Member

Joined: Mon Jul 09, 2012 4:30 pm
Posts: 2
Reply with quote
I have ran into this problem while working with Air for Mobile applications using Flash Develop. The problem is that if you setup a project on a 32bit pc, then the SetupSDK.bat has FLEX_SDK path set to:
Code:
FLEX_SDK=C:\Program Files\FlashDevelop\Tools\flexsdk


Whereas if you setup a project on a 64bit pc your path will be:
Code:
set FLEX_SDK=C:\Program Files (x86)\FlashDevelop\Tools\flexsdk


Likewise for the ANDROID_SDK.

When working on projects at home, I have a 32-bit version of windows installed as the virtual, but run a 64-bit version of windows as dual-boot, and also at work. So I have run into this problem several times, hence my desire to fix it.

My fix is to replace this:

Code:
:: Path to Flex SDK
set FLEX_SDK=C:\Program Files\FlashDevelop\Tools\flexsdk

:: Path to Android SDK
set ANDROID_SDK=C:\Program Files\FlashDevelop\Tools\android


With this:

Code:
if not exist "%ProgramFiles(x86)%" goto x86
:: Path to Flex SDK (when on a 64-bit machine)
set FLEX_SDK=%ProgramFiles(x86)%\FlashDevelop\Tools\flexsdk

:: Path to Android SDK (when on a 64-bit machine)
set ANDROID_SDK=%ProgramFiles(x86)%\FlashDevelop\Tools\android

goto doneSetArch
:x86
:: Path to Flex SDK (when on a 32-bit machine)
set FLEX_SDK=%ProgramFiles%\FlashDevelop\Tools\flexsdk

:: Path to Android SDK (when on a 32-bit machine)
set ANDROID_SDK=%ProgramFiles%\FlashDevelop\Tools\android

:doneSetArch


Now whenever SetupSDK.bat is called it will properly be able to find the Flex SDK whether it is x86 or 64.

I'd also like to thank you: The Flash Develop Team, for such a great product! One of the best IDEs I've ever used.


Mon Jul 09, 2012 4:46 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.