Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / Tier 2 Android setup for OSX

Author
Message
RypTar
8
Years of Service
User Offline
Joined: 30th Jul 2015
Location:
Posted: 30th Jul 2015 02:40
Hey everybody, I'm in the process of trying to set up tier 2 android and I'm stuck on the "HardCodedCompileScript.bat" step. I'm on OSX and I don't have cygwin, so what do I point the command to.

//This is my code, I already pointed to the ndk

echo Compile Interpreter CPP to Android BINARY
C:\cygwin\bin\bash -c "PATH=/bin:$PATH /Applications/Dev/adt-bundle-mac-x86_64-20140702/android-ndk-r10c/ndk-build clean"
C:\cygwin\bin\bash -c "PATH=/bin:$PATH /Applications/Dev/adt-bundle-mac-x86_64-20140702/android-ndk-r10c/ndk-build 2> log.txt"

//end code
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Aug 2015 01:41
You don't need to use cygwin with the Mac.

Macs use a linuxish operating system. Which is what the cygwin tool is for on Windows machines.

So, once you have all the right tools set up, you use a command line window to execute the commands, not the batch file (which wouldn't work on a Mac).

Instead, for repeatablility, like the batch files in Windows, you would create a Linux version command file.

This starts as a simple text file with text like the following (I think):


Since you have the path in the command itself, there is no need to change it.

The file would be placed in the /Users/<your Mac user name>/bin. That makes it visible anywhere on your Mac.

To figure out what the path for the file should be, open a command line window on your Mac. Then execute the command 'pwd' (without quotes). That will tell you your base path. There should be a directory named 'bin'. To see the contents of your current directory, execute the command 'ls -l' (the 'dir' command does not work, unless you set up command aliases).

After creating the file (assume we call it HardCodedCompileScript) in your bin directory, the following command will make it an executable file:
chmod /Users/<your Mac user name>/bin/HardCodedCompileScript a+x

Next, in order to use this file, also from the command line, you navigate to the directory that has your Android project and execute the command 'HardCodedCompileScript'. This should do the trick.

I have not tried this on my Mac, yet, but think it will work.

Also, in theory, after you create the HardCodedCompileScript file in your /User/<your Mac user name>/bin directory, if you copy it to the root of your Android project, you might be able to execute by double-clicking on it from the Finder app (the Mac equivalent of File Manager on Windows). If that works, then you don't need to open a command window once the file has been properly created.

Cheers,
Ancient Lady

Login to post a reply

Server time is: 2024-04-25 22:12:00
Your offset time is: 2024-04-25 22:12:00