Merge pull request #506 from andrewcsmith/patch-2
[supercollider.git] / SCClassLibrary / Platform / windows / WindowsPlatform.sc
blobbd3e055868ab72faa740a5e8d9ccb259e874d362
1 WindowsPlatform : Platform
3         name { ^\windows }
4         startupFiles {
5                 var deprecated = ["startup.sc", "~\\SuperCollider\\startup.sc".standardizePath];
6                 Platform.deprecatedStartupFiles(deprecated);
7                 ^(deprecated ++ super.startupFiles)
8         }
10         startup {
11                 // Server setup
12                 Server.program = "scsynth.exe";
14                 // Score setup
15                 Score.program = Server.program;
17                 // load user startup file
18                 this.loadStartupFiles;
19         }
21         defaultHIDScheme { ^nil }
23         pathSeparator { ^$\\ }
24         isPathSeparator { |char|
25                 ^#[$\\, $/].includes(char)
26         }
27         clearMetadata { |path|
28                 path = path.splitext[0].do({ |chr, i| if(chr == $/) { path[i] = $\\.asAscii } });
29                 "del %%.*meta%".format(34.asAscii, path, 34.asAscii).systemCmd;
30         }
32         killAll { |cmdLineArgs|
33                 ("taskkill /F /IM " ++ cmdLineArgs).unixCmd;
34         }
36         defaultTempDir {
37                 // +/+ "" looks funny but ensures trailing slash
38                 var tmp = this.userAppSupportDir +/+ "";
39                 ^if(File.exists(tmp)) { tmp }
40         }