-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android fix get_environment.sh #19690
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,3 +182,4 @@ temp/ | |
|
||
# external libs zip | ||
*.zip | ||
**/simulator/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
#!/bin/bash | ||
|
||
source ~/.bash_profile | ||
echo $COCOS_CONSOLE_ROOT | ||
if [ -f $HOME/.bashrc ]; then | ||
source $HOME/.bashrc | ||
fi | ||
|
||
if [ -f $HOME/.bash_profile ]; then | ||
source $HOME/.bash_profile | ||
fi | ||
|
||
echo $COCOS_CONSOLE_ROOT |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
#!/bin/bash | ||
|
||
source ~/.bash_profile | ||
echo $COCOS_CONSOLE_ROOT | ||
if [ -f $HOME/.bashrc ]; then | ||
source $HOME/.bashrc | ||
fi | ||
|
||
if [ -f $HOME/.bash_profile ]; then | ||
source $HOME/.bash_profile | ||
fi | ||
|
||
echo $COCOS_CONSOLE_ROOT |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
#!/bin/bash | ||
|
||
source ~/.bash_profile | ||
echo $COCOS_CONSOLE_ROOT | ||
if [ -f $HOME/.bashrc ]; then | ||
source $HOME/.bashrc | ||
fi | ||
|
||
if [ -f $HOME/.bash_profile ]; then | ||
source $HOME/.bash_profile | ||
fi | ||
|
||
echo $COCOS_CONSOLE_ROOT |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,11 +114,19 @@ def getCocosCommandPath() { | |
return 'cocos.bat' | ||
} | ||
else { | ||
|
||
def env_console_path = System.getenv("COCOS_CONSOLE_ROOT") | ||
|
||
if (env_console_path != null && !env_console_path.trim().isEmpty()) { | ||
return new File(env_console_path.trim() + '/cocos').absolutePath | ||
} | ||
|
||
// on unix like system, can not get environments variables easily | ||
// so run a shell script to get environment variable sets by cocos2d-x setup.py | ||
new ByteArrayOutputStream().withStream { os -> | ||
def result = exec { | ||
executable = project.file('get_environment.sh') | ||
executable = "/bin/bash" | ||
args = [ "-i", project.file('get_environment.sh')] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://linux.die.net/man/1/bash
|
||
standardOutput = os | ||
} | ||
ext.console_path = os.toString().trim() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
#!/bin/bash | ||
|
||
source ~/.bash_profile | ||
echo $COCOS_CONSOLE_ROOT | ||
if [ -f $HOME/.bashrc ]; then | ||
source $HOME/.bashrc | ||
fi | ||
|
||
if [ -f $HOME/.bash_profile ]; then | ||
source $HOME/.bash_profile | ||
fi | ||
|
||
echo $COCOS_CONSOLE_ROOT |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Tue Mar 14 17:47:54 CST 2017 | ||
#Fri May 10 15:15:29 CST 2019 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip |
+9 −2 | plugins/plugin_compile/project_compile.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~/.bash_profile
may not exists on linux