nasi0 / droiddraw

Automatically exported from code.google.com/p/droiddraw
0 stars 0 forks source link

cannot find program ant Error =2 #249

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. when export as .apk or to device

What is the expected output? What do you see instead?
it should generate a executable file but ERROR is thrown

What version of the product are you using? On what operating system?
\droiddraw-r1b21 and \droiddraw-r1b20..... OS is Windows 7

Please provide any additional information below.
i have defined ANT_HOME and classpath is also set... i tried modifying the 
build.xml inside the activity folder, but no fruit !!!

Original issue reported on code.google.com by seshvasa...@gmail.com on 7 May 2012 at 6:00

GoogleCodeExporter commented 8 years ago
Hi,

it's not a setup problem on your machine, it's Windows related problem in 
Main.makeAPK()

  String[] cmd = install ? new String[]{"ant", "install"} : new String[]{"ant"};
  File wd = new File( dir, "activity" );
  run(cmd, wd);

In this case on a Windows machine an executable "ant.exe" would be expected in 
the program execution path.

As windows decide on the file extension if a binary (*.exe) or script (e.g. 
*.cmd) is executable, I see no simple workaround to get it work, beside the 
code needs to be changed for the Windows behavior.

I will have a look and post a patch.

cheers
Frank

Original comment by Dietrich.Frank@gmail.com on 14 May 2012 at 11:43

GoogleCodeExporter commented 8 years ago
Hi,

I had a look into it, see the intermediate state below.

The problem with ant could be solved on Windows machines with something similar 
to
  String[] cmd = install ? new String[]{"ant.bat", "install"} : new String[]{"ant.bat"};

But this is only half of the way. It seems following issue is still pending: 
see https://code.google.com/p/droiddraw/issues/detail?id=165#c3

I'll try this week to have a closer look into both.

cheers
Frank

Original comment by Dietrich.Frank@gmail.com on 14 May 2012 at 3:49

GoogleCodeExporter commented 8 years ago
Frank,
If you develop a fix, please send me a patch and I'll integrate it into the 
code.

Thanks!

Original comment by brendan....@gmail.com on 19 May 2012 at 10:02

GoogleCodeExporter commented 8 years ago
Hi Brendan,

the attached patch will manage the executable names in the different supported 
OS.

In combination with the patch for issue #165 the "Export to .apk" feature 
should now work as expected.

cheers
Frank

Original comment by Dietrich.Frank@gmail.com on 21 May 2012 at 10:32

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r201.

Original comment by brendan....@gmail.com on 16 Jun 2012 at 8:52