Compilation problems

Wingnut

Well-known member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
1,284
M1 chips seem to be part of the cause of this change, I'm not sure how.

ZSH version I found online (bash was still used on my system for some reason so I just used that for now I don't think it makes a difference)
~/.zprofile
#alias setJDK7='unset JAVA_HOME;export JAVA_HOME=`/usr/libexec/java_home -v 1.7`'
alias setJDK8='unset JAVA_HOME;export JAVA_HOME=`/usr/libexec/java_home -v 1.8`'
alias setJDK11='unset JAVA_HOME;export JAVA_HOME=`/usr/libexec/java_home -v 11`'
 

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
737
@Jimmy You can test this version of trans and config.macos.txt by putting them into the bin folder of cx.
Here it works without having any separate installation of jre nor jdk. I also don't have a .zshrc file or any bash stuff, just bare android studio and cx. No JAVA_HOME set global or from the terminal.
If this doesn't work you can try to put the config.cxs file into targets/android/template. This changes the gradle to a newer one.
 

Attachments

  • JAVA_HOME Changes.zip
    1.1 MB · Views: 44

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
737
Code:
If JDK_PATH path=JDK_PATH+"/bin;"+path ' Make sure that the selected JDK is called before any system wide install.
SetEnv "PATH",path
If JDK_PATH SetEnv "JAVA_HOME",JDK_PATH
It seems to work without setting the PATH variable. Do you think it is necessary?
 

dawlane

Well-known member
CX Code Contributor
Tutorial Author
Joined
Jun 21, 2017
Messages
1,049
It seems to work without setting the PATH variable. Do you think it is necessary?
You should always put the location to where the binaries are in the path. Not all tools will look for the JAVA_HOME environment variable.
 

Wingnut

Well-known member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
1,284
Wow, so it seems that we now got a massively stable install now that needs no extra JAVA install?
cerberus will just work out of the box? Nice!


Offtopic but is there a way to get rid of the Apache Ant too and also it riddles me how come Cerberus can compile to html without any addon-compiler?
 

Phil7

Administrator
CX Code Contributor
3rd Party Tool Dev
Joined
Jun 26, 2017
Messages
737
cerberus will just work out of the box?
That's the goal, but you have to try for yourself.

Offtopic but is there a way to get rid of the Apache Ant too and also it riddles me how come Cerberus can compile to html without any addon-compiler?
Could you put those questions in separate threads to keep this one clean?
 

dawlane

Well-known member
CX Code Contributor
Tutorial Author
Joined
Jun 21, 2017
Messages
1,049
Offtopic but is there a way to get rid of the Apache Ant too and also it riddles me how come Cerberus can compile to html without any addon-compiler?
Ant is no longer required since the Android build tool uses gradle. Only Flash builds would use Ant and Flash is now depreciated. HTML doesn't need an external compiler as Cerberus generates JScript for HTML5. It's the Web browser's job to do any speed optimisations, etc when it executes the JScript.
 

Wingnut

Well-known member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
1,284
Thanks! Ya I was about to toss the machine out into the garbage. I got the short answers i wanted so I won't start a new thread. Got a working development machine again. And learned a lot about JAVA inner workings.
 
Top Bottom