Changeset 24ea2a in git
- Timestamp:
- Apr 1, 2015, 11:55:22 PM (9 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 4ec7338829b2741a2b2f4c879b9bfd0ec67f410d
- Parents:
- 06cff955d56f17b8a3199fd8db5e3f4a6be98f35
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2015-04-01 23:55:22+02:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2015-04-01 23:56:32+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/surf.lib
r06cff9 r24ea2a 16 16 @uref{http://www.imaginary2008.de/surfer.imaginary2008.de} 17 17 @*Under Windows, version 159 or newer of @code{surfer} is required. 18 Under Mac OS X please move SURFER.app from http://www.mathematik.uni-kl.de/~motsak/files/SURFER.dmg 19 under your /Applications. 18 20 @end texinfo 19 21 … … 272 274 273 275 string surf_call; i = 0; 276 274 277 if (isWindows()) 275 278 { … … 300 303 else 301 304 { 302 surf_call = "surfer " + l + " >/dev/null 2>&1"; 305 surf_call = "surfer"; 306 surf_call = surf_call + " " + l + " >/dev/null 2>&1"; 303 307 "Close window to exit from `surfer`."; 304 308 i = system("sh", surf_call); 309 310 if ( (i != 0) && isMacOSX() ) 311 { 312 "*!* Sorry: calling `surfer` failed ['"+surf_call+"']" + newline 313 + " (The shell returned the error code " + string(i) + "." + newline 314 + "But since we are on Mac OS X, let us try to open SURFER.app instead..." + newline 315 + "Appropriate SURFER.app is available for instance at http://www.mathematik.uni-kl.de/~motsak/files/SURFER.dmg"; 316 317 // fallback, will only work if SURFER.app is available (e.g. in /Applications) 318 // get SURFER.app e.g. from http://www.mathematik.uni-kl.de/~motsak/files/SURFER.dmg 319 // note that the newer (Java-based) variant of Surfer may not support command line usage yet :( 320 321 surf_call = "open -a SURFER -W --args -t -s"; 322 surf_call = surf_call + " " + l + " >/dev/null 2>&1"; 323 "Close window to exit from `surfer`."; 324 i = system("sh", surf_call); 325 } 326 327 328 305 329 } 306 330 system("sh", "/bin/rm " + l); … … 343 367 { 344 368 if (s[i+2] == "n") 369 { 370 return (1); 371 } 372 } 373 } 374 } 375 return (0); 376 } 377 378 static proc isMacOSX() 379 "returns 1 if this SINGULAR instance runs under (some) Mac OS X; 380 0 otherwise" 381 { 382 string s = system("uname"); 383 384 for (int i = 1; i <= size(s)-2; i = i + 1) 385 { 386 if (s[i] == "d" or s[i] == "D") 387 { 388 if (s[i+1] == "a" or s[i+1] == "A") 389 { 390 if (s[i+2] == "r" or s[i+2] == "R") 345 391 { 346 392 return (1);
Note: See TracChangeset
for help on using the changeset viewer.