Skip to content

Commit

Permalink
Give executable permissions to GPX executable
Browse files Browse the repository at this point in the history
On MacOS it apparently didn't maintain them from the zip file.
  • Loading branch information
Ghostkeeper committed Sep 30, 2018
1 parent 007759c commit 5527936
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion X3GWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import configparser #To write a CFG file as configuration for GPX.
import math #For PI.
import os
import stat #To give execute permissions to GPX.
import subprocess
import tempfile
import typing
Expand Down Expand Up @@ -106,6 +107,7 @@ def gpx_executable(self):
result = os.path.expanduser(result)
result = os.path.expandvars(result)
Logger.log("d", "GPX executable: {executable_file}".format(executable_file=result))
os.chmod(result, stat.IXUSR | stat.IRUSR | stat.IRGRP | stat.IROTH)
return result

## Gets the command that we need to call GPX with.
Expand Down Expand Up @@ -230,4 +232,4 @@ def write_cfg(self, cfg_stream):
parser["machine"]["timeout"] = "20" #Let's just always home at most 20 seconds. This is what GPX uses for all built-in printers.
#parser["machine"]["steps_per_mm"] = ? #I think the steps_per_mm per axis will override this.

parser.write(cfg_stream)
parser.write(cfg_stream)

0 comments on commit 5527936

Please sign in to comment.