Configtool: use platform.startswith() everywhere.
Using this instead of a direct comparison may make the code more future proof, because exact versions (e.g. "win32" vs. "win64") are ignored, then.
This commit is contained in:
parent
c135c4c502
commit
bb275e2c21
|
|
@ -157,7 +157,7 @@ class BoardPanel(wx.Panel):
|
||||||
if not self.confirmLoseChanges("load a new board configuration"):
|
if not self.confirmLoseChanges("load a new board configuration"):
|
||||||
return
|
return
|
||||||
|
|
||||||
if platform == "darwin":
|
if platform.startswith("darwin"):
|
||||||
# Mac OS X appears to be a bit limited on wildcards.
|
# Mac OS X appears to be a bit limited on wildcards.
|
||||||
wildcard = "Board configuration (board.*.h)|*.h"
|
wildcard = "Board configuration (board.*.h)|*.h"
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@ class Build(wx.Dialog):
|
||||||
# Windows. Without this it always drops this error message:
|
# Windows. Without this it always drops this error message:
|
||||||
# collect2.exe: error: ld returned 5 exit status 255
|
# collect2.exe: error: ld returned 5 exit status 255
|
||||||
# Just enabling verbose messages allows ld.exe to complete without failure.
|
# Just enabling verbose messages allows ld.exe to complete without failure.
|
||||||
if platform == "win32":
|
if platform.startswith("win"):
|
||||||
cmdpath += " -Wl,-V"
|
cmdpath += " -Wl,-V"
|
||||||
|
|
||||||
ofiles = ["\"" + join(self.root, "build", f) + "\""
|
ofiles = ["\"" + join(self.root, "build", f) + "\""
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ BSIZE = (100, 60)
|
||||||
BSIZESMALL = (90, 30)
|
BSIZESMALL = (90, 30)
|
||||||
|
|
||||||
|
|
||||||
if platform == "win32":
|
if platform.startswith("win"):
|
||||||
offsetTcLabel = 4
|
offsetTcLabel = 4
|
||||||
offsetChLabel = 4
|
offsetChLabel = 4
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ class PrinterPanel(wx.Panel):
|
||||||
if not self.confirmLoseChanges("load a new printer configuration"):
|
if not self.confirmLoseChanges("load a new printer configuration"):
|
||||||
return
|
return
|
||||||
|
|
||||||
if platform == "darwin":
|
if platform.startswith("darwin"):
|
||||||
# Mac OS X appears to be a bit limited on wildcards.
|
# Mac OS X appears to be a bit limited on wildcards.
|
||||||
wildcard = "Printer configuration (printer.*.h)|*.h"
|
wildcard = "Printer configuration (printer.*.h)|*.h"
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue