Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
1ac73a7d
Commit
1ac73a7d
authored
Jun 19, 2015
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Arduino IDE has changed executable name, update for OS X for this.
parent
867e7b56
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
ardublocklyserver/compilersettings.py
ardublocklyserver/compilersettings.py
+18
-4
No files found.
ardublocklyserver/compilersettings.py
View file @
1ac73a7d
...
@@ -110,11 +110,25 @@ class ServerCompilerSettings(object):
...
@@ -110,11 +110,25 @@ class ServerCompilerSettings(object):
""" The compiler dir must a valid file or directory """
""" The compiler dir must a valid file or directory """
# Mac only check, as apps are packaged directories
# Mac only check, as apps are packaged directories
if
sys
.
platform
==
'darwin'
:
if
sys
.
platform
==
'darwin'
:
new_compiler_dir
+=
'/Contents/MacOS/JavaApplicationStub'
# Arduino version >1.6.0 has changed the binary name, so check both
print
(
'
\n
Compiler file in Mac OS located within the app '
+
if
os
.
path
.
isfile
(
os
.
path
.
join
(
'directory: /Contents/MacOS/JavaApplicationStub'
)
new_compiler_dir
,
'Contents'
,
'MacOS'
,
'JavaApplicationStub'
)):
new_compiler_dir
=
os
.
path
.
join
(
new_compiler_dir
,
'Contents'
,
'MacOS'
,
'JavaApplicationStub'
)
print
(
'
\n
Compiler file in OS X located within the app bundle.'
)
elif
os
.
path
.
isfile
(
os
.
path
.
join
(
new_compiler_dir
,
'Contents'
,
'MacOS'
,
'Arduino'
)):
new_compiler_dir
=
os
.
path
.
join
(
new_compiler_dir
,
'Contents'
,
'MacOS'
,
'Arduino'
)
print
(
'
\n
Compiler file in OS X located within the app bundle.'
)
else
:
print
(
'Could not locate the Arduino executable within the OS X '
'app bundle. These are the available files:
\n
%s'
%
os
.
listdir
(
'%s/Contents/MacOS/'
%
new_compiler_dir
))
# Check directory
# Check directory
if
os
.
path
.
exists
(
new_compiler_dir
):
if
os
.
path
.
isfile
(
new_compiler_dir
):
self
.
__compiler_dir__
=
new_compiler_dir
self
.
__compiler_dir__
=
new_compiler_dir
print
(
'
\n
Compiler directory set to:
\n\t
%s'
%
self
.
__compiler_dir__
)
print
(
'
\n
Compiler directory set to:
\n\t
%s'
%
self
.
__compiler_dir__
)
self
.
save_settings
()
self
.
save_settings
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment