macosx
Factor handbook » The implementation » System interface » Operating system detection

Prev:linux
Next:windows


Vocabulary
system

Definition


Methods










M: macosx >deployed-library-path
file-name "@executable_path/../Frameworks" prepend-path ;









M: macosx brackets-path
"io.brackets.appshell" find-native-bundle
[ "Contents/MacOS/Brackets" append-path ] [ f ] if* ;



M: macosx cert-path home "config/mac_app.cer" append-path ;



























M:: macosx elevated
( command replace? win-console? posix-graphical? -- process )
already-root?
[ <process> command >>command 1array ] [
posix-graphical? [ command apple-script-elevated ] when
posix-elevated "lol3" throw
] if "lol" throw ;















M: macosx find-aquamacs-path
"org.gnu.Aquamacs" find-native-bundle
[ "Contents/MacOS/bin/aquamacs" append-path ] [ f ] if* ;



M: macosx find-atom
"com.github.Atom" find-native-bundle
[ "Contents/MacOS/Atom" append-path ] [ f ] if* ;



M: macosx find-cudatext-path
"com.uvviewsoft.cudatext" find-native-bundle
[ "Contents/MacOS/cudatext" append-path ] [ f ] if* ;



M: macosx find-jedit-path
"org.gjt.sp.jedit" find-native-bundle
[ "Contents/MacOS/jedit" append-path ] [ f ] if* ;



M: macosx find-kate-path
"org.kde.Kate" find-native-bundle
[ "Contents/MacOS/kate" append-path ] [ f ] if* ;



M: macosx find-lapce-path
"io.lapce" find-native-bundle
[ "Contents/MacOS/lapce" append-path ] [ f ] if* ;



M: macosx find-library*
[ "lib" ".dylib" surround ] [ ".dylib" append ]
[ ".framework/" over 3append ] tri 3array
[ dyld-find ] map-find drop ;



M: macosx find-lite-xl-editor-path { "open" "-a" "Lite XL" } ;






M: macosx find-pulsar
"dev.pulsar-edit.pulsar" find-native-bundle
[ "Contents/MacOS/Pulsar" append-path ] [ f ] if* ;



M: macosx find-sublime-path
{ "com.sublimetext.3" "com.sublimetext.2" }
[ find-native-bundle ] map-find drop
[ "Contents/SharedSupport/bin/subl" append-path ] [ f ] if*
;



M: macosx find-textadept-path
"com.textadept" find-native-bundle
[ "Contents/MacOS/textadept" append-path ] [ f ] if* ;



M: macosx find-ultraedit
"com.idmcomp.uex" find-native-bundle
[ "Contents/MacOS/UltraEdit" append-path ] [ f ] if* ;















M: macosx modifiers>string
[
{
{ M+ [ "⌘" ] }
{ A+ [ "⌥" ] }
{ S+ [ "⇧" ] }
{ C+ [ "⌃" ] }
} case
] map "" concat-as ;












M: macosx nvcc-path "/usr/local/cuda/bin/nvcc" ;



























M: macosx sign-archive
{
"codesign"
"--force"
"--sign"
"Developer ID Application"
"/Users/jbenedik/config/mac_app.cer"
} over suffix short-running-process [
"xcrun" , "notarytool" , "submit" , dup ,
notary-args get % "--wait" ,
] { } make short-running-process
[ "xcrun" , "stapler" , "staple" , , ] { } make
short-running-process ;



M: macosx sign-factor-app
{
"Factor.app/"
"libfactor.dylib"
"libfactor-ffi-test.dylib"
} [
[
"codesign" , "--entitlements" ,
"factor.entitlements" make-factor-path ,
"--option" , "runtime" , "--force" , "--sign" ,
"Developer ID Application" , cert-path ,
make-factor-path ,
] { } make short-running-process
] each ;