diff options
| author | Martin Owens <doctormo@gmail.com> | 2016-12-30 23:09:39 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2016-12-30 23:09:39 +0000 |
| commit | 9090f27c2203e1ee3cc747e49cb5ad8db983ca1d (patch) | |
| tree | 591205ad0ee11f2091d5d1fcf01c57f31b384666 /packaging/macosx/ScriptExec | |
| parent | [Bug #1574561] Italian translation update. (diff) | |
| download | inkscape-9090f27c2203e1ee3cc747e49cb5ad8db983ca1d.tar.gz inkscape-9090f27c2203e1ee3cc747e49cb5ad8db983ca1d.zip | |
Remove MacOSX packaging and make space for future 0.93 osx packagers.
(bzr r15377.1.1)
Diffstat (limited to 'packaging/macosx/ScriptExec')
| -rw-r--r-- | packaging/macosx/ScriptExec/English.lproj/InfoPlist.strings | bin | 520 -> 0 bytes | |||
| -rw-r--r-- | packaging/macosx/ScriptExec/English.lproj/main.nib/classes.nib | 4 | ||||
| -rw-r--r-- | packaging/macosx/ScriptExec/English.lproj/main.nib/info.nib | 19 | ||||
| -rw-r--r-- | packaging/macosx/ScriptExec/English.lproj/main.nib/objects.xib | 271 | ||||
| -rw-r--r-- | packaging/macosx/ScriptExec/Info.plist | 39 | ||||
| -rw-r--r-- | packaging/macosx/ScriptExec/MenuBar.nib/classes.nib | 4 | ||||
| -rw-r--r-- | packaging/macosx/ScriptExec/MenuBar.nib/info.nib | 23 | ||||
| -rw-r--r-- | packaging/macosx/ScriptExec/MenuBar.nib/objects.xib | 73 | ||||
| -rw-r--r-- | packaging/macosx/ScriptExec/ScriptExec.xcodeproj/project.pbxproj | 351 | ||||
| -rw-r--r-- | packaging/macosx/ScriptExec/ScriptExec_Prefix.pch | 5 | ||||
| -rwxr-xr-x | packaging/macosx/ScriptExec/launcher-quartz-no-macintegration.sh | 176 | ||||
| -rw-r--r-- | packaging/macosx/ScriptExec/main.c | 593 | ||||
| -rwxr-xr-x | packaging/macosx/ScriptExec/openDoc | 4 | ||||
| -rwxr-xr-x | packaging/macosx/ScriptExec/script | 4 | ||||
| -rw-r--r-- | packaging/macosx/ScriptExec/version.plist | 16 |
15 files changed, 0 insertions, 1582 deletions
diff --git a/packaging/macosx/ScriptExec/English.lproj/InfoPlist.strings b/packaging/macosx/ScriptExec/English.lproj/InfoPlist.strings Binary files differdeleted file mode 100644 index 0bb6ef503..000000000 --- a/packaging/macosx/ScriptExec/English.lproj/InfoPlist.strings +++ /dev/null diff --git a/packaging/macosx/ScriptExec/English.lproj/main.nib/classes.nib b/packaging/macosx/ScriptExec/English.lproj/main.nib/classes.nib deleted file mode 100644 index ea58db118..000000000 --- a/packaging/macosx/ScriptExec/English.lproj/main.nib/classes.nib +++ /dev/null @@ -1,4 +0,0 @@ -{ -IBClasses = (); -IBVersion = 1; -} diff --git a/packaging/macosx/ScriptExec/English.lproj/main.nib/info.nib b/packaging/macosx/ScriptExec/English.lproj/main.nib/info.nib deleted file mode 100644 index da8455c15..000000000 --- a/packaging/macosx/ScriptExec/English.lproj/main.nib/info.nib +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>IBFramework Version</key> - <string>345.0</string> - <key>IBOldestOS</key> - <integer>3</integer> - <key>IBOpenObjects</key> - <array> - <integer>29</integer> - <integer>166</integer> - </array> - <key>IBSystem Version</key> - <string>7B44</string> - <key>targetFramework</key> - <string>IBCarbonFramework</string> -</dict> -</plist> diff --git a/packaging/macosx/ScriptExec/English.lproj/main.nib/objects.xib b/packaging/macosx/ScriptExec/English.lproj/main.nib/objects.xib deleted file mode 100644 index 92ff05616..000000000 --- a/packaging/macosx/ScriptExec/English.lproj/main.nib/objects.xib +++ /dev/null @@ -1,271 +0,0 @@ -<?xml version="1.0" standalone="yes"?> -<object class="NSIBObjectData"> - <string name="targetFramework">IBCarbonFramework</string> - <object name="rootObject" class="NSCustomObject" id="1"> - <string name="customClass">NSApplication</string> - </object> - <array count="38" name="allObjects"> - <object class="IBCarbonMenu" id="29"> - <string name="title">main</string> - <array count="4" name="items"> - <object class="IBCarbonMenuItem" id="185"> - <string name="title">Foo</string> - <object name="submenu" class="IBCarbonMenu" id="184"> - <string name="title">Foo</string> - <array count="1" name="items"> - <object class="IBCarbonMenuItem" id="187"> - <string name="title">About Foo</string> - <int name="keyEquivalentModifier">0</int> - <ostype name="command">abou</ostype> - </object> - </array> - <string name="name">_NSAppleMenu</string> - </object> - </object> - <object class="IBCarbonMenuItem" id="127"> - <string name="title">File</string> - <object name="submenu" class="IBCarbonMenu" id="131"> - <string name="title">File</string> - <array count="10" name="items"> - <object class="IBCarbonMenuItem" id="139"> - <string name="title">New</string> - <string name="keyEquivalent">n</string> - <ostype name="command">new </ostype> - </object> - <object class="IBCarbonMenuItem" id="134"> - <string name="title">Open…</string> - <string name="keyEquivalent">o</string> - <ostype name="command">open</ostype> - </object> - <object class="IBCarbonMenuItem" id="133"> - <boolean name="separator">TRUE</boolean> - </object> - <object class="IBCarbonMenuItem" id="130"> - <string name="title">Close</string> - <string name="keyEquivalent">w</string> - <ostype name="command">clos</ostype> - </object> - <object class="IBCarbonMenuItem" id="138"> - <string name="title">Save</string> - <string name="keyEquivalent">s</string> - <ostype name="command">save</ostype> - </object> - <object class="IBCarbonMenuItem" id="137"> - <string name="title">Save As…</string> - <string name="keyEquivalent">S</string> - <ostype name="command">svas</ostype> - </object> - <object class="IBCarbonMenuItem" id="132"> - <string name="title">Revert</string> - <string name="keyEquivalent">r</string> - <ostype name="command">rvrt</ostype> - </object> - <object class="IBCarbonMenuItem" id="128"> - <boolean name="separator">TRUE</boolean> - </object> - <object class="IBCarbonMenuItem" id="135"> - <string name="title">Page Setup…</string> - <string name="keyEquivalent">P</string> - <ostype name="command">page</ostype> - </object> - <object class="IBCarbonMenuItem" id="136"> - <string name="title">Print…</string> - <string name="keyEquivalent">p</string> - <ostype name="command">prnt</ostype> - </object> - </array> - </object> - </object> - <object class="IBCarbonMenuItem" id="152"> - <string name="title">Edit</string> - <object name="submenu" class="IBCarbonMenu" id="147"> - <string name="title">Edit</string> - <array count="10" name="items"> - <object class="IBCarbonMenuItem" id="141"> - <string name="title">Undo</string> - <string name="keyEquivalent">z</string> - <ostype name="command">undo</ostype> - </object> - <object class="IBCarbonMenuItem" id="146"> - <string name="title">Redo</string> - <string name="keyEquivalent">Z</string> - <ostype name="command">redo</ostype> - </object> - <object class="IBCarbonMenuItem" id="142"> - <boolean name="separator">TRUE</boolean> - </object> - <object class="IBCarbonMenuItem" id="143"> - <string name="title">Cut</string> - <string name="keyEquivalent">x</string> - <ostype name="command">cut </ostype> - </object> - <object class="IBCarbonMenuItem" id="149"> - <string name="title">Copy</string> - <string name="keyEquivalent">c</string> - <ostype name="command">copy</ostype> - </object> - <object class="IBCarbonMenuItem" id="144"> - <string name="title">Paste</string> - <string name="keyEquivalent">v</string> - <ostype name="command">past</ostype> - </object> - <object class="IBCarbonMenuItem" id="151"> - <string name="title">Delete</string> - <ostype name="command">clea</ostype> - </object> - <object class="IBCarbonMenuItem" id="148"> - <string name="title">Select All</string> - <string name="keyEquivalent">a</string> - <ostype name="command">sall</ostype> - </object> - <object class="IBCarbonMenuItem" id="199"> - <boolean name="separator">TRUE</boolean> - </object> - <object class="IBCarbonMenuItem" id="198"> - <string name="title">Special Characters…</string> - <ostype name="command">chrp</ostype> - </object> - </array> - </object> - </object> - <object class="IBCarbonMenuItem" id="192"> - <string name="title">Window</string> - <object name="submenu" class="IBCarbonMenu" id="195"> - <string name="title">Window</string> - <array count="6" name="items"> - <object class="IBCarbonMenuItem" id="197"> - <string name="title">Zoom Window</string> - <ostype name="command">zoom</ostype> - </object> - <object class="IBCarbonMenuItem" id="190"> - <boolean name="dynamic">TRUE</boolean> - <string name="title">Minimize Window</string> - <string name="keyEquivalent">m</string> - <ostype name="command">mini</ostype> - </object> - <object class="IBCarbonMenuItem" id="191"> - <boolean name="dynamic">TRUE</boolean> - <string name="title">Minimize All Windows</string> - <string name="keyEquivalent">m</string> - <int name="keyEquivalentModifier">1572864</int> - <ostype name="command">mina</ostype> - </object> - <object class="IBCarbonMenuItem" id="194"> - <boolean name="separator">TRUE</boolean> - </object> - <object class="IBCarbonMenuItem" id="196"> - <boolean name="dynamic">TRUE</boolean> - <string name="title">Bring All to Front</string> - <ostype name="command">bfrt</ostype> - </object> - <object class="IBCarbonMenuItem" id="193"> - <boolean name="dynamic">TRUE</boolean> - <string name="title">Arrange in Front</string> - <int name="keyEquivalentModifier">1572864</int> - <ostype name="command">frnt</ostype> - </object> - </array> - <string name="name">_NSWindowsMenu</string> - </object> - </object> - </array> - <string name="name">_NSMainMenu</string> - </object> - <reference idRef="127"/> - <reference idRef="128"/> - <reference idRef="130"/> - <reference idRef="131"/> - <reference idRef="132"/> - <reference idRef="133"/> - <reference idRef="134"/> - <reference idRef="135"/> - <reference idRef="136"/> - <reference idRef="137"/> - <reference idRef="138"/> - <reference idRef="139"/> - <reference idRef="141"/> - <reference idRef="142"/> - <reference idRef="143"/> - <reference idRef="144"/> - <reference idRef="146"/> - <reference idRef="147"/> - <reference idRef="148"/> - <reference idRef="149"/> - <reference idRef="151"/> - <reference idRef="152"/> - <object class="IBCarbonWindow" id="166"> - <string name="windowRect">204 300 564 780 </string> - <string name="title">Window</string> - <object name="rootControl" class="IBCarbonRootControl" id="167"> - <string name="bounds">0 0 360 480 </string> - <string name="viewFrame">0 0 480 360 </string> - </object> - <boolean name="receiveUpdates">FALSE</boolean> - <boolean name="liveResize">TRUE</boolean> - <boolean name="compositing">TRUE</boolean> - </object> - <reference idRef="167"/> - <reference idRef="184"/> - <reference idRef="185"/> - <reference idRef="187"/> - <reference idRef="190"/> - <reference idRef="191"/> - <reference idRef="192"/> - <reference idRef="193"/> - <reference idRef="194"/> - <reference idRef="195"/> - <reference idRef="196"/> - <reference idRef="197"/> - <reference idRef="198"/> - <reference idRef="199"/> - </array> - <array count="38" name="allParents"> - <reference idRef="1"/> - <reference idRef="29"/> - <reference idRef="131"/> - <reference idRef="131"/> - <reference idRef="127"/> - <reference idRef="131"/> - <reference idRef="131"/> - <reference idRef="131"/> - <reference idRef="131"/> - <reference idRef="131"/> - <reference idRef="131"/> - <reference idRef="131"/> - <reference idRef="131"/> - <reference idRef="147"/> - <reference idRef="147"/> - <reference idRef="147"/> - <reference idRef="147"/> - <reference idRef="147"/> - <reference idRef="152"/> - <reference idRef="147"/> - <reference idRef="147"/> - <reference idRef="147"/> - <reference idRef="29"/> - <reference idRef="1"/> - <reference idRef="166"/> - <reference idRef="185"/> - <reference idRef="29"/> - <reference idRef="184"/> - <reference idRef="195"/> - <reference idRef="195"/> - <reference idRef="29"/> - <reference idRef="195"/> - <reference idRef="195"/> - <reference idRef="192"/> - <reference idRef="195"/> - <reference idRef="195"/> - <reference idRef="147"/> - <reference idRef="147"/> - </array> - <dictionary count="3" name="nameTable"> - <string>Files Owner</string> - <reference idRef="1"/> - <string>MainWindow</string> - <reference idRef="166"/> - <string>MenuBar</string> - <reference idRef="29"/> - </dictionary> - <unsigned_int name="nextObjectID">200</unsigned_int> -</object> diff --git a/packaging/macosx/ScriptExec/Info.plist b/packaging/macosx/ScriptExec/Info.plist deleted file mode 100644 index 9cac37f85..000000000 --- a/packaging/macosx/ScriptExec/Info.plist +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> -<plist version="0.9"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>English</string> - <key>CFBundleDocumentTypes</key> - <array> - <dict> - <key>CFBundleTypeExtensions</key> - <array> - <string>*</string> - </array> - <key>CFBundleTypeName</key> - <string>All</string> - <key>CFBundleTypeOSTypes</key> - <array> - <string>****</string> - </array> - <key>CFBundleTypeRole</key> - <string>Viewer</string> - </dict> - </array> - <key>CFBundleExecutable</key> - <string>ScriptExec</string> - <key>CFBundleIconFile</key> - <string></string> - <key>CFBundleIdentifier</key> - <string>com.apple.myCarbonNibApp</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>1.1</string> -</dict> -</plist> diff --git a/packaging/macosx/ScriptExec/MenuBar.nib/classes.nib b/packaging/macosx/ScriptExec/MenuBar.nib/classes.nib deleted file mode 100644 index ea58db118..000000000 --- a/packaging/macosx/ScriptExec/MenuBar.nib/classes.nib +++ /dev/null @@ -1,4 +0,0 @@ -{ -IBClasses = (); -IBVersion = 1; -} diff --git a/packaging/macosx/ScriptExec/MenuBar.nib/info.nib b/packaging/macosx/ScriptExec/MenuBar.nib/info.nib deleted file mode 100644 index c0f4643ef..000000000 --- a/packaging/macosx/ScriptExec/MenuBar.nib/info.nib +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>IBDocumentLocation</key> - <string>99 362 356 240 0 0 1280 832 </string> - <key>IBEditorPositions</key> - <dict> - <key>187</key> - <string>340 374 240 44 0 0 1280 832 </string> - </dict> - <key>IBFramework Version</key> - <string>349.0</string> - <key>IBOpenObjects</key> - <array> - <integer>187</integer> - </array> - <key>IBSystem Version</key> - <string>7F44</string> - <key>targetFramework</key> - <string>IBCarbonFramework</string> -</dict> -</plist> diff --git a/packaging/macosx/ScriptExec/MenuBar.nib/objects.xib b/packaging/macosx/ScriptExec/MenuBar.nib/objects.xib deleted file mode 100644 index 78f0a0a01..000000000 --- a/packaging/macosx/ScriptExec/MenuBar.nib/objects.xib +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" standalone="yes"?> -<object class="NSIBObjectData"> - <string name="targetFramework">IBCarbonFramework</string> - <object name="rootObject" class="NSCustomObject" id="1"> - <string name="customClass">NSApplication</string> - </object> - <array count="4" name="allObjects"> - <object class="IBCarbonMenu" id="187"> - <string name="title">MenuBar</string> - <array count="1" name="items"> - <object class="IBCarbonMenuItem" id="195"> - <string name="title">ScriptExec</string> - <object name="submenu" class="IBCarbonMenu" id="193"> - <string name="title">ScriptExec</string> - <string name="name">_NSAppleMenu</string> - </object> - </object> - </array> - <string name="name">_NSMainMenu</string> - </object> - <reference idRef="193"/> - <reference idRef="195"/> - <object class="IBCarbonMenuItem" id="204"> - <string name="title">Window</string> - <object name="submenu" class="IBCarbonMenu"> - <string name="title">Window</string> - <array count="5" name="items"> - <object class="IBCarbonMenuItem"> - <boolean name="dynamic">TRUE</boolean> - <string name="title">Minimize Window</string> - <string name="keyEquivalent">m</string> - <ostype name="command">mini</ostype> - </object> - <object class="IBCarbonMenuItem"> - <boolean name="dynamic">TRUE</boolean> - <string name="title">Minimize All Windows</string> - <string name="keyEquivalent">m</string> - <int name="keyEquivalentModifier">1572864</int> - <ostype name="command">mini</ostype> - </object> - <object class="IBCarbonMenuItem"> - <boolean name="separator">TRUE</boolean> - </object> - <object class="IBCarbonMenuItem"> - <boolean name="dynamic">TRUE</boolean> - <string name="title">Bring All to Front</string> - <ostype name="command">frnt</ostype> - </object> - <object class="IBCarbonMenuItem"> - <boolean name="dynamic">TRUE</boolean> - <string name="title">Bring in Front</string> - <int name="keyEquivalentModifier">1572864</int> - <ostype name="command">frnt</ostype> - </object> - </array> - <string name="name">_NSWindowsMenu</string> - </object> - </object> - </array> - <array count="4" name="allParents"> - <reference idRef="1"/> - <reference idRef="195"/> - <reference idRef="187"/> - <reference idRef="187"/> - </array> - <dictionary count="2" name="nameTable"> - <string>File's Owner</string> - <reference idRef="1"/> - <string>MenuBar</string> - <reference idRef="187"/> - </dictionary> - <unsigned_int name="nextObjectID">206</unsigned_int> -</object> diff --git a/packaging/macosx/ScriptExec/ScriptExec.xcodeproj/project.pbxproj b/packaging/macosx/ScriptExec/ScriptExec.xcodeproj/project.pbxproj deleted file mode 100644 index 0443dd764..000000000 --- a/packaging/macosx/ScriptExec/ScriptExec.xcodeproj/project.pbxproj +++ /dev/null @@ -1,351 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 42; - objects = { - -/* Begin PBXBuildFile section */ - 664C29F1060ECDC4006EC560 /* openDoc in Resources */ = {isa = PBXBuildFile; fileRef = 664C29F0060ECDC4006EC560 /* openDoc */; }; - 8D0C4E8B0486CD37000505A6 /* ScriptExec_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32DBCF6D0370B57F00C91783 /* ScriptExec_Prefix.pch */; }; - 8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; }; - 8D0C4E900486CD37000505A6 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 20286C2BFDCF999611CA2CEA /* main.c */; settings = {ATTRIBUTES = (); }; }; - 8D0C4E920486CD37000505A6 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; }; - B8DCE045056DAC3500C390B0 /* MenuBar.nib in Resources */ = {isa = PBXBuildFile; fileRef = B8DCE042056DAC3500C390B0 /* MenuBar.nib */; }; - B8DCE049056DAC5000C390B0 /* script in Resources */ = {isa = PBXBuildFile; fileRef = B8DCE048056DAC5000C390B0 /* script */; }; - B8DCE04F056DACAE00C390B0 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B8DCE04E056DACAE00C390B0 /* Security.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; - 20286C2BFDCF999611CA2CEA /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; }; - 20286C33FDCF999611CA2CEA /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; - 32DBCF6D0370B57F00C91783 /* ScriptExec_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptExec_Prefix.pch; sourceTree = "<group>"; }; - 4A9504C8FFE6A3BC11CA0CBA /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; }; - 4A9504CAFFE6A41611CA0CBA /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; }; - 664C29F0060ECDC4006EC560 /* openDoc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = openDoc; sourceTree = "<group>"; }; - 8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; }; - 8D0C4E970486CD37000505A6 /* ScriptExec.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScriptExec.app; sourceTree = BUILT_PRODUCTS_DIR; }; - B8DCE042056DAC3500C390B0 /* MenuBar.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; path = MenuBar.nib; sourceTree = "<group>"; }; - B8DCE048056DAC5000C390B0 /* script */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = script; sourceTree = "<group>"; }; - B8DCE04E056DACAE00C390B0 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D0C4E910486CD37000505A6 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D0C4E920486CD37000505A6 /* Carbon.framework in Frameworks */, - B8DCE04F056DACAE00C390B0 /* Security.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 195DF8CFFE9D517E11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D0C4E970486CD37000505A6 /* ScriptExec.app */, - ); - name = Products; - sourceTree = "<group>"; - }; - 20286C29FDCF999611CA2CEA /* ScriptExec */ = { - isa = PBXGroup; - children = ( - 20286C2AFDCF999611CA2CEA /* Sources */, - 20286C2CFDCF999611CA2CEA /* Resources */, - 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */, - 195DF8CFFE9D517E11CA2CBB /* Products */, - ); - name = ScriptExec; - sourceTree = "<group>"; - }; - 20286C2AFDCF999611CA2CEA /* Sources */ = { - isa = PBXGroup; - children = ( - 32DBCF6D0370B57F00C91783 /* ScriptExec_Prefix.pch */, - 20286C2BFDCF999611CA2CEA /* main.c */, - ); - name = Sources; - sourceTree = "<group>"; - }; - 20286C2CFDCF999611CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 664C29F0060ECDC4006EC560 /* openDoc */, - B8DCE042056DAC3500C390B0 /* MenuBar.nib */, - 8D0C4E960486CD37000505A6 /* Info.plist */, - B8DCE048056DAC5000C390B0 /* script */, - 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */, - ); - name = Resources; - sourceTree = "<group>"; - }; - 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = { - isa = PBXGroup; - children = ( - 20286C33FDCF999611CA2CEA /* Carbon.framework */, - 4A9504CAFFE6A41611CA0CBA /* CoreServices.framework */, - 4A9504C8FFE6A3BC11CA0CBA /* ApplicationServices.framework */, - B8DCE04E056DACAE00C390B0 /* Security.framework */, - ); - name = "External Frameworks and Libraries"; - sourceTree = "<group>"; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 8D0C4E8A0486CD37000505A6 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D0C4E8B0486CD37000505A6 /* ScriptExec_Prefix.pch in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 8D0C4E890486CD37000505A6 /* ScriptExec */ = { - isa = PBXNativeTarget; - buildConfigurationList = 78E9AE160A36A8E3000D76A8 /* Build configuration list for PBXNativeTarget "ScriptExec" */; - buildPhases = ( - 8D0C4E8A0486CD37000505A6 /* Headers */, - 8D0C4E8C0486CD37000505A6 /* Resources */, - 8D0C4E8F0486CD37000505A6 /* Sources */, - 8D0C4E910486CD37000505A6 /* Frameworks */, - 8D0C4E940486CD37000505A6 /* Rez */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ScriptExec; - productInstallPath = "$(HOME)/Applications"; - productName = ScriptExec; - productReference = 8D0C4E970486CD37000505A6 /* ScriptExec.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 20286C28FDCF999611CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 78E9AE1A0A36A8E3000D76A8 /* Build configuration list for PBXProject "ScriptExec" */; - compatibilityVersion = "Xcode 2.4"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - en, - ); - mainGroup = 20286C29FDCF999611CA2CEA /* ScriptExec */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8D0C4E890486CD37000505A6 /* ScriptExec */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D0C4E8C0486CD37000505A6 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */, - B8DCE045056DAC3500C390B0 /* MenuBar.nib in Resources */, - B8DCE049056DAC5000C390B0 /* script in Resources */, - 664C29F1060ECDC4006EC560 /* openDoc in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXRezBuildPhase section */ - 8D0C4E940486CD37000505A6 /* Rez */ = { - isa = PBXRezBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXRezBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D0C4E8F0486CD37000505A6 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D0C4E900486CD37000505A6 /* main.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 0867D6ABFE840B52C02AAC07 /* English */, - ); - name = InfoPlist.strings; - sourceTree = "<group>"; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 78E9AE170A36A8E3000D76A8 /* Development */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; - ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; - COPY_PHASE_STRIP = NO; - DEBUGGING_SYMBOLS = YES; - FRAMEWORK_SEARCH_PATHS = ""; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_ENABLE_TRIGRAPHS = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ScriptExec_Prefix.pch; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; - GCC_WARN_UNKNOWN_PRAGMAS = NO; - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - LIBRARY_SEARCH_PATHS = ""; - LIBRARY_STYLE = Static; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = ScriptExec; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - WRAPPER_EXTENSION = app; - ZERO_LINK = YES; - }; - name = Development; - }; - 78E9AE180A36A8E3000D76A8 /* Deployment */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; - ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; - COPY_PHASE_STRIP = YES; - FRAMEWORK_SEARCH_PATHS = ""; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_TRIGRAPHS = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_OPTIMIZATION_LEVEL = s; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ScriptExec_Prefix.pch; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; - GCC_WARN_UNKNOWN_PRAGMAS = NO; - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - LIBRARY_SEARCH_PATHS = ""; - LIBRARY_STYLE = Static; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = ScriptExec; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - WRAPPER_EXTENSION = app; - ZERO_LINK = NO; - }; - name = Deployment; - }; - 78E9AE190A36A8E3000D76A8 /* Default */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; - ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; - FRAMEWORK_SEARCH_PATHS = ""; - GCC_ENABLE_TRIGRAPHS = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ScriptExec_Prefix.pch; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; - GCC_WARN_UNKNOWN_PRAGMAS = NO; - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - LIBRARY_SEARCH_PATHS = ""; - LIBRARY_STYLE = Static; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = ScriptExec; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - WRAPPER_EXTENSION = app; - }; - name = Default; - }; - 78E9AE1B0A36A8E3000D76A8 /* Development */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Development; - }; - 78E9AE1C0A36A8E3000D76A8 /* Deployment */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Deployment; - }; - 78E9AE1D0A36A8E3000D76A8 /* Default */ = { - isa = XCBuildConfiguration; - buildSettings = { - }; - name = Default; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 78E9AE160A36A8E3000D76A8 /* Build configuration list for PBXNativeTarget "ScriptExec" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 78E9AE170A36A8E3000D76A8 /* Development */, - 78E9AE180A36A8E3000D76A8 /* Deployment */, - 78E9AE190A36A8E3000D76A8 /* Default */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Default; - }; - 78E9AE1A0A36A8E3000D76A8 /* Build configuration list for PBXProject "ScriptExec" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 78E9AE1B0A36A8E3000D76A8 /* Development */, - 78E9AE1C0A36A8E3000D76A8 /* Deployment */, - 78E9AE1D0A36A8E3000D76A8 /* Default */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Default; - }; -/* End XCConfigurationList section */ - }; - rootObject = 20286C28FDCF999611CA2CEA /* Project object */; -} diff --git a/packaging/macosx/ScriptExec/ScriptExec_Prefix.pch b/packaging/macosx/ScriptExec/ScriptExec_Prefix.pch deleted file mode 100644 index 16d7ede3d..000000000 --- a/packaging/macosx/ScriptExec/ScriptExec_Prefix.pch +++ /dev/null @@ -1,5 +0,0 @@ -// -// Prefix header for all source files of the 'ScriptExec' target in the 'ScriptExec' project. -// - -#include <Carbon/Carbon.h> diff --git a/packaging/macosx/ScriptExec/launcher-quartz-no-macintegration.sh b/packaging/macosx/ScriptExec/launcher-quartz-no-macintegration.sh deleted file mode 100755 index 9cf08ed49..000000000 --- a/packaging/macosx/ScriptExec/launcher-quartz-no-macintegration.sh +++ /dev/null @@ -1,176 +0,0 @@ -#!/bin/sh -# -# Author: Aaron Voisine <aaron@voisine.org> -# Inkscape Modifications: -# Michael Wybrow <mjwybrow@users.sourceforge.net> -# Jean-Olivier Irisson <jo.irisson@gmail.com> -# ~suv <suv-sf@users.sourceforge.net> -# - -get_env_current () -{ - env | awk -F= '/[a-zA-Z_][a-zA-Z_0-9]*=/ {if (!system("[ -n \"${" $1 "+y}\" ]")) print $1 }' | sort | uniq -} -[ -z "$_env_orig" ] && export _env_orig="$(get_env_current)" - -[ -n "$INK_DEBUG_LAUNCHER" ] && set -x - -CMD="$(readlink $0 || echo $0)" -CWD="$(cd "$(dirname "$CMD")" && pwd -P)" -# e.g. /Applications/Inkscape.app/Contents/MacOS -TOP="$(dirname "$CWD")/Resources" -# e.g. /Applications/Inkscape.app/Contents/Resources -BASE="$(echo "$TOP" | sed -e 's/\/Contents\/Resources.*$//')" -# e.g. /Applications/Inkscape.app - -source "${TOP}/xdg_setup.sh" -source "${TOP}/alert_fccache.sh" - -# FIXME: Inkscape needs better relocation support for OS X (get rid of the relative -# path hack in src/path-prefix.h for osxapp-enabled builds). Until then, below change -# of working directory is required: -# -# Due to changes after 0.48, we have to change working directory in the script named 'inkscape': -# recursive calls to inkscape from python-based extensions otherwise cause the app to hang or -# fail (for python-based extensions, inkscape changes the working directory to the -# script's directory, and inkscape launched by python script thus can't find resources -# like the now essential 'units.xml' in INKSCAPE_UIDIR relative to the working directory). -cd "$BASE" || exit 1 - -# don't prepend to $PATH in recursive calls: -if [ -z "$INK_PATH_ORIG" ]; then - - # Brutally add many things to the PATH. If the directories do not exist, they won't be used anyway. - # the 'classic' PATH additions: - # /usr/local/bin which, though standard, doesn't seem to be in the PATH - # Fink - # MacPorts (former DarwinPorts) - # LaTeX distribution for Mac OS X - PATH_OTHER="/usr/texbin:/opt/local/bin:/sw/bin/:/usr/local/bin" - - # Put /usr/bin at beginning of path so we make sure we use Apple's python - # over one that may be installed be Macports, Fink or some other means. - PATH_PYTHON="/usr/bin" - - # Put $TOP/bin at beginning of path so we make sure that recursive calls - # to inkscape don't pull in other inkscape binaries with different setup. - # Also allows to override system python with custom wrapper script, and - # e.g. to support GIMP.app or gimp for external editing and GIMP XCF export. - PATH_pkgbin="$CWD:$TOP/bin" - - # save orig, new PATH - export INK_PATH_ORIG="$PATH" - export PATH="$PATH_pkgbin:$PATH_PYTHON:$PATH_OTHER:$INK_PATH_ORIG" -fi - -# Setup PYTHONPATH to use python modules shipped with Inkscape -OSXMINORNO="$(/usr/bin/sw_vers -productVersion | cut -d. -f2)" -build_arch=__build_arch__ -if [ $OSXMINORNO -gt "5" ]; then - if [ $OSXMINORNO -eq "6" ]; then - export VERSIONER_PYTHON_VERSION=2.6 - else # if [ $OSXMINORNO -ge "7" ]; then - export VERSIONER_PYTHON_VERSION=2.7 - fi - if [ $build_arch = "i386" ]; then - export VERSIONER_PYTHON_PREFER_32_BIT=yes - else # build & runtime arch x86_64 - export VERSIONER_PYTHON_PREFER_32_BIT=no - fi -fi -PYTHON_VERS="$(python -V 2>&1 | cut -c 8-10)" -export PYTHONPATH="$TOP/lib/python$PYTHON_VERS/site-packages/" - -export FONTCONFIG_PATH="$TOP/etc/fonts" -export PANGO_RC_FILE="$TOP/etc/pango/pangorc" -export PANGO_SYSCONFDIR="$TOP/etc" -export GTK_IM_MODULE_FILE="$TOP/lib/gtk-2.0/__gtk_version__/immodules.cache" -export GDK_PIXBUF_MODULE_FILE="$TOP/lib/gdk-pixbuf-2.0/__gtk_version__/loaders.cache" -export GTK_DATA_PREFIX="$TOP" -export GTK_EXE_PREFIX="$TOP" -export GTK_PATH="$TOP" -export GNOME_VFS_MODULE_CONFIG_PATH="$TOP/etc/gnome-vfs-2.0/modules" -export GNOME_VFS_MODULE_PATH="$TOP/lib/gnome-vfs-2.0/modules" -export GIO_USE_VFS="local" -export GVFS_REMOTE_VOLUME_MONITOR_IGNORE=1 -export GVFS_DISABLE_FUSE=1 -export XDG_DATA_DIRS="$TOP/share" -export ASPELL_CONF="prefix $TOP;" -export POPPLER_DATADIR="$TOP/share/poppler" - -# no DBUS for now -unset DBUS_LAUNCHD_SESSION_BUS_SOCKET -unset DBUS_SESSION_BUS_ADDRESS - -# Note: This requires the path with the exact ImageMagic version number. -# The actual version is inserted by the packaging script. -export MAGICK_CONFIGURE_PATH="$TOP/lib/ImageMagick-IMAGEMAGICKVER/config:$TOP/share/ImageMagick-IMAGEMAGICKVER_MAJOR/config" -export MAGICK_CODER_FILTER_PATH="$TOP/lib/ImageMagick-IMAGEMAGICKVER/modules-Q16/filters" -export MAGICK_CODER_MODULE_PATH="$TOP/lib/ImageMagick-IMAGEMAGICKVER/modules-Q16/coders" - -export INKSCAPE_SHAREDIR="$TOP/share/inkscape" -export INKSCAPE_PLUGINDIR="$TOP/lib/inkscape" -export INKSCAPE_LOCALEDIR="$TOP/share/locale" - -# Handle the case where the directory storing Inkscape has special characters -# ('#', '&', '|') in the name. These need to be escaped to work properly for -# various configuration files. -ESCAPEDTOP=`echo "$TOP" | sed 's/#/\\\\\\\\#/' | sed 's/&/\\\\\\&/g' | sed 's/|/\\\\\\|/g'` - -# Set GTK theme (only if there is no .gtkrc-2.0 in the user's home) -if [[ ! -e "$HOME/.gtkrc-2.0" ]]; then - export GTK2_RC_FILES="$ESCAPEDTOP/etc/gtk-2.0/gtkrc" -fi - -# If the AppleCollationOrder preference doesn't exist, we fall back to using -# the AppleLocale preference. -LANGSTR=`defaults read .GlobalPreferences AppleCollationOrder 2>/dev/null` -if [ "x$LANGSTR" == "x" -o "x$LANGSTR" == "xroot" ] -then - LANGSTR=`defaults read .GlobalPreferences AppleLocale 2>/dev/null | \ - sed 's/_.*//'` - [ $_DEBUG ] && echo "Setting LANGSTR from AppleLocale: $LANGSTR" 1>&2 -else - [ $_DEBUG ] && echo "Setting LANGSTR from AppleCollationOrder: $LANGSTR" 1>&2 -fi - -# NOTE: Have to add ".UTF-8" to the LANG since omitting causes Inkscape -# to crash on startup in locale_from_utf8(). -if [ "x$LANGSTR" == "x" ] -then - # override broken script - [ $_DEBUG ] && echo "Overriding empty LANGSTR" 1>&2 - export LANG="en_US.UTF-8" -else - tmpLANG="`grep \"\`echo $LANGSTR\`_\" /usr/share/locale/locale.alias | \ - tail -n1 | sed 's/\./ /' | awk '{print $2}'`" - if [ "x$tmpLANG" == "x" ] - then - # override broken script - [ $_DEBUG ] && echo "Overriding empty LANG from /usr/share/locale/locale.alias" 1>&2 - export LANG="en_US.UTF-8" - else - [ $_DEBUG ] && echo "Setting LANG from /usr/share/locale/locale.alias" 1>&2 - export LANG="$tmpLANG.UTF-8" - fi -fi -[ $_DEBUG ] && echo "Setting Language: $LANG" 1>&2 -export LC_ALL="$LANG" - -case "$INK_DEBUG" in - gdb) - EXEC="gdb --args" ;; - lldb) - EXEC="lldb -- " ;; - dtruss) - EXEC="dtruss" ;; - *) - EXEC="exec" ;; -esac -unset INK_DEBUG # ignore for recursive calls - -if [ "x$INK_DEBUG_SHELL" != "x" ]; then - exec bash -else - $EXEC "$CWD/inkscape-bin" "$@" -fi diff --git a/packaging/macosx/ScriptExec/main.c b/packaging/macosx/ScriptExec/main.c deleted file mode 100644 index e3f066d70..000000000 --- a/packaging/macosx/ScriptExec/main.c +++ /dev/null @@ -1,593 +0,0 @@ -/* - Platypus - create MacOS X application bundles that execute scripts - This is the executable that goes into Platypus apps - Copyright (C) 2003 Sveinbjorn Thordarson <sveinbt@hi.is> - - With modifications by Aaron Voisine for gimp.app - With modifications by Marianne gagnon for Wilber-loves-apple - With modifications by Michael Wybrow for Inkscape.app - With modifications by ~suv for Inkscape.app - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - main.c - main program file - -*/ - -/* - * This app laucher basically takes care of: - * - launching Inkscape when double-clicked - * - bringing X11 to the top when its icon is clicked in the dock (via a small applescript) - * - catch file dropped on icon events (and double-clicked gimp documents) and notify gimp. - * - catch quit events performed outside gimp, e.g. on the dock icon. - */ - -/////////////////////////////////////// -// Includes -/////////////////////////////////////// -#pragma mark Includes - -// Apple stuff - -// Note: including Carbon prevents building the launcher app in x86_64 -// used for StandardAlert in RequestUserAttention(), -// RedFatalAlert() -#include <Carbon/Carbon.h> - -#include <CoreFoundation/CoreFoundation.h> -#include <Security/Authorization.h> -#include <Security/AuthorizationTags.h> - -// Unix stuff -#include <string.h> -#include <unistd.h> -#include <sys/wait.h> -#include <pthread.h> -#include <stdio.h> - -/////////////////////////////////////// -// Definitions -/////////////////////////////////////// -#pragma mark Definitions - -// name length limits -#define kMaxPathLength 1024 - -// names of files bundled with app -#define kScriptFileName "script" -#define kOpenDocFileName "openDoc" - -// custom carbon event class -#define kEventClassRedFatalAlert 911 - -// custom carbon event types -#define kEventKindFCCacheFailed 912 - -//maximum arguments the script accepts -#define kMaxArgumentsToScript 252 - -/////////////////////////////////////// -// Prototypes -/////////////////////////////////////// -#pragma mark Prototypes - -static void *Execute(void *arg); -static void *OpenDoc(void *arg); -static OSErr ExecuteScript(char *script, pid_t *pid); - -static void GetParameters(void); -static unsigned char* GetScript(void); -static unsigned char* GetOpenDoc(void); - -OSErr LoadMenuBar(char *appName); - -static OSStatus FSMakePath(FSRef fileRef, unsigned char *path, long maxPathSize); -static void RedFatalAlert(Str255 errorString, Str255 expStr); -static short DoesFileExist(unsigned char *path); - -static OSErr AppQuitAEHandler(const AppleEvent *theAppleEvent, - AppleEvent *reply, long refCon); -static OSErr AppOpenDocAEHandler(const AppleEvent *theAppleEvent, - AppleEvent *reply, long refCon); -static OSErr AppOpenAppAEHandler(const AppleEvent *theAppleEvent, - AppleEvent *reply, long refCon); -static OSStatus FCCacheFailedHandler(EventHandlerCallRef theHandlerCall, - EventRef theEvent, void *userData); -static OSErr AppReopenAppAEHandler(const AppleEvent *theAppleEvent, - AppleEvent *reply, long refCon); - -static OSStatus CompileAppleScript(const void* text, long textLength, - AEDesc *resultData); -static OSStatus SimpleCompileAppleScript(const char* theScript); -static OSErr runScript(); - -/////////////////////////////////////// -// Globals -/////////////////////////////////////// -#pragma mark Globals - -// process id of forked process -pid_t pid = 0; - -// thread id of threads that start scripts -pthread_t odtid = 0, tid = 0; - -// indicator of whether the script has completed executing -short taskDone = true; - -// execution parameters -char scriptPath[kMaxPathLength]; -char openDocPath[kMaxPathLength]; - -//arguments to the script -char *arguments[kMaxArgumentsToScript+3]; -char *fileArgs[kMaxArgumentsToScript]; -short numArgs = 0; - -extern char **environ; - -#pragma mark - - -/////////////////////////////////////// -// Program entrance point -/////////////////////////////////////// -int main(int argc, char* argv[]) -{ - OSErr err = noErr; - EventTypeSpec FCCacheEvents = { kEventClassRedFatalAlert, kEventKindFCCacheFailed }; - - InitCursor(); - - //install Apple Event handlers - err += AEInstallEventHandler(kCoreEventClass, kAEQuitApplication, - NewAEEventHandlerUPP(AppQuitAEHandler), - 0, false); - err += AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, - NewAEEventHandlerUPP(AppOpenDocAEHandler), - 0, false); - err += AEInstallEventHandler(kCoreEventClass, kAEOpenApplication, - NewAEEventHandlerUPP(AppOpenAppAEHandler), - 0, false); - - err += AEInstallEventHandler(kCoreEventClass, kAEReopenApplication, - NewAEEventHandlerUPP(AppReopenAppAEHandler), - 0, false); - - err += InstallEventHandler(GetApplicationEventTarget(), - NewEventHandlerUPP(FCCacheFailedHandler), 1, - &FCCacheEvents, NULL, NULL); - - if (err) RedFatalAlert("\pInitialization Error", - "\pError initing Apple Event handlers."); - - //create the menu bar - if (err = LoadMenuBar(NULL)) RedFatalAlert("\pInitialization Error", - "\pError loading MenuBar.nib."); - - GetParameters(); //load data from files containing exec settings - - // compile "icon clicked" script so it's ready to execute - SimpleCompileAppleScript("tell application \"XQuartz\" to activate"); - - RunApplicationEventLoop(); //Run the event loop - return 0; -} - -#pragma mark - - - -static void RequestUserAttention(void) -{ - NMRecPtr notificationRequest = (NMRecPtr) NewPtr(sizeof(NMRec)); - - memset(notificationRequest, 0, sizeof(*notificationRequest)); - notificationRequest->qType = nmType; - notificationRequest->nmMark = 1; - notificationRequest->nmIcon = 0; - notificationRequest->nmSound = 0; - notificationRequest->nmStr = NULL; - notificationRequest->nmResp = NULL; - - verify_noerr(NMInstall(notificationRequest)); -} - - -static void ShowFirstStartWarningDialog(void) -{ - SInt16 itemHit; - - AlertStdAlertParamRec params; - params.movable = true; - params.helpButton = false; - params.filterProc = NULL; - params.defaultText = (void *) kAlertDefaultOKText; - params.cancelText = NULL; - params.otherText = NULL; - params.defaultButton = kAlertStdAlertOKButton; - params.cancelButton = kAlertStdAlertCancelButton; - params.position = kWindowDefaultPosition; - - StandardAlert(kAlertNoteAlert, "\pInkscape on Mac OS X", - "\pWhile Inkscape is open, its windows can be displayed or hidden by displaying or hiding the X11 application.\n\nThe first time this version of Inkscape is run it may take several minutes before the main window is displayed while font caches are built.", - ¶ms, &itemHit); -} - - -////////////////////////////////// -// Handler for when fontconfig caches need to be generated -// TODO: remove (alert and touch moved to launcher script) -////////////////////////////////// -static OSStatus FCCacheFailedHandler(EventHandlerCallRef theHandlerCall, - EventRef theEvent, void *userData) -{ - - pthread_join(tid, NULL); - if (odtid) pthread_join(odtid, NULL); - - // Bounce Inkscape Dock icon - RequestUserAttention(); - // Need to show warning to the user, then carry on. - ShowFirstStartWarningDialog(); - - // Note that we've seen the warning. - system("test -d \"$HOME/.cache/inkscape\" || mkdir -p \"$HOME/.cache/inkscape\"; " - "touch \"$HOME/.cache/inkscape/.fccache-new\""); - // Rerun now. - OSErr err = ExecuteScript(scriptPath, &pid); - ExitToShell(); - - return noErr; -} - - -/////////////////////////////////// -// Execution thread starts here -/////////////////////////////////// -static void *Execute (void *arg) -{ - EventRef event; - - taskDone = false; - - OSErr err = ExecuteScript(scriptPath, &pid); - if (err == (OSErr)12) { - CreateEvent(NULL, kEventClassRedFatalAlert, kEventKindFCCacheFailed, 0, - kEventAttributeNone, &event); - PostEventToQueue(GetMainEventQueue(), event, kEventPriorityHigh); - } - else ExitToShell(); - return 0; -} - -/////////////////////////////////// -// Open additional documents thread starts here -/////////////////////////////////// -static void *OpenDoc (void *arg) -{ - ExecuteScript(openDocPath, NULL); - return 0; -} - -/////////////////////////////////////// -// Run a script via the system command -/////////////////////////////////////// -static OSErr ExecuteScript (char *script, pid_t *pid) -{ - pid_t wpid = 0, p = 0; - int status, i; - - if (! pid) pid = &p; - - // Generate the array of argument strings before we do any executing - arguments[0] = script; - for (i = 0; i < numArgs; i++) arguments[i + 1] = fileArgs[i]; - arguments[i + 1] = NULL; - - *pid = fork(); //open fork - - if (*pid == (pid_t)-1) exit(13); //error - else if (*pid == 0) { //child process started - execve(arguments[0], arguments, environ); - exit(13); //if we reach this point, there's an error - } - - wpid = waitpid(*pid, &status, 0); //wait while child process finishes - - if (wpid == (pid_t)-1) return wpid; - return (OSErr)WEXITSTATUS(status); -} - -#pragma mark - - -/////////////////////////////////////// -// This function loads all the neccesary settings -// from config files in the Resources folder -/////////////////////////////////////// -static void GetParameters (void) -{ - char *str; - if (! (str = (char *)GetScript())) //get path to script to be executed - RedFatalAlert("\pInitialization Error", - "\pError getting script from application bundle."); - strcpy((char *)&scriptPath, str); - - if (! (str = (char *)GetOpenDoc())) //get path to openDoc - RedFatalAlert("\pInitialization Error", - "\pError getting openDoc from application bundle."); - strcpy((char *)&openDocPath, str); -} - -/////////////////////////////////////// -// Get path to the script in Resources folder -/////////////////////////////////////// -static unsigned char* GetScript (void) -{ - CFStringRef fileName; - CFBundleRef appBundle; - CFURLRef scriptFileURL; - FSRef fileRef; - unsigned char *path; - - //get CF URL for script - if (! (appBundle = CFBundleGetMainBundle())) return NULL; - if (! (fileName = CFStringCreateWithCString(NULL, kScriptFileName, - kCFStringEncodingASCII))) - return NULL; - if (! (scriptFileURL = CFBundleCopyResourceURL(appBundle, fileName, NULL, - NULL))) return NULL; - - //Get file reference from Core Foundation URL - if (! CFURLGetFSRef(scriptFileURL, &fileRef)) return NULL; - - //dispose of the CF variables - CFRelease(scriptFileURL); - CFRelease(fileName); - - //create path string - if (! (path = malloc(kMaxPathLength))) return NULL; - if (FSMakePath(fileRef, path, kMaxPathLength)) return NULL; - if (! DoesFileExist(path)) return NULL; - - return path; -} - -/////////////////////////////////////// -// Gets the path to openDoc in Resources folder -/////////////////////////////////////// -static unsigned char* GetOpenDoc (void) -{ - CFStringRef fileName; - CFBundleRef appBundle; - CFURLRef openDocFileURL; - FSRef fileRef; - unsigned char *path; - - //get CF URL for openDoc - if (! (appBundle = CFBundleGetMainBundle())) return NULL; - if (! (fileName = CFStringCreateWithCString(NULL, kOpenDocFileName, - kCFStringEncodingASCII))) - return NULL; - if (! (openDocFileURL = CFBundleCopyResourceURL(appBundle, fileName, NULL, - NULL))) return NULL; - - //Get file reference from Core Foundation URL - if (! CFURLGetFSRef( openDocFileURL, &fileRef )) return NULL; - - //dispose of the CF variables - CFRelease(openDocFileURL); - CFRelease(fileName); - - //create path string - if (! (path = malloc(kMaxPathLength))) return NULL; - if (FSMakePath(fileRef, path, kMaxPathLength)) return NULL; - if (! DoesFileExist(path)) return NULL; - - return path; -} - -#pragma mark - - -///////////////////////////////////// -// Load menu bar from nib -///////////////////////////////////// -OSErr LoadMenuBar (char *appName) -{ - OSErr err; - IBNibRef nibRef; - - if (err = CreateNibReference(CFSTR("MenuBar"), &nibRef)) return err; - if (err = SetMenuBarFromNib(nibRef, CFSTR("MenuBar"))) return err; - DisposeNibReference(nibRef); - - return noErr; -} - -#pragma mark - - -/////////////////////////////////////// -// Generate path string from FSSpec record -/////////////////////////////////////// -static OSStatus FSMakePath(FSRef fileRef, unsigned char *path, long maxPathSize) -{ - // and then convert the FSRef to a path - return FSRefMakePath(&fileRef, path, maxPathSize); -} - -//////////////////////////////////////// -// Standard red error alert, then exit application -//////////////////////////////////////// -static void RedFatalAlert (Str255 errorString, Str255 expStr) -{ - StandardAlert(kAlertStopAlert, errorString, expStr, NULL, NULL); - ExitToShell(); -} - -/////////////////////////////////////// -// Determines whether file exists at path or not -/////////////////////////////////////// -static short DoesFileExist (unsigned char *path) -{ - if (access((char *)path, F_OK) == -1) return false; - return true; -} - -#pragma mark - - -/////////////////////////////////////// -// Apple Event handler for Quit i.e. from -// the dock or Application menu item -/////////////////////////////////////// -static OSErr AppQuitAEHandler(const AppleEvent *theAppleEvent, - AppleEvent *reply, long refCon) -{ - #pragma unused (reply, refCon, theAppleEvent) - - while (numArgs > 0) free(fileArgs[numArgs--]); - - if (! taskDone && pid) { //kill the script process brutally - kill(pid, 9); - printf("Inkscape.app: PID %d killed brutally\n", pid); - } - - pthread_cancel(tid); - if (odtid) pthread_cancel(odtid); - - ExitToShell(); - - return noErr; -} - -///////////////////////////////////// -// Handler for docs dragged on app icon -///////////////////////////////////// -static OSErr AppOpenDocAEHandler(const AppleEvent *theAppleEvent, - AppleEvent *reply, long refCon) -{ - #pragma unused (reply, refCon) - - OSErr err = noErr; - AEDescList fileRefList; - AEKeyword keyword; - DescType type; - - short i; - long count, actualSize; - - FSRef fileRef; - unsigned char path[kMaxPathLength]; - - while (numArgs > 0) free(fileArgs[numArgs--]); - - //Read the AppleEvent - err = AEGetParamDesc(theAppleEvent, keyDirectObject, typeAEList, - &fileRefList); - - err = AECountItems(&fileRefList, &count); //Count number of files - - for (i = 1; i <= count; i++) { //iteratively process each file - //get fsref from apple event - if (! (err = AEGetNthPtr(&fileRefList, i, typeFSRef, &keyword, &type, - (Ptr)&fileRef, sizeof(FSRef), &actualSize))) - { - //get path from file ref - if ((err = FSMakePath(fileRef, (unsigned char *)&path, - kMaxPathLength))) return err; - - if (numArgs == kMaxArgumentsToScript) break; - - if (! (fileArgs[numArgs] = malloc(kMaxPathLength))) return true; - - strcpy(fileArgs[numArgs++], (char *)&path); - } - else return err; - } - - if (! taskDone) pthread_create(&odtid, NULL, OpenDoc, NULL); - else pthread_create(&tid, NULL, Execute, NULL); - - return err; -} - -/////////////////////////////// -// Handler for clicking on app icon -/////////////////////////////// -// if app is already open -static OSErr AppReopenAppAEHandler(const AppleEvent *theAppleEvent, - AppleEvent *reply, long refCon) -{ - return runScript(); -} - -// if app is being opened -static OSErr AppOpenAppAEHandler(const AppleEvent *theAppleEvent, - AppleEvent *reply, long refCon) -{ - #pragma unused (reply, refCon, theAppleEvent) - - // the app has been opened without any items dragged on to it - pthread_create(&tid, NULL, Execute, NULL); - - return noErr; -} - - -// Compile and run a small AppleScript. The code below does no cleanup and no proper error checks -// but since it's there until the app is shut down, and since we know the script is okay, -// there should not be any problems. -ComponentInstance theComponent; -AEDesc scriptTextDesc; -OSStatus err; -OSAID scriptID, resultID; - -static OSStatus CompileAppleScript(const void* text, long textLength, - AEDesc *resultData) { - - resultData = NULL; - /* set up locals to a known state */ - theComponent = NULL; - AECreateDesc(typeNull, NULL, 0, &scriptTextDesc); - scriptID = kOSANullScript; - resultID = kOSANullScript; - - /* open the scripting component */ - theComponent = OpenDefaultComponent(kOSAComponentType, - typeAppleScript); - if (theComponent == NULL) { err = paramErr; return err; } - - /* put the script text into an aedesc */ - err = AECreateDesc(typeChar, text, textLength, &scriptTextDesc); - if (err != noErr) return err; - - /* compile the script */ - err = OSACompile(theComponent, &scriptTextDesc, - kOSAModeNull, &scriptID); - - return err; -} - -/* runs the compiled applescript */ -static OSErr runScript() -{ - /* run the script */ - err = OSAExecute(theComponent, scriptID, kOSANullScript, - kOSAModeNull, &resultID); - return err; -} - - -/* Simple shortcut to the function that actually compiles the applescript. */ -static OSStatus SimpleCompileAppleScript(const char* theScript) { - return CompileAppleScript(theScript, strlen(theScript), NULL); -} diff --git a/packaging/macosx/ScriptExec/openDoc b/packaging/macosx/ScriptExec/openDoc deleted file mode 100755 index 2242173e7..000000000 --- a/packaging/macosx/ScriptExec/openDoc +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - - -echo $1;
\ No newline at end of file diff --git a/packaging/macosx/ScriptExec/script b/packaging/macosx/ScriptExec/script deleted file mode 100755 index 2242173e7..000000000 --- a/packaging/macosx/ScriptExec/script +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - - -echo $1;
\ No newline at end of file diff --git a/packaging/macosx/ScriptExec/version.plist b/packaging/macosx/ScriptExec/version.plist deleted file mode 100644 index a29320186..000000000 --- a/packaging/macosx/ScriptExec/version.plist +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>BuildVersion</key> - <string>17</string> - <key>CFBundleShortVersionString</key> - <string>0.1</string> - <key>CFBundleVersion</key> - <string>0.1</string> - <key>ProjectName</key> - <string>NibPBTemplates</string> - <key>SourceVersion</key> - <string>1150000</string> -</dict> -</plist> |
