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
1d4f5b22
Commit
1d4f5b22
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
9616c87f
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 @
1d4f5b22
...
...
@@ -296,8 +296,8 @@ def browse_file():
root
.
deiconify
()
root
.
lift
()
root
.
focus_force
()
types
=
[(
'All Files'
,
'*'
)]
file_path
=
tkFileDialog
.
askopenfilename
(
filetypes
=
types
)
root
.
update
()
file_path
=
tkFileDialog
.
askopenfilename
()
root
.
destroy
()
return
file_path
...
...
ArduinoServerCompiler/ServerCompilerSettings.py
View file @
1d4f5b22
...
...
@@ -87,8 +87,14 @@ class ServerCompilerSettings(object):
return
self
.
__compiler_dir__
def
set_compiler_dir
(
self
,
new_compiler_dir
):
""" The compiler dir must be full path to an .exe file. """
if
os
.
path
.
isfile
(
new_compiler_dir
):
""" The compiler dir must a valid file or directory """
# 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
print
(
'
\n
Compiler directory set to:
\n\t
%s'
%
self
.
__compiler_dir__
)
self
.
save_settings
()
...
...
@@ -111,7 +117,7 @@ class ServerCompilerSettings(object):
def
set_compiler_dir_from_file
(
self
,
new_compiler_dir
):
""" 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
else
:
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