-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(3.4) PathName now sets tmp directory using Platform
This fixes a bug where we were writing temp files into c:\program files\supercollider, which is an absolute no-no in win7/vista.
- Loading branch information
James Harkins
committed
Sep 4, 2011
1 parent
d3898df
commit fe9d5d8
Showing
3 changed files
with
36 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 25 additions & 19 deletions
44
common/build/SCClassLibrary/Platform/windows/WindowsPlatform.sc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,32 @@ | ||
WindowsPlatform : Platform | ||
{ | ||
name { ^\windows } | ||
startupFiles { ^["startup.sc", "~\\SuperCollider\\startup.sc".standardizePath] } | ||
startup { | ||
// Server setup | ||
Server.program = "scsynth.exe"; | ||
|
||
// Score setup | ||
Score.program = Server.program; | ||
|
||
// load user startup file | ||
this.loadStartupFiles; | ||
} | ||
|
||
defaultGUIScheme { ^\swing } | ||
defaultHIDScheme { ^nil } | ||
pathSeparator { ^$\\ } | ||
WindowsPlatform : Platform | ||
{ | ||
name { ^\windows } | ||
startupFiles { ^["startup.sc", "~\\SuperCollider\\startup.sc".standardizePath] } | ||
startup { | ||
// Server setup | ||
Server.program = "scsynth.exe"; | ||
|
||
// Score setup | ||
Score.program = Server.program; | ||
|
||
// load user startup file | ||
this.loadStartupFiles; | ||
} | ||
|
||
defaultGUIScheme { ^\swing } | ||
defaultHIDScheme { ^nil } | ||
pathSeparator { ^$\\ } | ||
isPathSeparator { |char| | ||
^#[$\\, $/].includes(char) | ||
} | ||
clearMetadata { |path| | ||
path = path.splitext[0].do({ |chr, i| if(chr == $/) { path[i] = $\\.asAscii } }); | ||
"del %%.*meta%".format(34.asAscii, path, 34.asAscii).systemCmd; | ||
} | ||
} | ||
|
||
defaultTempDir { | ||
// +/+ "" looks funny but ensures trailing slash | ||
var tmp = this.userAppSupportDir +/+ ""; | ||
^if(File.exists(tmp)) { tmp } | ||
} | ||
} |