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
43e8850a
Commit
43e8850a
authored
Feb 23, 2015
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates to the python code to work on Mac OS X.
parent
a0761c1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
ArduinoServerCompiler/BlocklyRequestHandler.py
ArduinoServerCompiler/BlocklyRequestHandler.py
+2
-2
ArduinoServerCompiler/ServerCompilerSettings.py
ArduinoServerCompiler/ServerCompilerSettings.py
+9
-3
No files found.
ArduinoServerCompiler/BlocklyRequestHandler.py
View file @
43e8850a
...
@@ -296,8 +296,8 @@ def browse_file():
...
@@ -296,8 +296,8 @@ def browse_file():
root
.
deiconify
()
root
.
deiconify
()
root
.
lift
()
root
.
lift
()
root
.
focus_force
()
root
.
focus_force
()
types
=
[(
'All Files'
,
'*'
)]
root
.
update
()
file_path
=
tkFileDialog
.
askopenfilename
(
filetypes
=
types
)
file_path
=
tkFileDialog
.
askopenfilename
()
root
.
destroy
()
root
.
destroy
()
return
file_path
return
file_path
...
...
ArduinoServerCompiler/ServerCompilerSettings.py
View file @
43e8850a
...
@@ -87,8 +87,14 @@ class ServerCompilerSettings(object):
...
@@ -87,8 +87,14 @@ class ServerCompilerSettings(object):
return
self
.
__compiler_dir__
return
self
.
__compiler_dir__
def
set_compiler_dir
(
self
,
new_compiler_dir
):
def
set_compiler_dir
(
self
,
new_compiler_dir
):
""" The compiler dir must be full path to an .exe file. """
""" The compiler dir must a valid file or directory """
if
os
.
path
.
isfile
(
new_compiler_dir
):
# Mac only check, as apps are packaged directories
if
sys
.
platform
==
'darwin'
:
new_compiler_dir
+=
'/Contents/MacOS/JavaApplicationStub'
print
(
'
\n
Compiler file in Mac OS located within the app '
+
'directory: /Contents/MacOS/JavaApplicationStub'
)
# Check directory
if
os
.
path
.
exists
(
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
()
...
@@ -111,7 +117,7 @@ class ServerCompilerSettings(object):
...
@@ -111,7 +117,7 @@ class ServerCompilerSettings(object):
def
set_compiler_dir_from_file
(
self
,
new_compiler_dir
):
def
set_compiler_dir_from_file
(
self
,
new_compiler_dir
):
""" The compiler dir must be full path to an existing file. """
""" The compiler dir must be full path to an existing file. """
if
os
.
path
.
isfile
(
new_compiler_dir
):
if
os
.
path
.
exists
(
new_compiler_dir
):
self
.
__compiler_dir__
=
new_compiler_dir
self
.
__compiler_dir__
=
new_compiler_dir
else
:
else
:
print
(
'
\n
The provided compiler path in the settings file is not '
+
print
(
'
\n
The provided compiler path in the settings file is not '
+
...
...
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