iitc-project / ingress-intel-total-conversion

ingress.com/intel total conversion user script with some new features. Should allow easier extension of the intel map.
http://iitc.jonatkins.com/
ISC License
989 stars 552 forks source link

compiler errors on Windows 8.1 #1287

Closed crystalwizard closed 4 years ago

crystalwizard commented 6 years ago

I'm trying to build the latest version of iitc mobile and I'm getting errors i'm not familiar with:

D:\IITC\ingress-intel-total-conversion-master>build.py mobile D:\IITC\ingress-intel-total-conversion-master\build.py:101: DeprecationWarning: 'U' mode is deprecated with io.open(fn, 'Ur', encoding='utf8') as f: D:\IITC\ingress-intel-total-conversion-master\build.py:141: DeprecationWarning: encodestring() is a deprecated alias since 3.1, use encodebytes()

return 'data:image/png;base64,{0}'.format(base64.encodestring(open(fn, 'rb').r ead()).decode('utf8').replace('\n', ''))

'ant' is not recognized as an internal or external command, operable program or batch file. Error: mobile app failed to build. ant returned 1

if anyone can shed some light on what I need to do to fix this so the code will build, I'd really appreciate it. I am: building as administrator, have the latest java SDK and Python/pip downloads installed.

lucifer6642 commented 6 years ago

Do you have the Android SDK and Ant installed and set up with correct environment strings for path? Don't think ant is included in current android sdk these days.

crystalwizard commented 6 years ago

I downloaded the latest version of Android studio (well, not the Beta) today and it's installed. I haven't a clue what Ant is and I don't know what environment strings to set - what's set is what got set when I installed studio. Where do I get Ant and what environment variables to I need to set?

lucifer6642 commented 6 years ago

https://github.com/iitc-project/ingress-intel-total-conversion/pull/1278#issue-226873734 See the bit about downgrading, seems you'll have to use version 25.2.5

crystalwizard commented 6 years ago

Okay, thank you. Do you know if I can run more than one version of studio on this machine at a time?

patwillette commented 6 years ago

I would like to know how to get this setup myself but Google is not being very helpful.

crystalwizard commented 6 years ago

Lucifer6642, the links in the post on downgrading don't work. I think the files are gone. And searching the android studio archives, there's nothing older than march 2017 - which is when the ant script support was removed. Any idea where to get older versions of the studio tools?

Eccenux commented 6 years ago

What you are getting is a Python error, not Android related. build.py is not for building mobile version of IITC. Which you would know if would read like any of the readme that was provided by devs of IITC ;-P.

Main README.md gives some generic pointers (also saying what is build.py for). Main HACKING.md gives some pointers on desktop builds (saying what build.py does). And mobile/HACKING.md gives some pointers on mobile builds.

Eccenux commented 6 years ago

Just to be clear:

  1. You don't need to run build.py (as is stated mobile/HACKING.md). You just need to have assets in mobile\assets\.
  2. If you do want to build JavaScript files yourself you can still do this without ant.
    1. Download and install Python (version 2.7 seem to work fine).
    2. Open buildsettings.py and change buildMobile option to 'buildMobile': 'copyonly'.
    3. Run build.py with proper python version.

Note that on Windows running py scripts requires using proper python.exe. So something like this:

c:\Python27\python.exe build.py mobile

Above assumes Python is installed in c:\Python27.

crystalwizard commented 6 years ago

What you are getting is a Python error, not Android related. build.py is not for building mobile version of IITC. Which you would know if would read like any of the readme that was provided by devs of IITC ;-P.

I did read that, but the README in the main iitc folder says to run build.py to build the mobile in debug - and didn't say anything about copyonly. And debug was giving me errors.

crystalwizard commented 6 years ago

okay, so, the above instructions to change buildsettings to use copyonly seem to have worked fine. At least, the only thing I got was deprecation warnings. however I'm not sure what the final file for use on an android mobile device is, so next stupid question - where's the documentation that discusses what the final build file is/is located?