diff options
| author | MenTaLguY <mental@rydia.net> | 2006-01-16 02:36:01 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-01-16 02:36:01 +0000 |
| commit | 179fa413b047bede6e32109e2ce82437c5fb8d34 (patch) | |
| tree | a5a6ac2c1708bd02288fbd8edb2ff500ff2e0916 /packaging | |
| download | inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip | |
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'packaging')
43 files changed, 4593 insertions, 0 deletions
diff --git a/packaging/autopackage/.cvsignore b/packaging/autopackage/.cvsignore new file mode 100644 index 000000000..6cfc7e642 --- /dev/null +++ b/packaging/autopackage/.cvsignore @@ -0,0 +1 @@ +default.apspec diff --git a/packaging/autopackage/default.apspec.in b/packaging/autopackage/default.apspec.in new file mode 100644 index 000000000..398f330d3 --- /dev/null +++ b/packaging/autopackage/default.apspec.in @@ -0,0 +1,63 @@ +# autopackage specfile, (C) 2004 Mike Hearn <mike@navi.cx> + +[Meta] +RootName: @inkscape.org/inkscape:$SOFTWAREVERSION +ShortName: inkscape +DisplayName: Inkscape Vector Graphics Editor +Summary: Inkscape is an open source SVG editor with capabilities similar to Illustrator, CorelDraw and Visio +SoftwareVersion: @VERSION@ +Maintainer: The Inkscape team <inkscape-devel@lists.sourceforge.net> +Packager: Aaron Spike <aaron@ekips.org> +AutopackageTarget: 1.0 + +[Description] +Inkscape is an open source SVG editor with capabilities +similar to Illustrator, CorelDraw, Visio, etc. Supported SVG features +include basic shapes, paths, text, alpha blending, transforms, +gradients, node editing, svg-to-png export, grouping, and more. + +[BuildPrepare] +if [ ! -x configure ]; then + ./autogen.sh +fi +export APBUILD_STATIC="popt gc gccpp gtkmm-2.4 gdkmm-2.4 atkmm-1.6 pangomm-1.4 glibmm-2.4 sigc-2.0 loudmouth-1 Xrender" +PATH=/usr/local/src/inkscape/extra/static/bin:$PATH +PKG_CONFIG_PATH=/usr/local/src/inkscape/extra/static/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig +CPPFLAGS="-I/usr/local/src/inkscape/extra/static/include" +LDFLAGS="-L/usr/local/src/inkscape/extra/static/lib" +export PATH PKG_CONFIG_PATH CPPFLAGS LDFLAGS +prepareBuild --enable-binreloc --with-gnome-vfs=no --enable-inkboard + +[BuildUnprepare] +unprepareBuild + +[Imports] +echo '*' | import # import everything + +[Prepare] +require @gnu.org/libstdc++ 3 +require @xmlsoft.org/libxml2 2.6 +require @xmlsoft.org/libxslt 1.0 +require @gtk.org/gtk 2.4 +# statically linked for now: require @rpm.org/popt 0.0 +# statically linked: require @libsigc.sourceforge.net/libsigc 3 +require @libpng.org/libpng 3 +# statically linked: require @gtkmm.org/gtkmm2 3 +require @zlib.org/zlib 1 +# require @xfree86.org/xft 2 +# require @freetype.org/freetype 6 +# require @freedesktop.org/fontconfig 1 + +[Install] +installExe bin/inkscape bin/inkview +installMan 1 man/man1/* +installIcon share/pixmaps/inkscape.png +installDesktop "Graphics" share/applications/inkscape.desktop + +copyFiles --nobackup share/locale $PREFIX/share +copyFiles share/inkscape $PREFIX/share +# copyFiles lib/inkscape $PREFIX/lib + +[Uninstall] +uninstallFromLog + diff --git a/packaging/inkscape.16.png.bz2 b/packaging/inkscape.16.png.bz2 Binary files differnew file mode 100644 index 000000000..74983b3ac --- /dev/null +++ b/packaging/inkscape.16.png.bz2 diff --git a/packaging/inkscape.32.png.bz2 b/packaging/inkscape.32.png.bz2 Binary files differnew file mode 100644 index 000000000..cf74d3747 --- /dev/null +++ b/packaging/inkscape.32.png.bz2 diff --git a/packaging/inkscape.48.png.bz2 b/packaging/inkscape.48.png.bz2 Binary files differnew file mode 100644 index 000000000..1017cab1d --- /dev/null +++ b/packaging/inkscape.48.png.bz2 diff --git a/packaging/macosx/Resources/EPS.icns b/packaging/macosx/Resources/EPS.icns Binary files differnew file mode 100644 index 000000000..153a21ec9 --- /dev/null +++ b/packaging/macosx/Resources/EPS.icns diff --git a/packaging/macosx/Resources/EPSI.icns b/packaging/macosx/Resources/EPSI.icns Binary files differnew file mode 100644 index 000000000..4b9a1893f --- /dev/null +++ b/packaging/macosx/Resources/EPSI.icns diff --git a/packaging/macosx/Resources/Inkscape.icns b/packaging/macosx/Resources/Inkscape.icns Binary files differnew file mode 100644 index 000000000..f177047c0 --- /dev/null +++ b/packaging/macosx/Resources/Inkscape.icns diff --git a/packaging/macosx/Resources/MenuBar.nib/classes.nib b/packaging/macosx/Resources/MenuBar.nib/classes.nib new file mode 100644 index 000000000..ea58db118 --- /dev/null +++ b/packaging/macosx/Resources/MenuBar.nib/classes.nib @@ -0,0 +1,4 @@ +{ +IBClasses = (); +IBVersion = 1; +} diff --git a/packaging/macosx/Resources/MenuBar.nib/info.nib b/packaging/macosx/Resources/MenuBar.nib/info.nib new file mode 100644 index 000000000..c0f4643ef --- /dev/null +++ b/packaging/macosx/Resources/MenuBar.nib/info.nib @@ -0,0 +1,23 @@ +<?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/Resources/MenuBar.nib/objects.xib b/packaging/macosx/Resources/MenuBar.nib/objects.xib new file mode 100644 index 000000000..78f0a0a01 --- /dev/null +++ b/packaging/macosx/Resources/MenuBar.nib/objects.xib @@ -0,0 +1,73 @@ +<?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/Resources/ProgressWindow.nib/classes.nib b/packaging/macosx/Resources/ProgressWindow.nib/classes.nib new file mode 100644 index 000000000..ea58db118 --- /dev/null +++ b/packaging/macosx/Resources/ProgressWindow.nib/classes.nib @@ -0,0 +1,4 @@ +{ +IBClasses = (); +IBVersion = 1; +} diff --git a/packaging/macosx/Resources/ProgressWindow.nib/info.nib b/packaging/macosx/Resources/ProgressWindow.nib/info.nib new file mode 100644 index 000000000..4e5156002 --- /dev/null +++ b/packaging/macosx/Resources/ProgressWindow.nib/info.nib @@ -0,0 +1,18 @@ +<?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>124 298 356 240 0 0 1280 832 </string> + <key>IBFramework Version</key> + <string>349.0</string> + <key>IBOpenObjects</key> + <array> + <integer>180</integer> + </array> + <key>IBSystem Version</key> + <string>7F44</string> + <key>targetFramework</key> + <string>IBCarbonFramework</string> +</dict> +</plist> diff --git a/packaging/macosx/Resources/ProgressWindow.nib/objects.xib b/packaging/macosx/Resources/ProgressWindow.nib/objects.xib new file mode 100644 index 000000000..6eaacc43e --- /dev/null +++ b/packaging/macosx/Resources/ProgressWindow.nib/objects.xib @@ -0,0 +1,53 @@ +<?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="IBCarbonWindow" id="180"> + <string name="windowRect">404 523 457 899 </string> + <string name="title">Caching Fonts...</string> + <object name="rootControl" class="IBCarbonRootControl" id="183"> + <string name="bounds">0 0 53 376 </string> + <array count="2" name="subviews"> + <object class="IBCarbonProgressBar" id="181"> + <string name="bounds">19 17 32 270 </string> + <boolean name="small">TRUE</boolean> + <int name="controlSize">1</int> + <int name="initialValue">50</int> + </object> + <object class="IBCarbonButton" id="185"> + <string name="bounds">16 284 34 356 </string> + <boolean name="small">TRUE</boolean> + <int name="controlSize">1</int> + <string name="title">Cancel</string> + <ostype name="command">quit</ostype> + </object> + </array> + </object> + <boolean name="hasCloseBox">FALSE</boolean> + <boolean name="hasHorizontalZoom">FALSE</boolean> + <boolean name="isResizable">FALSE</boolean> + <boolean name="hasVerticalZoom">FALSE</boolean> + <int name="themeBrush">51</int> + <int name="windowPosition">1</int> + </object> + <reference idRef="181"/> + <reference idRef="183"/> + <reference idRef="185"/> + </array> + <array count="4" name="allParents"> + <reference idRef="1"/> + <reference idRef="183"/> + <reference idRef="180"/> + <reference idRef="183"/> + </array> + <dictionary count="2" name="nameTable"> + <string>File's Owner</string> + <reference idRef="1"/> + <string>Window</string> + <reference idRef="180"/> + </dictionary> + <unsigned_int name="nextObjectID">186</unsigned_int> +</object> diff --git a/packaging/macosx/Resources/SVG_plain.icns b/packaging/macosx/Resources/SVG_plain.icns Binary files differnew file mode 100644 index 000000000..a309b25b4 --- /dev/null +++ b/packaging/macosx/Resources/SVG_plain.icns diff --git a/packaging/macosx/Resources/bin/getdisplay.sh b/packaging/macosx/Resources/bin/getdisplay.sh new file mode 100755 index 000000000..f7f383348 --- /dev/null +++ b/packaging/macosx/Resources/bin/getdisplay.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# +# Author: Aaron Voisine <aaron@voisine.org> + +if [ "$DISPLAY"x == "x" ]; then + echo :0 > /tmp/display.$UID +else + echo $DISPLAY > /tmp/display.$UID +fi diff --git a/packaging/macosx/Resources/bin/inkscape b/packaging/macosx/Resources/bin/inkscape new file mode 100755 index 000000000..bcfa77662 --- /dev/null +++ b/packaging/macosx/Resources/bin/inkscape @@ -0,0 +1,40 @@ +#!/bin/sh +# +# Author: Aaron Voisine <aaron@voisine.org> +# Inkscape Modifications: Michael Wybrow <mjwybrow@users.sourceforge.net> + +CWD="`(cd \"\`dirname \\\"$0\\\"\`\"; echo $PWD)`" +TOP="`dirname \"$CWD\"`" + +export "DYLD_LIBRARY_PATH=$TOP/lib" +export "PATH=$CWD:$PATH" +export "PANGO_RC_FILE=$HOME/.inkscape-etc/pangorc" +export "FONTCONFIG_PATH=$TOP/etc/fonts" +export "GTK_IM_MODULE_FILE=$HOME/.inkscape-etc/gtk.immodules" +export "GDK_PIXBUF_MODULE_FILE=$HOME/.inkscape-etc/gdk-pixbuf.loaders" +export "GTK_DATA_PREFIX=$TOP" +export "GTK_EXE_PREFIX=$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 "INKSCAPE_SHAREDIR=$TOP" +export "INKSCAPE_PLUGINDIR=$TOP/lib/inkscape" +export "INKSCAPE_LOCALEDIR=$TOP/locale" + +# TODO: Have to add ".UTF-8" to the LANG since ommiting causes Inkscape +# to crash on startup in locale_from_utf8(). +export "LANG=`grep \"\`defaults read .GlobalPreferences AppleCollationOrder \ + 2>&1\`_\" /usr/share/locale/locale.alias | tail -n1 | sed 's/\./ /' | \ + awk '{print $2}'`.UTF-8" + +mkdir -p ~/.inkscape-etc +sed 's|${HOME}|'"$HOME|g" "$TOP/etc/pango/pangorc" > ~/.inkscape-etc/pangorc +sed 's|${CWD}|'"$TOP|g" "$TOP/etc/pango/pango.modules" \ + > ~/.inkscape-etc/pango.modules +cp -f "$TOP/etc/pango/pangox.aliases" ~/.inkscape-etc/ +sed 's|${CWD}|'"$TOP|g" "$TOP/etc/gtk-2.0/gtk.immodules" \ + > ~/.inkscape-etc/gtk.immodules +sed 's|${CWD}|'"$TOP|g" "$TOP/etc/gtk-2.0/gdk-pixbuf.loaders" \ + > ~/.inkscape-etc/gdk-pixbuf.loaders + +exec "$CWD/inkscape-bin" "$@" diff --git a/packaging/macosx/Resources/inkscape_svg.icns b/packaging/macosx/Resources/inkscape_svg.icns Binary files differnew file mode 100644 index 000000000..007bf52cb --- /dev/null +++ b/packaging/macosx/Resources/inkscape_svg.icns diff --git a/packaging/macosx/Resources/openDoc b/packaging/macosx/Resources/openDoc new file mode 100755 index 000000000..8e6ac0399 --- /dev/null +++ b/packaging/macosx/Resources/openDoc @@ -0,0 +1,8 @@ +#!/bin/sh +# +# Author: Aaron Voisine <aaron@voisine.org> + +export "DISPLAY=`cat /tmp/display.$UID`" +BASE="`echo "$0" | sed -e 's/\/[A-Za-z]*.app\/Contents\/Resources\/script/\//'`" +cd "$BASE" +exec "$CWD/bin/inkscape" "$@" diff --git a/packaging/macosx/Resources/postscript.icns b/packaging/macosx/Resources/postscript.icns Binary files differnew file mode 100644 index 000000000..1f12741da --- /dev/null +++ b/packaging/macosx/Resources/postscript.icns diff --git a/packaging/macosx/Resources/script b/packaging/macosx/Resources/script new file mode 100755 index 000000000..fb67e950c --- /dev/null +++ b/packaging/macosx/Resources/script @@ -0,0 +1,35 @@ +#!/bin/sh +# +# Author: Aaron Voisine <aaron@voisine.org> +# Inkscape Modifications: Michael Wybrow <mjwybrow@users.sourceforge.net> + +CWD="`dirname \"$0\"`" + +ps -wx -ocommand | grep -e '[X]11' > /dev/null +if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then + echo "rm -f ~/.xinitrc" > ~/.xinitrc + sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc +fi + +cp -f "$CWD/bin/getdisplay.sh" /tmp/ +rm -f /tmp/display.$UID +open-x11 /tmp/getdisplay.sh || \ +open -a XDarwin /tmp/getdisplay.sh || \ +echo ":0" > /tmp/display.$UID + +while [ "$?" == "0" -a ! -f /tmp/display.$UID ]; do + sleep 1 +done +export "DISPLAY=`cat /tmp/display.$UID`" + +ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11 + +VERSION=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 -d'.'` +if [ "$VERSION" -eq "4" ]; then + # We're on tiger. So need to update fc-cache if it hasn't been done + test -f ~/.inkscape/.fccache || exit 12 +fi + +BASE="`echo "$0" | sed -e 's/\/Contents\/Resources\/script/\//'`" +cd "$BASE" +exec "$CWD/bin/inkscape" "$@" diff --git a/packaging/macosx/ScriptExec/English.lproj/InfoPlist.strings b/packaging/macosx/ScriptExec/English.lproj/InfoPlist.strings Binary files differnew file mode 100644 index 000000000..0bb6ef503 --- /dev/null +++ b/packaging/macosx/ScriptExec/English.lproj/InfoPlist.strings diff --git a/packaging/macosx/ScriptExec/English.lproj/main.nib/classes.nib b/packaging/macosx/ScriptExec/English.lproj/main.nib/classes.nib new file mode 100644 index 000000000..ea58db118 --- /dev/null +++ b/packaging/macosx/ScriptExec/English.lproj/main.nib/classes.nib @@ -0,0 +1,4 @@ +{ +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 new file mode 100644 index 000000000..da8455c15 --- /dev/null +++ b/packaging/macosx/ScriptExec/English.lproj/main.nib/info.nib @@ -0,0 +1,19 @@ +<?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 new file mode 100644 index 000000000..92ff05616 --- /dev/null +++ b/packaging/macosx/ScriptExec/English.lproj/main.nib/objects.xib @@ -0,0 +1,271 @@ +<?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 new file mode 100644 index 000000000..9cac37f85 --- /dev/null +++ b/packaging/macosx/ScriptExec/Info.plist @@ -0,0 +1,39 @@ +<?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 new file mode 100644 index 000000000..ea58db118 --- /dev/null +++ b/packaging/macosx/ScriptExec/MenuBar.nib/classes.nib @@ -0,0 +1,4 @@ +{ +IBClasses = (); +IBVersion = 1; +} diff --git a/packaging/macosx/ScriptExec/MenuBar.nib/info.nib b/packaging/macosx/ScriptExec/MenuBar.nib/info.nib new file mode 100644 index 000000000..c0f4643ef --- /dev/null +++ b/packaging/macosx/ScriptExec/MenuBar.nib/info.nib @@ -0,0 +1,23 @@ +<?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 new file mode 100644 index 000000000..78f0a0a01 --- /dev/null +++ b/packaging/macosx/ScriptExec/MenuBar.nib/objects.xib @@ -0,0 +1,73 @@ +<?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.xcode/project.pbxproj b/packaging/macosx/ScriptExec/ScriptExec.xcode/project.pbxproj new file mode 100644 index 000000000..bc081d5ef --- /dev/null +++ b/packaging/macosx/ScriptExec/ScriptExec.xcode/project.pbxproj @@ -0,0 +1,451 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 39; + objects = { + 0249A66BFF388E3F11CA2CEA = { + isa = PBXFileReference; + lastKnownFileType = archive.ar; + name = "libstdc++.a"; + path = "/usr/lib/libstdc++.a"; + refType = 0; + sourceTree = "<absolute>"; + }; +//020 +//021 +//022 +//023 +//024 +//080 +//081 +//082 +//083 +//084 + 0867D6AAFE840B52C02AAC07 = { + children = ( + 0867D6ABFE840B52C02AAC07, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings; + refType = 4; + sourceTree = "<group>"; + }; + 0867D6ABFE840B52C02AAC07 = { + fileEncoding = 10; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = English; + path = English.lproj/InfoPlist.strings; + refType = 4; + sourceTree = "<group>"; + }; +//080 +//081 +//082 +//083 +//084 +//190 +//191 +//192 +//193 +//194 + 195DF8CFFE9D517E11CA2CBB = { + children = ( + 8D0C4E970486CD37000505A6, + ); + isa = PBXGroup; + name = Products; + refType = 4; + sourceTree = "<group>"; + }; +//190 +//191 +//192 +//193 +//194 +//200 +//201 +//202 +//203 +//204 + 20286C28FDCF999611CA2CEA = { + buildSettings = { + }; + buildStyles = ( + 4A9504C5FFE6A39111CA0CBA, + 4A9504C6FFE6A39111CA0CBA, + ); + hasScannedForEncodings = 1; + isa = PBXProject; + mainGroup = 20286C29FDCF999611CA2CEA; + projectDirPath = ""; + targets = ( + 8D0C4E890486CD37000505A6, + ); + }; + 20286C29FDCF999611CA2CEA = { + children = ( + 20286C2AFDCF999611CA2CEA, + 20286C2CFDCF999611CA2CEA, + 20286C32FDCF999611CA2CEA, + 195DF8CFFE9D517E11CA2CBB, + ); + isa = PBXGroup; + name = ScriptExec; + path = ""; + refType = 4; + sourceTree = "<group>"; + }; + 20286C2AFDCF999611CA2CEA = { + children = ( + 32DBCF6D0370B57F00C91783, + 20286C2BFDCF999611CA2CEA, + ); + isa = PBXGroup; + name = Sources; + path = ""; + refType = 4; + sourceTree = "<group>"; + }; + 20286C2BFDCF999611CA2CEA = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = main.c; + refType = 4; + sourceTree = "<group>"; + }; + 20286C2CFDCF999611CA2CEA = { + children = ( + 664C29F0060ECDC4006EC560, + B8DCE042056DAC3500C390B0, + 8D0C4E960486CD37000505A6, + B8DCE048056DAC5000C390B0, + 0867D6AAFE840B52C02AAC07, + ); + isa = PBXGroup; + name = Resources; + path = ""; + refType = 4; + sourceTree = "<group>"; + }; + 20286C32FDCF999611CA2CEA = { + children = ( + 20286C33FDCF999611CA2CEA, + 4A9504CAFFE6A41611CA0CBA, + 4A9504C8FFE6A3BC11CA0CBA, + 0249A66BFF388E3F11CA2CEA, + B8DCE04E056DACAE00C390B0, + ); + isa = PBXGroup; + name = "External Frameworks and Libraries"; + path = ""; + refType = 4; + sourceTree = "<group>"; + }; + 20286C33FDCF999611CA2CEA = { + fallbackIsa = PBXFileReference; + isa = PBXFrameworkReference; + lastKnownFileType = wrapper.framework; + name = Carbon.framework; + path = /System/Library/Frameworks/Carbon.framework; + refType = 0; + sourceTree = "<absolute>"; + }; +//200 +//201 +//202 +//203 +//204 +//320 +//321 +//322 +//323 +//324 + 32DBCF6D0370B57F00C91783 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = ScriptExec_Prefix.pch; + refType = 4; + sourceTree = "<group>"; + }; +//320 +//321 +//322 +//323 +//324 +//4A0 +//4A1 +//4A2 +//4A3 +//4A4 + 4A9504C5FFE6A39111CA0CBA = { + buildRules = ( + ); + buildSettings = { + COPY_PHASE_STRIP = NO; + DEBUGGING_SYMBOLS = YES; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + OPTIMIZATION_CFLAGS = "-O0"; + ZERO_LINK = YES; + }; + isa = PBXBuildStyle; + name = Development; + }; + 4A9504C6FFE6A39111CA0CBA = { + buildRules = ( + ); + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_OPTIMIZATION_LEVEL = s; + ZERO_LINK = NO; + }; + isa = PBXBuildStyle; + name = Deployment; + }; + 4A9504C8FFE6A3BC11CA0CBA = { + fallbackIsa = PBXFileReference; + isa = PBXFrameworkReference; + lastKnownFileType = wrapper.framework; + name = ApplicationServices.framework; + path = /System/Library/Frameworks/ApplicationServices.framework; + refType = 0; + sourceTree = "<absolute>"; + }; + 4A9504CAFFE6A41611CA0CBA = { + fallbackIsa = PBXFileReference; + isa = PBXFrameworkReference; + lastKnownFileType = wrapper.framework; + name = CoreServices.framework; + path = /System/Library/Frameworks/CoreServices.framework; + refType = 0; + sourceTree = "<absolute>"; + }; +//4A0 +//4A1 +//4A2 +//4A3 +//4A4 +//660 +//661 +//662 +//663 +//664 + 664C29F0060ECDC4006EC560 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.script.sh; + path = openDoc; + refType = 4; + sourceTree = "<group>"; + }; + 664C29F1060ECDC4006EC560 = { + fileRef = 664C29F0060ECDC4006EC560; + isa = PBXBuildFile; + settings = { + }; + }; +//660 +//661 +//662 +//663 +//664 +//8D0 +//8D1 +//8D2 +//8D3 +//8D4 + 8D0C4E890486CD37000505A6 = { + buildPhases = ( + 8D0C4E8A0486CD37000505A6, + 8D0C4E8C0486CD37000505A6, + 8D0C4E8F0486CD37000505A6, + 8D0C4E910486CD37000505A6, + 8D0C4E940486CD37000505A6, + ); + buildRules = ( + ); + buildSettings = { + 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; + }; + dependencies = ( + ); + isa = PBXNativeTarget; + name = ScriptExec; + productInstallPath = "$(HOME)/Applications"; + productName = ScriptExec; + productReference = 8D0C4E970486CD37000505A6; + productType = "com.apple.product-type.application"; + }; + 8D0C4E8A0486CD37000505A6 = { + buildActionMask = 2147483647; + files = ( + 8D0C4E8B0486CD37000505A6, + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 8D0C4E8B0486CD37000505A6 = { + fileRef = 32DBCF6D0370B57F00C91783; + isa = PBXBuildFile; + settings = { + }; + }; + 8D0C4E8C0486CD37000505A6 = { + buildActionMask = 2147483647; + files = ( + 8D0C4E8D0486CD37000505A6, + B8DCE045056DAC3500C390B0, + B8DCE049056DAC5000C390B0, + 664C29F1060ECDC4006EC560, + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 8D0C4E8D0486CD37000505A6 = { + fileRef = 0867D6AAFE840B52C02AAC07; + isa = PBXBuildFile; + settings = { + }; + }; + 8D0C4E8F0486CD37000505A6 = { + buildActionMask = 2147483647; + files = ( + 8D0C4E900486CD37000505A6, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 8D0C4E900486CD37000505A6 = { + fileRef = 20286C2BFDCF999611CA2CEA; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + ); + }; + }; + 8D0C4E910486CD37000505A6 = { + buildActionMask = 2147483647; + files = ( + 8D0C4E920486CD37000505A6, + 8D0C4E930486CD37000505A6, + B8DCE04F056DACAE00C390B0, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 8D0C4E920486CD37000505A6 = { + fileRef = 20286C33FDCF999611CA2CEA; + isa = PBXBuildFile; + settings = { + }; + }; + 8D0C4E930486CD37000505A6 = { + fileRef = 0249A66BFF388E3F11CA2CEA; + isa = PBXBuildFile; + settings = { + }; + }; + 8D0C4E940486CD37000505A6 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 8D0C4E960486CD37000505A6 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = text.plist; + path = Info.plist; + refType = 4; + sourceTree = "<group>"; + }; + 8D0C4E970486CD37000505A6 = { + explicitFileType = wrapper.application; + includeInIndex = 0; + isa = PBXFileReference; + path = ScriptExec.app; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; +//8D0 +//8D1 +//8D2 +//8D3 +//8D4 +//B80 +//B81 +//B82 +//B83 +//B84 + B8DCE042056DAC3500C390B0 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.nib; + path = MenuBar.nib; + refType = 4; + sourceTree = "<group>"; + }; + B8DCE045056DAC3500C390B0 = { + fileRef = B8DCE042056DAC3500C390B0; + isa = PBXBuildFile; + settings = { + }; + }; + B8DCE048056DAC5000C390B0 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.script.sh; + path = script; + refType = 4; + sourceTree = "<group>"; + }; + B8DCE049056DAC5000C390B0 = { + fileRef = B8DCE048056DAC5000C390B0; + isa = PBXBuildFile; + settings = { + }; + }; + B8DCE04E056DACAE00C390B0 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = Security.framework; + path = /System/Library/Frameworks/Security.framework; + refType = 0; + sourceTree = "<absolute>"; + }; + B8DCE04F056DACAE00C390B0 = { + fileRef = B8DCE04E056DACAE00C390B0; + isa = PBXBuildFile; + settings = { + }; + }; + }; + rootObject = 20286C28FDCF999611CA2CEA; +} diff --git a/packaging/macosx/ScriptExec/ScriptExec.xcode/sveinbjornt.pbxuser b/packaging/macosx/ScriptExec/ScriptExec.xcode/sveinbjornt.pbxuser new file mode 100644 index 000000000..96c879ab2 --- /dev/null +++ b/packaging/macosx/ScriptExec/ScriptExec.xcode/sveinbjornt.pbxuser @@ -0,0 +1,378 @@ +// !$*UTF8*$! +{ + 20286C28FDCF999611CA2CEA = { + activeBuildStyle = 4A9504C6FFE6A39111CA0CBA; + activeExecutable = B8DCE00B056DABA400C390B0; + activeTarget = 8D0C4E890486CD37000505A6; + addToTargets = ( + 8D0C4E890486CD37000505A6, + ); + breakpoints = ( + ); + codeSenseManager = B8DCE01A056DABA800C390B0; + executables = ( + B8DCE00B056DABA400C390B0, + ); + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 480.8799, + 262.2085, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXErrorsWarningsDataSource_TypeID, + PBXErrorsWarningsDataSource_MessageID, + PBXErrorsWarningsDataSource_LocationID, + ); + }; + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = 1; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 508, + 20, + 93, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 91075958; + PBXWorkspaceContents = ( + { + PBXProjectWorkspaceModule_StateKey_Rev36 = { + PBXProjectWorkspaceModule_EditorOpen = true; + PBXProjectWorkspaceModule_EmbeddedNavigatorGroup = { + Split0 = { + bookmark = B84D5462056DB5C5005CEF4C; + history = ( + B8DCE149056DAE0000C390B0, + B84D545F056DB5C5005CEF4C, + B84D5460056DB5C5005CEF4C, + ); + prevStack = ( + B8DCE14B056DAE0000C390B0, + B8DCE14C056DAE0000C390B0, + B84D5461056DB5C5005CEF4C, + ); + }; + SplitCount = 1; + }; + PBXProjectWorkspaceModule_OldDetailFrame = "{{0, 0}, {790, 196}}"; + PBXProjectWorkspaceModule_OldEditorFrame = "{{0, 196}, {790, 741}}"; + PBXProjectWorkspaceModule_OldSuperviewFrame = "{{208, 0}, {790, 937}}"; + PBXProjectWorkspaceModule_SGTM = { + PBXBottomSmartGroupGIDs = ( + 1C37FBAC04509CD000000102, + 1C37FAAC04509CD000000102, + 1C08E77C0454961000C914BD, + 1CC0EA4004350EF90044410B, + 1CC0EA4004350EF90041110B, + 1C37FABC05509CD000000102, + 1C37FABC05539CD112110102, + 1C37FABC04509CD000100104, + ); + PBXTopSmartGroupGIDs = ( + ); + }; + }; + }, + ); + "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXBuildResultsModule" = { + }; + "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugBreakpointsModule" = { + }; + "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugCLIModule" = { + }; + "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugSessionModule" = { + }; + "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXNavigatorGroup" = { + Split0 = { + bookmark = B8DCE15E056DB05A00C390B0; + history = ( + B8DCE15D056DB05A00C390B0, + ); + }; + SplitCount = 1; + }; + "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule" = { + PBXProjectWorkspaceModule_StateKey_Rev36 = { + PBXProjectWorkspaceModule_EditorOpen = true; + PBXProjectWorkspaceModule_EmbeddedNavigatorGroup = { + Split0 = { + bookmark = B8DCE154056DAE0200C390B0; + history = ( + B8DCE149056DAE0000C390B0, + B8DCE14A056DAE0000C390B0, + ); + prevStack = ( + B8DCE14B056DAE0000C390B0, + B8DCE14C056DAE0000C390B0, + ); + }; + SplitCount = 1; + }; + PBXProjectWorkspaceModule_OldDetailFrame = "{{0, 0}, {790, 196}}"; + PBXProjectWorkspaceModule_OldEditorFrame = "{{0, 196}, {790, 741}}"; + PBXProjectWorkspaceModule_OldSuperviewFrame = "{{208, 0}, {790, 937}}"; + PBXProjectWorkspaceModule_SGTM = { + PBXBottomSmartGroupGIDs = ( + 1C37FBAC04509CD000000102, + 1C37FAAC04509CD000000102, + 1C08E77C0454961000C914BD, + 1CC0EA4004350EF90044410B, + 1CC0EA4004350EF90041110B, + 1C37FABC05509CD000000102, + 1C37FABC05539CD112110102, + 1C37FABC04509CD000100104, + ); + PBXTopSmartGroupGIDs = ( + ); + }; + }; + }; + "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXRunSessionModule" = { + }; + PBXWorkspaceGeometries = ( + { + Frame = "{{0, 0}, {998, 957}}"; + PBXProjectWorkspaceModule_GeometryKey_Rev11 = { + PBXProjectWorkspaceModule_SGTM_Geometry = { + _collapsingFrameDimension = 0; + _indexOfCollapsedView = 0; + _percentageOfCollapsedView = 0; + sizes = ( + "{{0, 0}, {208, 937}}", + "{{208, 0}, {790, 937}}", + ); + }; + }; + WindowFrame = "{{222, 112}, {998, 1019}}"; + }, + ); + "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXBuildResultsModule" = { + Frame = "{{0, 0}, {480, 216}}"; + WindowFrame = "{{591, 638}, {480, 294}}"; + }; + "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugBreakpointsModule" = { + BreakpointsTreeTableConfiguration = ( + enabledColumn, + 16, + breakpointColumn, + 282.583, + ); + Frame = "{{0, 0}, {208, 494}}"; + WindowFrame = "{{581, 524}, {208, 516}}"; + }; + "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugCLIModule" = { + Frame = "{{0, 0}, {400, 200}}"; + WindowFrame = "{{114, 1150}, {400, 222}}"; + }; + "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugSessionModule" = { + DebugConsoleDrawerSize = "{100, 120}"; + DebugConsoleVisible = None; + DebugConsoleWindowFrame = "{{200, 200}, {500, 300}}"; + DebugSTDIOWindowFrame = "{{200, 200}, {500, 300}}"; + Frame = "{{0, 0}, {745, 442}}"; + WindowFrame = "{{459, 525}, {745, 520}}"; + }; + "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXNavigatorGroup" = { + Frame = "{{0, 0}, {978, 830}}"; + WindowFrame = "{{544, 160}, {978, 908}}"; + }; + "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule" = { + Frame = "{{0, 0}, {998, 957}}"; + PBXProjectWorkspaceModule_GeometryKey_Rev11 = { + PBXProjectWorkspaceModule_SGTM_Geometry = { + _collapsingFrameDimension = 0; + _indexOfCollapsedView = 0; + _percentageOfCollapsedView = 0; + sizes = ( + "{{0, 0}, {208, 937}}", + "{{208, 0}, {790, 937}}", + ); + }; + }; + WindowFrame = "{{222, 112}, {998, 1019}}"; + }; + "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXRunSessionModule" = { + Frame = "{{0, 0}, {745, 442}}"; + WindowFrame = "{{518, 40}, {745, 464}}"; + }; + PBXWorkspaceStateSaveDate = 91075958; + }; + perUserProjectItems = { + B84D545F056DB5C5005CEF4C = B84D545F056DB5C5005CEF4C; + B84D5460056DB5C5005CEF4C = B84D5460056DB5C5005CEF4C; + B84D5461056DB5C5005CEF4C = B84D5461056DB5C5005CEF4C; + B84D5462056DB5C5005CEF4C = B84D5462056DB5C5005CEF4C; + B8DCE149056DAE0000C390B0 = B8DCE149056DAE0000C390B0; + B8DCE14B056DAE0000C390B0 = B8DCE14B056DAE0000C390B0; + B8DCE14C056DAE0000C390B0 = B8DCE14C056DAE0000C390B0; + }; + sourceControlManager = B8DCE019056DABA800C390B0; + userBuildSettings = { + }; + }; + 20286C2BFDCF999611CA2CEA = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {908, 15665}}"; + sepNavSelRange = "{25288, 0}"; + sepNavVisRect = "{{0, 12586}, {751, 709}}"; + sepNavWindowFrame = "{{544, 160}, {978, 908}}"; + }; + }; + 32DBCF6D0370B57F00C91783 = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {623, 567}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRect = "{{0, 0}, {623, 567}}"; + }; + }; + 8D0C4E890486CD37000505A6 = { + activeExec = 0; + executables = ( + B8DCE00B056DABA400C390B0, + ); + }; + 8D0C4E960486CD37000505A6 = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {711, 428}}"; + sepNavSelRange = "{294, 0}"; + sepNavVisRect = "{{0, 0}, {711, 428}}"; + sepNavWindowFrame = "{{217, 489}, {750, 558}}"; + }; + }; + B84D545F056DB5C5005CEF4C = { + fRef = 20286C2BFDCF999611CA2CEA; + isa = PBXTextBookmark; + name = "main.c: 918"; + rLen = 0; + rLoc = 25288; + rType = 0; + vrLen = 1061; + vrLoc = 24915; + }; + B84D5460056DB5C5005CEF4C = { + fRef = B8DCE036056DABFF00C390B0; + isa = PBXBookmark; + }; + B84D5461056DB5C5005CEF4C = { + fRef = 20286C2BFDCF999611CA2CEA; + isa = PBXTextBookmark; + name = "main.c: 918"; + rLen = 0; + rLoc = 25288; + rType = 0; + vrLen = 1061; + vrLoc = 24915; + }; + B84D5462056DB5C5005CEF4C = { + fRef = B8DCE036056DABFF00C390B0; + isa = PBXTextBookmark; + name = "outputType: 1"; + rLen = 0; + rLoc = 11; + rType = 0; + vrLen = 11; + vrLoc = 0; + }; + B8DCE00B056DABA400C390B0 = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + }; + debuggerPlugin = GDBDebugging; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + name = ScriptExec; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; + B8DCE019056DABA800C390B0 = { + isa = PBXSourceControlManager; + scmConfiguration = { + }; + scmType = scm.cvs; + }; + B8DCE01A056DABA800C390B0 = { + indexTemplatePath = ""; + isa = PBXCodeSenseManager; + usesDefaults = 1; + wantsCodeCompletion = 0; + wantsCodeCompletionAutoPopup = 0; + wantsCodeCompletionAutoSuggestions = 0; + wantsCodeCompletionCaseSensitivity = 1; + wantsCodeCompletionOnlyMatchingItems = 1; + wantsCodeCompletionParametersIncluded = 1; + wantsCodeCompletionPlaceholdersInserted = 1; + wantsCodeCompletionTabCompletes = 1; + wantsIndex = 0; + }; + B8DCE034056DABFF00C390B0 = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {751, 215}}"; + sepNavSelRange = "{6, 0}"; + sepNavVisRect = "{{0, 0}, {751, 215}}"; + sepNavWindowFrame = "{{240, 468}, {750, 558}}"; + }; + }; + B8DCE036056DABFF00C390B0 = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {751, 709}}"; + sepNavSelRange = "{11, 0}"; + sepNavVisRect = "{{0, 0}, {751, 709}}"; + }; + }; + B8DCE149056DAE0000C390B0 = { + fRef = 32DBCF6D0370B57F00C91783; + isa = PBXTextBookmark; + name = "ScriptExec_Prefix.pch: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 128; + vrLoc = 0; + }; + B8DCE14B056DAE0000C390B0 = { + fRef = 20286C2BFDCF999611CA2CEA; + isa = PBXTextBookmark; + name = "main.c: 124"; + rLen = 0; + rLoc = 3733; + rType = 0; + vrLen = 1332; + vrLoc = 2912; + }; + B8DCE14C056DAE0000C390B0 = { + fRef = 32DBCF6D0370B57F00C91783; + isa = PBXTextBookmark; + name = "ScriptExec_Prefix.pch: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 128; + vrLoc = 0; + }; +} diff --git a/packaging/macosx/ScriptExec/ScriptExec.xcode/voisine.pbxuser b/packaging/macosx/ScriptExec/ScriptExec.xcode/voisine.pbxuser new file mode 100644 index 000000000..278eceb21 --- /dev/null +++ b/packaging/macosx/ScriptExec/ScriptExec.xcode/voisine.pbxuser @@ -0,0 +1,729 @@ +// !$*UTF8*$! +{ + 0867D6ABFE840B52C02AAC07 = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {608, 595}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRect = "{{0, 0}, {573, 595}}"; + }; + }; + 20286C28FDCF999611CA2CEA = { + activeBuildStyle = 4A9504C6FFE6A39111CA0CBA; + activeExecutable = 664C29D8060E765D006EC560; + activeTarget = 8D0C4E890486CD37000505A6; + addToTargets = ( + 8D0C4E890486CD37000505A6, + ); + codeSenseManager = 664C29E7060E7681006EC560; + executables = ( + 664C29D8060E765D006EC560, + ); + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 365.8799, + 205.2085, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXErrorsWarningsDataSource_TypeID, + PBXErrorsWarningsDataSource_MessageID, + PBXErrorsWarningsDataSource_LocationID, + ); + }; + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 361, + 20, + 68, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 102147745; + PBXPrepackagedSmartGroups_v2 = ( + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + activationKey = OldTargetSmartGroup; + clz = PBXTargetSmartGroup; + description = "Displays all targets of the project."; + globalID = 1C37FABC04509CD000000102; + name = Targets; + preferences = { + image = Targets; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXTargetSmartGroup2; + description = "Displays all targets of the project as well as nested build phases."; + globalID = 1C37FBAC04509CD000000102; + name = Targets; + preferences = { + image = Targets; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXExecutablesSmartGroup; + description = "Displays all executables of the project."; + globalID = 1C37FAAC04509CD000000102; + name = Executables; + preferences = { + image = Executable; + }; + }, + { + " PBXTransientLocationAtTop " = bottom; + absolutePathToBundle = ""; + clz = PBXErrorsWarningsSmartGroup; + description = "Displays files with errors or warnings."; + globalID = 1C08E77C0454961000C914BD; + name = "Errors and Warnings"; + preferences = { + fnmatch = ""; + image = WarningsErrors; + recursive = 1; + regex = ""; + root = "<PROJECT>"; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXFilenameSmartGroup; + description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; + globalID = 1CC0EA4004350EF90044410B; + name = "Implementation Files"; + preferences = { + canSave = 1; + fnmatch = ""; + image = SmartFolder; + isLeaf = 0; + recursive = 1; + regex = "?*\\.[mcMC]"; + root = "<PROJECT>"; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXFilenameSmartGroup; + description = "This group displays Interface Builder NIB Files."; + globalID = 1CC0EA4004350EF90041110B; + name = "NIB Files"; + preferences = { + canSave = 1; + fnmatch = "*.nib"; + image = SmartFolder; + isLeaf = 0; + recursive = 1; + regex = ""; + root = "<PROJECT>"; + }; + }, + { + PBXTransientLocationAtTop = no; + absolutePathToBundle = ""; + clz = PBXFindSmartGroup; + description = "Displays Find Results."; + globalID = 1C37FABC05509CD000000102; + name = "Find Results"; + preferences = { + image = spyglass; + }; + }, + { + PBXTransientLocationAtTop = no; + absolutePathToBundle = ""; + clz = PBXBookmarksSmartGroup; + description = "Displays Project Bookmarks."; + globalID = 1C37FABC05539CD112110102; + name = Bookmarks; + preferences = { + image = Bookmarks; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = XCSCMSmartGroup; + description = "Displays files with interesting SCM status."; + globalID = E2644B35053B69B200211256; + name = SCM; + preferences = { + image = PBXRepository; + isLeaf = 0; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXSymbolsSmartGroup; + description = "Displays all symbols for the project."; + globalID = 1C37FABC04509CD000100104; + name = "Project Symbols"; + preferences = { + image = ProjectSymbols; + isLeaf = 1; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXFilenameSmartGroup; + description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; + globalID = PBXTemplateMarker; + name = "Simple Filter SmartGroup"; + preferences = { + canSave = 1; + fnmatch = "*.nib"; + image = SmartFolder; + isLeaf = 0; + recursive = 1; + regex = ""; + root = "<PROJECT>"; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXFilenameSmartGroup; + description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; + globalID = PBXTemplateMarker; + name = "Simple Regular Expression SmartGroup"; + preferences = { + canSave = 1; + fnmatch = ""; + image = SmartFolder; + isLeaf = 0; + recursive = 1; + regex = "?*\\.[mcMC]"; + root = "<PROJECT>"; + }; + }, + ); + PBXWorkspaceContents = ( + { + PBXProjectWorkspaceModule_StateKey_Rev39 = { + PBXProjectWorkspaceModule_DEGV_Geometry = { + _collapsingFrameDimension = 0; + _indexOfCollapsedView = 0; + _percentageOfCollapsedView = 0; + isCollapsed = yes; + sizes = ( + "{{0, 0}, {618, 0}}", + "{{0, 0}, {618, 627}}", + ); + }; + PBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = { + BoundsStr = "{{0, 0}, {603, 195}}"; + Rows = ( + 0, + ); + VisibleRectStr = "{{0, 0}, {0, 0}}"; + }; + PBXProjectWorkspaceModule_EditorOpen = true; + PBXProjectWorkspaceModule_EmbeddedNavigatorGroup = { + PBXSplitModuleInNavigatorKey = { + Split0 = { + bookmark = 669900D70616A634004446AB; + history = ( + 66C09CE20612C8F000E767E6, + 66C09CE30612C8F000E767E6, + 66C09CE40612C8F000E767E6, + 669900D40616A634004446AB, + 669900D50616A634004446AB, + ); + prevStack = ( + 66C09CE60612C8F000E767E6, + 66C09CE70612C8F000E767E6, + 66C09CE80612C8F000E767E6, + 66C09CE90612C8F000E767E6, + 669900D60616A634004446AB, + ); + }; + SplitCount = 1; + }; + }; + PBXProjectWorkspaceModule_GeometryKey_Rev15 = { + PBXProjectWorkspaceModule_SGTM_Geometry = { + _collapsingFrameDimension = 0; + _indexOfCollapsedView = 0; + _percentageOfCollapsedView = 0; + sizes = ( + "{{0, 0}, {182, 627}}", + "{{182, 0}, {618, 627}}", + ); + }; + }; + PBXProjectWorkspaceModule_OldDetailFrame = "{{0, 0}, {618, 0}}"; + PBXProjectWorkspaceModule_OldEditorFrame = "{{0, 0}, {618, 627}}"; + PBXProjectWorkspaceModule_OldSuperviewFrame = "{{182, 0}, {618, 627}}"; + PBXProjectWorkspaceModule_SGTM = { + PBXBottomSmartGroupGIDs = ( + 1C37FBAC04509CD000000102, + 1C37FAAC04509CD000000102, + 1C08E77C0454961000C914BD, + 1CC0EA4004350EF90044410B, + 1CC0EA4004350EF90041110B, + 1C37FABC05509CD000000102, + 1C37FABC05539CD112110102, + E2644B35053B69B200211256, + 1C37FABC04509CD000100104, + ); + PBXSmartGroupTreeModuleColumnData = { + PBXSmartGroupTreeModuleColumnWidthsKey = ( + 165, + ); + PBXSmartGroupTreeModuleColumnsKey_v4 = ( + MainColumn, + ); + }; + PBXSmartGroupTreeModuleOutlineStateKey_v7 = { + PBXSmartGroupTreeModuleOutlineStateExpansionKey = ( + 20286C29FDCF999611CA2CEA, + 20286C2AFDCF999611CA2CEA, + 20286C2CFDCF999611CA2CEA, + 0867D6AAFE840B52C02AAC07, + ); + PBXSmartGroupTreeModuleOutlineStateSelectionKey = ( + ( + 0, + ), + ); + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey = "{{0, 0}, {165, 609}}"; + }; + PBXTopSmartGroupGIDs = ( + ); + }; + }; + }, + ); + "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXBuildResultsModule" = { + }; + "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugCLIModule" = { + }; + "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugSessionModule" = { + Debugger = { + HorizontalSplitView = { + _collapsingFrameDimension = 0; + _indexOfCollapsedView = 0; + _percentageOfCollapsedView = 0; + isCollapsed = yes; + sizes = ( + "{{0, 0}, {283, 209}}", + "{{283, 0}, {462, 209}}", + ); + }; + VerticalSplitView = { + _collapsingFrameDimension = 0; + _indexOfCollapsedView = 0; + _percentageOfCollapsedView = 0; + isCollapsed = yes; + sizes = ( + "{{0, 0}, {745, 209}}", + "{{0, 209}, {745, 213}}", + ); + }; + }; + LauncherConfigVersion = 8; + }; + "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXNavigatorGroup" = { + PBXSplitModuleInNavigatorKey = { + SplitCount = 1; + }; + }; + "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule" = { + PBXProjectWorkspaceModule_StateKey_Rev39 = { + PBXProjectWorkspaceModule_DEGV_Geometry = { + _collapsingFrameDimension = 0; + _indexOfCollapsedView = 0; + _percentageOfCollapsedView = 0; + isCollapsed = yes; + sizes = ( + "{{0, 0}, {618, 0}}", + "{{0, 0}, {618, 627}}", + ); + }; + PBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = { + BoundsStr = "{{0, 0}, {603, 15}}"; + Rows = ( + 0, + ); + VisibleRectStr = "{{0, 0}, {0, 0}}"; + }; + PBXProjectWorkspaceModule_EditorOpen = true; + PBXProjectWorkspaceModule_EmbeddedNavigatorGroup = { + PBXSplitModuleInNavigatorKey = { + Split0 = { + bookmark = 66C09CFB061365AB00E767E6; + history = ( + 66C09CE20612C8F000E767E6, + 66C09CE30612C8F000E767E6, + 66C09CE40612C8F000E767E6, + 66C09CFA061365AB00E767E6, + ); + prevStack = ( + 66C09CE60612C8F000E767E6, + 66C09CE70612C8F000E767E6, + 66C09CE80612C8F000E767E6, + 66C09CE90612C8F000E767E6, + 66C09CEA0612C8F000E767E6, + 66C09CEB0612C8F000E767E6, + ); + }; + SplitCount = 1; + }; + }; + PBXProjectWorkspaceModule_GeometryKey_Rev15 = { + PBXProjectWorkspaceModule_SGTM_Geometry = { + _collapsingFrameDimension = 0; + _indexOfCollapsedView = 0; + _percentageOfCollapsedView = 0; + sizes = ( + "{{0, 0}, {182, 627}}", + "{{182, 0}, {618, 627}}", + ); + }; + }; + PBXProjectWorkspaceModule_OldDetailFrame = "{{0, 0}, {618, 0}}"; + PBXProjectWorkspaceModule_OldEditorFrame = "{{0, 0}, {618, 627}}"; + PBXProjectWorkspaceModule_OldSuperviewFrame = "{{182, 0}, {618, 627}}"; + PBXProjectWorkspaceModule_SGTM = { + PBXBottomSmartGroupGIDs = ( + 1C37FBAC04509CD000000102, + 1C37FAAC04509CD000000102, + 1C08E77C0454961000C914BD, + 1CC0EA4004350EF90044410B, + 1CC0EA4004350EF90041110B, + 1C37FABC05509CD000000102, + 1C37FABC05539CD112110102, + E2644B35053B69B200211256, + 1C37FABC04509CD000100104, + ); + PBXSmartGroupTreeModuleColumnData = { + PBXSmartGroupTreeModuleColumnWidthsKey = ( + 165, + ); + PBXSmartGroupTreeModuleColumnsKey_v4 = ( + MainColumn, + ); + }; + PBXSmartGroupTreeModuleOutlineStateKey_v7 = { + PBXSmartGroupTreeModuleOutlineStateExpansionKey = ( + 20286C29FDCF999611CA2CEA, + 20286C2AFDCF999611CA2CEA, + 20286C2CFDCF999611CA2CEA, + 0867D6AAFE840B52C02AAC07, + 1C08E77C0454961000C914BD, + ); + PBXSmartGroupTreeModuleOutlineStateSelectionKey = ( + ( + 17, + ), + ); + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey = "{{0, 0}, {165, 609}}"; + }; + PBXTopSmartGroupGIDs = ( + ); + }; + }; + }; + "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXRunSessionModule" = { + LauncherConfigVersion = 3; + Runner = { + HorizontalSplitView = { + _collapsingFrameDimension = 0; + _indexOfCollapsedView = 0; + _percentageOfCollapsedView = 0; + isCollapsed = yes; + sizes = ( + "{{0, 0}, {491, 167}}", + "{{0, 176}, {491, 267}}", + ); + }; + VerticalSplitView = { + _collapsingFrameDimension = 0; + _indexOfCollapsedView = 0; + _percentageOfCollapsedView = 0; + isCollapsed = yes; + sizes = ( + "{{0, 0}, {405, 443}}", + "{{414, 0}, {514, 443}}", + ); + }; + }; + }; + PBXWorkspaceGeometries = ( + { + Frame = "{{0, 0}, {800, 627}}"; + PBXProjectWorkspaceModule_GeometryKey_Rev15 = { + }; + RubberWindowFrame = "54 124 800 669 0 0 1280 832 "; + }, + ); + "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXBuildResultsModule" = { + Frame = "{{0, 0}, {480, 217}}"; + PBXModuleWindowStatusBarHidden = YES; + RubberWindowFrame = "738 441 480 238 0 0 1280 832 "; + }; + "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugCLIModule" = { + Frame = "{{0, 0}, {400, 201}}"; + PBXModuleWindowStatusBarHidden = YES; + RubberWindowFrame = "50 804 400 222 0 0 1280 832 "; + }; + "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugSessionModule" = { + DebugConsoleDrawerSize = "{100, 120}"; + DebugConsoleVisible = None; + DebugConsoleWindowFrame = "{{200, 200}, {500, 300}}"; + DebugSTDIOWindowFrame = "{{200, 200}, {500, 300}}"; + Frame = "{{0, 0}, {745, 422}}"; + RubberWindowFrame = "267 358 745 464 0 0 1280 832 "; + }; + "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXNavigatorGroup" = { + Frame = "{{0, 0}, {750, 481}}"; + PBXModuleWindowStatusBarHidden = YES; + RubberWindowFrame = "15 325 750 502 0 0 1280 832 "; + }; + "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule" = { + Frame = "{{0, 0}, {800, 627}}"; + PBXProjectWorkspaceModule_GeometryKey_Rev15 = { + PBXProjectWorkspaceModule_RunWindowVisible = true; + }; + RubberWindowFrame = "54 124 800 669 0 0 1280 832 "; + }; + "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXRunSessionModule" = { + Frame = "{{0, 0}, {870, 445}}"; + PBXModuleWindowStatusBarHidden = YES; + RubberWindowFrame = "267 356 870 466 0 0 1280 832 "; + }; + PBXWorkspaceStateSaveDate = 102147745; + }; + perUserProjectItems = { + 669900D40616A634004446AB = 669900D40616A634004446AB; + 669900D50616A634004446AB = 669900D50616A634004446AB; + 669900D60616A634004446AB = 669900D60616A634004446AB; + 669900D70616A634004446AB = 669900D70616A634004446AB; + 66C09CE20612C8F000E767E6 = 66C09CE20612C8F000E767E6; + 66C09CE30612C8F000E767E6 = 66C09CE30612C8F000E767E6; + 66C09CE40612C8F000E767E6 = 66C09CE40612C8F000E767E6; + 66C09CE60612C8F000E767E6 = 66C09CE60612C8F000E767E6; + 66C09CE70612C8F000E767E6 = 66C09CE70612C8F000E767E6; + 66C09CE80612C8F000E767E6 = 66C09CE80612C8F000E767E6; + 66C09CE90612C8F000E767E6 = 66C09CE90612C8F000E767E6; + }; + sourceControlManager = 664C29E6060E7681006EC560; + userBuildSettings = { + }; + }; + 20286C2BFDCF999611CA2CEA = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {603, 6929}}"; + sepNavSelRange = "{6021, 0}"; + sepNavVisRect = "{{0, 2527}, {603, 595}}"; + sepNavWindowFrame = "{{15, 269}, {750, 558}}"; + }; + }; + 664C29D8060E765D006EC560 = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + }; + debuggerPlugin = GDBDebugging; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + name = ScriptExec; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; + 664C29E6060E7681006EC560 = { + isa = PBXSourceControlManager; + scmConfiguration = { + }; + scmType = scm.cvs; + }; + 664C29E7060E7681006EC560 = { + indexTemplatePath = ""; + isa = PBXCodeSenseManager; + usesDefaults = 1; + wantsCodeCompletion = 1; + wantsCodeCompletionAutoPopup = 0; + wantsCodeCompletionAutoSuggestions = 0; + wantsCodeCompletionCaseSensitivity = 1; + wantsCodeCompletionOnlyMatchingItems = 1; + wantsCodeCompletionParametersIncluded = 1; + wantsCodeCompletionPlaceholdersInserted = 1; + wantsCodeCompletionTabCompletes = 1; + wantsIndex = 1; + }; + 669900D40616A634004446AB = { + fRef = 20286C2BFDCF999611CA2CEA; + isa = PBXTextBookmark; + name = "main.c: 191"; + rLen = 0; + rLoc = 6021; + rType = 0; + vrLen = 1128; + vrLoc = 5389; + }; + 669900D50616A634004446AB = { + fRef = 669900D90616A634004446AB; + isa = PBXTextBookmark; + rLen = 0; + rLoc = 2147483647; + rType = 0; + }; + 669900D60616A634004446AB = { + fRef = 20286C2BFDCF999611CA2CEA; + isa = PBXTextBookmark; + name = "main.c: 191"; + rLen = 0; + rLoc = 6021; + rType = 0; + vrLen = 1128; + vrLoc = 5389; + }; + 669900D70616A634004446AB = { + fRef = 669900D80616A634004446AB; + isa = PBXTextBookmark; + name = "(null): 459"; + rLen = 0; + rLoc = 14343; + rType = 0; + vrLen = 1147; + vrLoc = 13217; + }; + 669900D80616A634004446AB = { + isa = PBXFileReference; + lastKnownFileType = file; + name = main.c; + path = /Users/voisine/Desktop/ScriptExec/main.c; + refType = 0; + sourceTree = "<absolute>"; + }; + 669900D90616A634004446AB = { + isa = PBXFileReference; + lastKnownFileType = file; + name = main.c; + path = /Users/voisine/Desktop/ScriptExec/main.c; + refType = 0; + sourceTree = "<absolute>"; + }; + 66C09CE20612C8F000E767E6 = { + fRef = 8D0C4E960486CD37000505A6; + isa = PBXTextBookmark; + name = "Info.plist: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 984; + vrLoc = 0; + }; + 66C09CE30612C8F000E767E6 = { + fRef = 0867D6ABFE840B52C02AAC07; + isa = PBXTextBookmark; + name = "English: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 259; + vrLoc = 0; + }; + 66C09CE40612C8F000E767E6 = { + fRef = B8DCE048056DAC5000C390B0; + isa = PBXTextBookmark; + name = "script: 31"; + rLen = 0; + rLoc = 20; + rType = 0; + vrLen = 20; + vrLoc = 0; + }; + 66C09CE60612C8F000E767E6 = { + fRef = 20286C2BFDCF999611CA2CEA; + isa = PBXTextBookmark; + name = "main.c: 163"; + rLen = 0; + rLoc = 5767; + rType = 0; + vrLen = 858; + vrLoc = 4669; + }; + 66C09CE70612C8F000E767E6 = { + fRef = 8D0C4E960486CD37000505A6; + isa = PBXTextBookmark; + name = "Info.plist: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 984; + vrLoc = 0; + }; + 66C09CE80612C8F000E767E6 = { + fRef = 0867D6ABFE840B52C02AAC07; + isa = PBXTextBookmark; + name = "English: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 259; + vrLoc = 0; + }; + 66C09CE90612C8F000E767E6 = { + fRef = B8DCE048056DAC5000C390B0; + isa = PBXTextBookmark; + name = "script: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 20; + vrLoc = 0; + }; + 8D0C4E890486CD37000505A6 = { + activeExec = 0; + executables = ( + 664C29D8060E765D006EC560, + ); + }; + 8D0C4E960486CD37000505A6 = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {573, 599}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRect = "{{0, 0}, {573, 595}}"; + }; + }; + B8DCE048056DAC5000C390B0 = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {573, 595}}"; + sepNavSelRange = "{797, 0}"; + sepNavVisRect = "{{0, 0}, {573, 595}}"; + }; + }; +} diff --git a/packaging/macosx/ScriptExec/ScriptExec_Prefix.pch b/packaging/macosx/ScriptExec/ScriptExec_Prefix.pch new file mode 100644 index 000000000..16d7ede3d --- /dev/null +++ b/packaging/macosx/ScriptExec/ScriptExec_Prefix.pch @@ -0,0 +1,5 @@ +// +// Prefix header for all source files of the 'ScriptExec' target in the 'ScriptExec' project. +// + +#include <Carbon/Carbon.h> diff --git a/packaging/macosx/ScriptExec/main.c b/packaging/macosx/ScriptExec/main.c new file mode 100644 index 000000000..89b07ddd0 --- /dev/null +++ b/packaging/macosx/ScriptExec/main.c @@ -0,0 +1,624 @@ +/* + 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> + + 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 + +*/ + +/////////////////////////////////////// +// Includes +/////////////////////////////////////// +#pragma mark Includes + +// Apple stuff +#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> + +/////////////////////////////////////// +// Definitions +/////////////////////////////////////// +#pragma mark Definitions + +// name length limits +#define kMaxPathLength 1024 + +// names of files bundled with app +#define kScriptFileName "script" +#define kOpenDocFileName "openDoc" + +// custom carbon events +#define kEventClassRedFatalAlert 911 +#define kEventKindX11Failed 911 +#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 char* GetScript(void); +static char* GetOpenDoc(void); + +OSErr LoadMenuBar(char *appName); + +static OSStatus FSMakePath(FSSpec file, char *path, long maxPathSize); +static void RedFatalAlert(Str255 errorString, Str255 expStr); +static short DoesFileExist(char *path); +static OSStatus FixFCCache(void); + +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 X11FailedHandler(EventHandlerCallRef theHandlerCall, + EventRef theEvent, void *userData); +static OSStatus FCCacheFailedHandler(EventHandlerCallRef theHandlerCall, + EventRef theEvent, void *userData); +/////////////////////////////////////// +// 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 X11events = { kEventClassRedFatalAlert, kEventKindX11Failed }; + 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 += InstallEventHandler(GetApplicationEventTarget(), + NewEventHandlerUPP(X11FailedHandler), 1, + &X11events, NULL, NULL); + 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 + + RunApplicationEventLoop(); //Run the event loop + return 0; +} + +#pragma mark - + + +////////////////////////////////// +// Handler for when X11 fails to start +////////////////////////////////// +static OSStatus FCCacheFailedHandler(EventHandlerCallRef theHandlerCall, + EventRef theEvent, void *userData) +{ + + pthread_join(tid, NULL); + if (odtid) pthread_join(odtid, NULL); + + SInt16 itemHit; + + AlertStdAlertParamRec params; + params.movable = true; + params.helpButton = false; + params.filterProc = NULL; + params.defaultText = "\pRun fc-cache"; + params.cancelText = "\pIgnore"; + params.otherText = NULL; + params.defaultButton = kAlertStdAlertOKButton; + params.cancelButton = kAlertStdAlertCancelButton; + params.position = kWindowDefaultPosition; + + StandardAlert(kAlertStopAlert, "\pFont caches may need to be updated", + "\pThere is a problem on OS X 10.4.x where X11 installation does not always generate the necessary fontconfig caches. This can be corrected by running /usr/X11R6/bin/fc-cache as root.\n\nThis may take some time. Please do not close Inkscape.", + ¶ms, &itemHit); + + if (itemHit == kAlertStdAlertOKButton) + { + OSStatus err = FixFCCache(); + + if (err == errAuthorizationSuccess) + { + params.defaultText = (void *) kAlertDefaultOKText; + params.cancelText = NULL; + + StandardAlert(kAlertNoteAlert, "\pFont caches have been updated", + "\pPlease re-run Inkscape.", ¶ms, &itemHit); + system("test -d $HOME/.inkscape || mkdir $HOME/.inkscape; touch $HOME/.inkscape/.fccache"); + } + } + else + { + params.defaultText = (void *) kAlertDefaultOKText; + params.cancelText = NULL; + + StandardAlert(kAlertNoteAlert, "\pFont caches have not been updated", + "\pThey can be updated manually by running the following:\n sudo /usr/X11R6/bin/fc-cache\nOnce you have dealt with this, please re-run Inkscape.", ¶ms, &itemHit); + system("test -d $HOME/.inkscape || mkdir $HOME/.inkscape; touch $HOME/.inkscape/.fccache"); + } + + ExitToShell(); + + return noErr; +} + + +///////////////////////////////////// +// Code to run fc-cache on first run +///////////////////////////////////// +static OSStatus FixFCCache (void) +{ + char* args[1]; + + // Run fc-cache + AuthorizationItem authItems[] = + { + { + kAuthorizationRightExecute, + 23, + "/usr/X11R6/bin/fc-cache", + 0 + } + }; + AuthorizationItemSet authItemSet = + { + 1, + authItems + }; + AuthorizationRef authRef = NULL; + OSStatus err = AuthorizationCreate (NULL, &authItemSet, + kAuthorizationFlagInteractionAllowed | kAuthorizationFlagExtendRights, &authRef); + + if (err == errAuthorizationSuccess) + { + //the arguments parameter to AuthorizationExecuteWithPrivileges is + //a NULL terminated array of C string pointers. + args[0]= NULL; + + AuthorizationExecuteWithPrivileges (authRef, "/usr/X11R6/bin/fc-cache", + kAuthorizationFlagDefaults, args, NULL); + } + AuthorizationFree(authRef, kAuthorizationFlagDestroyRights); + + return err; +} + +/////////////////////////////////// +// Execution thread starts here +/////////////////////////////////// +static void *Execute (void *arg) +{ + EventRef event; + + taskDone = false; + + OSErr err = ExecuteScript(scriptPath, &pid); + if (err == (OSErr)11) { + CreateEvent(NULL, kEventClassRedFatalAlert, kEventKindX11Failed, 0, + kEventAttributeNone, &event); + PostEventToQueue(GetMainEventQueue(), event, kEventPriorityStandard); + } + else if (err == (OSErr)12) { + CreateEvent(NULL, kEventClassRedFatalAlert, kEventKindFCCacheFailed, 0, + kEventAttributeNone, &event); + PostEventToQueue(GetMainEventQueue(), event, kEventPriorityStandard); + } + 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 char* GetScript (void) +{ + CFStringRef fileName; + CFBundleRef appBundle; + CFURLRef scriptFileURL; + FSRef fileRef; + FSSpec fileSpec; + 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); + + //convert FSRef to FSSpec + if (FSGetCatalogInfo(&fileRef, kFSCatInfoNone, NULL, NULL, &fileSpec, + NULL)) return NULL; + + //create path string + if (! (path = malloc(kMaxPathLength))) return NULL; + if (FSMakePath(fileSpec, path, kMaxPathLength)) return NULL; + if (! DoesFileExist(path)) return NULL; + + return path; +} + +/////////////////////////////////////// +// Gets the path to openDoc in Resources folder +/////////////////////////////////////// +static char* GetOpenDoc (void) +{ + CFStringRef fileName; + CFBundleRef appBundle; + CFURLRef openDocFileURL; + FSRef fileRef; + FSSpec fileSpec; + 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); + + //convert FSRef to FSSpec + if (FSGetCatalogInfo(&fileRef, kFSCatInfoNone, NULL, NULL, &fileSpec, + NULL)) return NULL; + + //create path string + if (! (path = malloc(kMaxPathLength))) return NULL; + if (FSMakePath(fileSpec, 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(FSSpec file, char *path, long maxPathSize) +{ + OSErr err = noErr; + FSRef fileRef; + + //create file reference from file spec + if (err = FSpMakeFSRef(&file, &fileRef)) return err; + + // 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 (char *path) +{ + if (access(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("Platypus 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 fileSpecList; + AEKeyword keyword; + DescType type; + + short i; + long count, actualSize; + + FSSpec fileSpec; + char path[kMaxPathLength]; + + while (numArgs > 0) free(fileArgs[numArgs--]); + + //Read the AppleEvent + err = AEGetParamDesc(theAppleEvent, keyDirectObject, typeAEList, + &fileSpecList); + + err = AECountItems(&fileSpecList, &count); //Count number of files + + for (i = 1; i <= count; i++) { //iteratively process each file + //get fsspec from apple event + if (! (err = AEGetNthPtr(&fileSpecList, i, typeFSS, &keyword, &type, + (Ptr)&fileSpec, sizeof(FSSpec), &actualSize))) + { + //get path from file spec + if ((err = FSMakePath(fileSpec, (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 +/////////////////////////////// +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; +} + + +static void OpenURL(Str255 url) +{ + // Use Internet Config to hand the URL to the appropriate application, as + // set by the user in the Internet Preferences pane. + ICInstance icInstance; + // Applications creator code: + OSType signature = 'Inks'; + OSStatus error = ICStart( &icInstance, signature ); + if ( error == noErr ) + { + ConstStr255Param hint = 0x0; + const char* data = url; + long length = strlen(url); + long start = 0; + long end = length; + // Don't bother testing return value (error); launched application will + // report problems. + ICLaunchURL( icInstance, hint, data, length, &start, &end ); + ICStop( icInstance ); + } +} + + +////////////////////////////////// +// Handler for when X11 fails to start +////////////////////////////////// +static OSStatus X11FailedHandler(EventHandlerCallRef theHandlerCall, + EventRef theEvent, void *userData) +{ + #pragma unused(theHanderCall, theEvent, userData) + + pthread_join(tid, NULL); + if (odtid) pthread_join(odtid, NULL); + + SInt16 itemHit; + const char *getX11 = "\pGet X11 for Panther"; + + AlertStdAlertParamRec params; + params.movable = true; + params.helpButton = false; + params.filterProc = NULL; + params.defaultText = (StringPtr) kAlertDefaultOKText; + params.cancelText = getX11; + params.otherText = NULL; + params.defaultButton = kAlertStdAlertOKButton; + params.cancelButton = kAlertStdAlertCancelButton; + params.position = kWindowDefaultPosition; + + StandardAlert(kAlertStopAlert, "\pFailed to start X11", + "\pInkscape.app requires Apple's X11, which is freely downloadable from Apple's website for Panther (10.3.x) users and available as an optional install from the installation DVD for Tiger (10.4.x) users.\n\nPlease install X11 and restart Inkscape.", + ¶ms, &itemHit); + + if (itemHit == kAlertStdAlertCancelButton) + { + OpenURL("http://www.apple.com/downloads/macosx/apple/x11formacosx.html"); + } + + ExitToShell(); + + + return noErr; +} diff --git a/packaging/macosx/ScriptExec/openDoc b/packaging/macosx/ScriptExec/openDoc new file mode 100755 index 000000000..2242173e7 --- /dev/null +++ b/packaging/macosx/ScriptExec/openDoc @@ -0,0 +1,4 @@ +#!/bin/sh + + +echo $1;
\ No newline at end of file diff --git a/packaging/macosx/ScriptExec/script b/packaging/macosx/ScriptExec/script new file mode 100755 index 000000000..2242173e7 --- /dev/null +++ b/packaging/macosx/ScriptExec/script @@ -0,0 +1,4 @@ +#!/bin/sh + + +echo $1;
\ No newline at end of file diff --git a/packaging/macosx/ScriptExec/version.plist b/packaging/macosx/ScriptExec/version.plist new file mode 100644 index 000000000..a29320186 --- /dev/null +++ b/packaging/macosx/ScriptExec/version.plist @@ -0,0 +1,16 @@ +<?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> diff --git a/packaging/osx-app.sh b/packaging/osx-app.sh new file mode 100644 index 000000000..954ccb9fc --- /dev/null +++ b/packaging/osx-app.sh @@ -0,0 +1,231 @@ +#! /bin/bash +# Copyright 2005, Kees Cook <kees@outflux.net> +# Licensed under GNU General Public License +# +# Usage: osx-app [-s] /path/to/bin/inkscape Info.plist /path/to/packaging/macosx +# +# This attempts to build an Inkscape.app package for OSX, resolving +# Dynamic libraries, etc. Strips the executable and libraries if +# '-s' is given. +# +# Thanks to GNUnet's "build_app" script for help with library dep resolution. +# https://gnunet.org/svn/GNUnet/contrib/OSX/build_app +# +# Fixes and modifications to use Gimp.app style launcher: +# Michael Wybrow <mjwybrow@users.sourceforge.net> +# +# +# Notes: +# The Info.plist file can be found in the base inkscape directory once +# configure has been run. +# The macosx directory is in the inkscape/packaging directory. +# +# When packaging Inkscape for OS X, configure should be run with the +# "--enable-osxapp" option which sets the correct paths for support +# files inside the app bundle. +# +# Thus, the usual use of this file would be to run it from the within the +# inkscape/packaging directory, substituting in the inkscape binary path: +# ./osx-app.sh /path/to/bin/inkscape ../Info.plist macosx + + + +# Handle some version specific details. +VERSION=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 -d'.'` +if [ "$VERSION" -ge "4" ]; then + # We're on Tiger (10.4) or later. + # XCode behaves a little differently in Tiger and later. + XCODEFLAGS="-configuration Deployment" + SCRIPTEXECDIR="ScriptExec/build/Deployment/ScriptExec.app/Contents/MacOS" + # libXinerama.1.dylib is not installed as part of X11 on Panther but + # is introduced as a dependency if Inkscape is compiled on Tiger or + # later. Thus, add the library to the bundle for Panther users + EXTRALIBS="/usr/X11R6/lib/libXinerama.1.dylib" +else + # Panther (10.3) or earlier. + XCODEFLAGS="-buildstyle Deployment" + SCRIPTEXECDIR="ScriptExec/build/ScriptExec.app/Contents/MacOS" + EXTRALIBS="" +fi + + +SW=/sw + +# Package always has the same name. Version information is stored in +# the Info.plist file which is filled in by the configure script. +pkg=Inkscape +package="$pkg.app" + +# TODO: Rewrite handling of command line args and make more robust. + +strip=false +if [ "$1" = "-s" ]; then + strip=true + shift +fi + +binary="$1" +if [ ! -x "$binary" ]; then + echo "Not executable: $binary" >&2 + exit 1 +fi +shift + +plist="$1" +if [ ! -f "$plist" ]; then + echo "Need plist file" >&2 + exit 1 +fi +shift + +resdir=$1 +if [ ! -d $resdir ]; then + echo "Need the macosx packaging directory" >&2 + exit 1 +fi +shift + +# Fix a given executable or library to be relocatable +fixlib () { +if [ ! -d "$1" ]; then + echo $1 + libs="`otool -L $1 | fgrep compatibility | cut -d\( -f1`" + for lib in $libs; do + echo " $lib" + base=`echo $lib | awk -F/ '{print $NF}'` + first=`echo $lib | cut -d/ -f1-3` + to=@executable_path/../lib/$base + if [ $first != /usr/lib -a $first != /usr/X11R6 ]; then + /usr/bin/install_name_tool -change $lib $to $1 + if [ "`echo $lib | fgrep libcrypto`" = "" ]; then + /usr/bin/install_name_tool -id $to ../lib/$base + for ll in $libs; do + base=`echo $ll | awk -F/ '{print $NF}'` + first=`echo $ll | cut -d/ -f1-3` + to=@executable_path/../lib/$base + if [ $first != /usr/lib -a $first != /usr/X11R6 -a "`echo $ll | fgrep libcrypto`" = "" ]; then + /usr/bin/install_name_tool -change $ll $to ../lib/$base + fi + done + fi + fi + done +fi +} + + + +mkdir -p "$package"/Contents/MacOS +mkdir -p "$package"/Contents/Resources/bin +mkdir -p "$package"/Contents/Resources/lib +mkdir -p "$package"/Contents/Resources/locale + +binname=`basename "$binary"` +binpath="$package/Contents/Resources/bin/inkscape-bin" + +cp "$binary" "$binpath" + + +# Build and add the launcher. +( + # Build fails if CC happens to be set (to anything other than CompileC) + unset CC + + cd "$resdir/ScriptExec" + xcodebuild $XCODEFLAGS clean build +) +cp "$resdir/$SCRIPTEXECDIR/ScriptExec" "$package/Contents/MacOS/Inkscape" + +# Pull down all the share files +binary_dir=`dirname "$binary"` +rsync -av "$binary_dir/../share/$binname"/* "$package/Contents/Resources/" +cp "$plist" "$package/Contents/Info.plist" +rsync -av "$binary_dir/../share/locale"/* "$package/Contents/Resources/locale" + +# PkgInfo must match bundle type and creator code from Info.plist +echo "APPLInks" > $package/Contents/PkgInfo + +# Pull in extra requirements. +pkgetc="$package/Contents/Resources/etc" +mkdir -p $pkgetc/pango +cp $SW/etc/pango/pangox.aliases $pkgetc/pango/ +# Need to adjust path and quote incase of spaces in path. +sed -e "s,$SW,\"\${CWD},g" -e 's,\.so ,.so" ,g' $SW/etc/pango/pango.modules > $pkgetc/pango/pango.modules +cat > $pkgetc/pango/pangorc <<END_PANGO +[Pango] +ModuleFiles = "\${HOME}/.inkscape-etc/pango.modules" +[PangoX] +AliasFiles = "\${HOME}/.inkscape-etc/pangox.aliases" +END_PANGO + +mkdir -p $pkgetc/fonts/ +cp /etc/fonts/* $pkgetc/fonts/ + +mkdir -p $pkgetc/gtk-2.0 +sed -e "s,$SW,\${CWD},g" $SW/etc/gtk-2.0/gdk-pixbuf.loaders > $pkgetc/gtk-2.0/gdk-pixbuf.loaders +sed -e "s,$SW,\${CWD},g" $SW/etc/gtk-2.0/gtk.immodules > $pkgetc/gtk-2.0/gtk.immodules + +for item in gnome-vfs-mime-magic gnome-vfs-2.0 +do + cp -r $SW/etc/$item $pkgetc/ +done + +pkglib="$package/Contents/Resources/lib" +mkdir -p $pkglib/pango/1.4.0/modules +cp $SW/lib/pango/1.4.0/modules/*.so $pkglib/pango/1.4.0/modules/ + +mkdir -p $pkglib/gtk-2.0/2.4.0/{engines,immodules,loaders} +cp -r $SW/lib/gtk-2.0/2.4.0/engines/* $pkglib/gtk-2.0/2.4.0/engines/ +cp $SW/lib/gtk-2.0/2.4.0/immodules/*.so $pkglib/gtk-2.0/2.4.0/immodules/ +cp $SW/lib/gtk-2.0/2.4.0/loaders/*.so $pkglib/gtk-2.0/2.4.0/loaders/ + +mkdir -p $pkglib/gnome-vfs-2.0/modules +cp $SW/lib/gnome-vfs-2.0/modules/*.so $pkglib/gnome-vfs-2.0/modules/ + +# Find out libs we need from fink (e.g. $SW) - loop until no changes +a=1 +nfiles=0 +endl=true +while $endl; do + echo "Looking for dependencies. Round " $a + libs="`otool -L $pkglib/gtk-2.0/2.4.0/loaders/* $pkglib/gtk-2.0/2.4.0/immodules/* $pkglib/gtk-2.0/2.4.0/engines/*.so $pkglib/pango/1.4.0/modules/* $pkglib/gnome-vfs-2.0/modules/* $package/Contents/Resources/lib/* $binary 2>/dev/null | fgrep compatibility | cut -d\( -f1 | grep $SW | sort | uniq`" + cp -f $libs $package/Contents/Resources/lib + let "a+=1" + nnfiles=`ls $package/Contents/Resources/lib | wc -l` + if [ $nnfiles = $nfiles ]; then + endl=false + else + nfiles=$nnfiles + fi +done + +for libfile in $EXTRALIBS +do + cp -f $libfile $package/Contents/Resources/lib +done + +if [ "$strip" = "true" ]; then + strip -x "$package"/Contents/Resources/lib/*.dylib + strip -ur "$binpath" +fi + +# NOTE: This works for all the dylibs but causes GTK to crash at startup. +# Instead we leave them with their original install_names and set +# DYLD_LIBRARY_PATH within the app bundle before running Inkscape. +# +# Fix package deps +#(cd "$package/Contents/MacOS/bin" +# for file in *; do +# fixlib "$file" +# done +# cd ../lib +# for file in *; do +# fixlib "$file" +# done) + +# Get all the icons and the rest of the script framework +rsync -av $resdir/Resources/* $package/Contents/Resources/ + + +# Make an image +/usr/bin/hdiutil create -srcfolder "$pkg.app" "$pkg.dmg" diff --git a/packaging/win32/english.nsh b/packaging/win32/english.nsh new file mode 100644 index 000000000..cc607eb02 --- /dev/null +++ b/packaging/win32/english.nsh @@ -0,0 +1,154 @@ +; ####################################### +; english.nsh +; english language strings for inkscape installer +; windows code page: 1252 +; Authors: +; Adib Taraben theAdib@yahoo.com +; +!insertmacro MUI_LANGUAGE "English" + +; Product name +LangString lng_Caption ${LANG_ENGLISH} "${PRODUCT_NAME} -- Open Source Scalable Vector Graphics Editor" + +; Button text "Next >" for the license page +LangString lng_LICENSE_BUTTON ${LANG_ENGLISH} "Next >" + +; Bottom text for the license page +LangString lng_LICENSE_BOTTOM_TEXT ${LANG_ENGLISH} "$(^Name) is released under the GNU General Public License (GPL). The license is provided here for information purposes only. $_CLICK" + +; Full install type +LangString lng_Full $(LANG_ENGLISH) "Full" + +; Optimal install type +LangString lng_Optimal $(LANG_ENGLISH) "Optimal" + +; Minimal install type +LangString lng_Minimal $(LANG_ENGLISH) "Minimal" + +; Core install section +LangString lng_Core $(LANG_ENGLISH) "${PRODUCT_NAME} SVG Editor (required)" + +; Core install section description +LangString lng_CoreDesc $(LANG_ENGLISH) "Core ${PRODUCT_NAME} files and dlls" + +; GTK+ install section +LangString lng_GTKFiles $(LANG_ENGLISH) "GTK+ Runtime Environment (required)" + +; GTK+ install section description +LangString lng_GTKFilesDesc $(LANG_ENGLISH) "A multi-platform GUI toolkit, used by ${PRODUCT_NAME}" + +; shortcuts install section +LangString lng_Shortcuts $(LANG_ENGLISH) "Shortcuts" + +; shortcuts install section description +LangString lng_ShortcutsDesc $(LANG_ENGLISH) "Shortcuts for starting ${PRODUCT_NAME}" + +; All user install section +LangString lng_Alluser $(LANG_ENGLISH) "for all users" + +; All user install section description +LangString lng_AlluserDesc $(LANG_ENGLISH) "Install this application for anyone who uses this computer (all users)" + +; Desktop section +LangString lng_Desktop $(LANG_ENGLISH) "Desktop" + +; Desktop section description +LangString lng_DesktopDesc $(LANG_ENGLISH) "Create a shortcut to ${PRODUCT_NAME} on the Desktop" + +; Start Menu section +LangString lng_Startmenu $(LANG_ENGLISH) "Start Menu" + +; Start Menu section description +LangString lng_StartmenuDesc $(LANG_ENGLISH) "Create a Start Menu entry for ${PRODUCT_NAME}" + +; Quick launch section +LangString lng_Quicklaunch $(LANG_ENGLISH) "Quick Launch" + +; Quick launch section description +LangString lng_QuicklaunchDesc $(LANG_ENGLISH) "Create a shortcut to ${PRODUCT_NAME} on the Quick Launch toolbar" + +; File type association for editing +LangString lng_SVGWriter ${LANG_ENGLISH} "Open SVG files with ${PRODUCT_NAME}" + +; File type association for editing description +LangString lng_SVGWriterDesc ${LANG_ENGLISH} "Select ${PRODUCT_NAME} as default editor for SVG files" + +; Context Menu +LangString lng_ContextMenu ${LANG_ENGLISH} "Context Menu" + +; Context Menu description +LangString lng_ContextMenuDesc ${LANG_ENGLISH} "Add ${PRODUCT_NAME} into the Context Menu for SVG files" + + +; Additional files section +LangString lng_Addfiles $(LANG_ENGLISH) "Additional Files" + +; Additional files section description +LangString lng_AddfilesDesc $(LANG_ENGLISH) "Additional Files" + +; Examples section +LangString lng_Examples $(LANG_ENGLISH) "Examples" + +; Examples section description +LangString lng_ExamplesDesc $(LANG_ENGLISH) "Examples using ${PRODUCT_NAME}" + +; Tutorials section +LangString lng_Tutorials $(LANG_ENGLISH) "Tutorials" + +; Tutorials section description +LangString lng_TutorialsDesc $(LANG_ENGLISH) "Tutorials using ${PRODUCT_NAME}" + + +; Languages section +LangString lng_Languages $(LANG_ENGLISH) "Translations" + +; Languages section dscription +LangString lng_LanguagesDesc $(LANG_ENGLISH) "Install various translations for ${PRODUCT_NAME}" + +LangString lng_am $(LANG_ENGLISH) "am Amharic" +LangString lng_az $(LANG_ENGLISH) "az Azerbaijani" +LangString lng_be $(LANG_ENGLISH) "be Byelorussian" +LangString lng_ca $(LANG_ENGLISH) "ca Catalan" +LangString lng_cs $(LANG_ENGLISH) "cs Czech" +LangString lng_da $(LANG_ENGLISH) "da Danish" +LangString lng_de $(LANG_ENGLISH) "de German" +LangString lng_el $(LANG_ENGLISH) "el Greek" +LangString lng_en $(LANG_ENGLISH) "en English" +LangString lng_es $(LANG_ENGLISH) "es Spanish" +LangString lng_es_MX $(LANG_ENGLISH) "es_MX Mexican Spanish" +LangString lng_et $(LANG_ENGLISH) "es Estonian" +LangString lng_fr $(LANG_ENGLISH) "fr French" +LangString lng_ga $(LANG_ENGLISH) "ga Irish" +LangString lng_gl $(LANG_ENGLISH) "gl Gallegan" +LangString lng_hu $(LANG_ENGLISH) "hu Hungarian" +LangString lng_it $(LANG_ENGLISH) "it Italian" +LangString lng_ja $(LANG_ENGLISH) "ja Japanese" +LangString lng_mk $(LANG_ENGLISH) "mk Macedonian" +LangString lng_nb $(LANG_ENGLISH) "nb Norwegian Bokmål" +LangString lng_nl $(LANG_ENGLISH) "nl Dutch" +LangString lng_nn $(LANG_ENGLISH) "nn Norwegian Nynorsk" +LangString lng_pa $(LANG_ENGLISH) "pa Panjabi" +LangString lng_pl $(LANG_ENGLISH) "po Polish" +LangString lng_pt $(LANG_ENGLISH) "pt Portuguese" +LangString lng_pt_BR $(LANG_ENGLISH) "pt_BR Brazilian Portuguese" +LangString lng_ru $(LANG_ENGLISH) "ru Russian" +LangString lng_sk $(LANG_ENGLISH) "sk Slovak" +LangString lng_sl $(LANG_ENGLISH) "sl Slovenian" +LangString lng_sr $(LANG_ENGLISH) "sr Serbian" +LangString lng_sr@Latn $(LANG_ENGLISH) "sr@Latn Serbian in Latin script" +LangString lng_sv $(LANG_ENGLISH) "sv Swedish" +LangString lng_tr $(LANG_ENGLISH) "tr Turkish" +LangString lng_uk $(LANG_ENGLISH) "uk Ukrainian" +LangString lng_zh_CN $(LANG_ENGLISH) "zh_CH Simplifed Chinese" + + + + +; uninstallation options +LangString lng_UInstOpt ${LANG_ENGLISH} "Uninstallation Options" + +; uninstallation options subtitle +LangString lng_UInstOpt1 ${LANG_ENGLISH} "Please make your choices for additional options" + +; Ask to purge the personal preferences +LangString lng_PurgePrefs ${LANG_ENGLISH} "Keep personal Preferences" diff --git a/packaging/win32/german.nsh b/packaging/win32/german.nsh new file mode 100644 index 000000000..33d8c72ac --- /dev/null +++ b/packaging/win32/german.nsh @@ -0,0 +1,158 @@ +; ####################################### +; german.nsh +; german language strings for inkscape installer +; windows code page: 1252 +; Authors: +; Adib Taraben theAdib@yahoo.com +; +!insertmacro MUI_LANGUAGE "German" + +; Product name +LangString lng_Caption ${LANG_GERMAN} "${PRODUCT_NAME} -- Open Source SVG-Vektorillustrator" + +; Button text "Next >" for the license page +LangString lng_LICENSE_BUTTON ${LANG_GERMAN} "Weiter >" + +; Bottom text for the license page +LangString lng_LICENSE_BOTTOM_TEXT ${LANG_GERMAN} "$(^Name) wird unter der GNU General Public License (GPL) veröffentlicht. Die Lizenz dient hier nur der Information. $_CLICK" + +; Full install type +LangString lng_Full $(LANG_GERMAN) "Komplett" + +; Optimal install type +LangString lng_Optimal $(LANG_GERMAN) "Optimal" + +; Minimal install type +LangString lng_Minimal $(LANG_GERMAN) "Minimal" + + +; Core section +LangString lng_Core $(LANG_GERMAN) "${PRODUCT_NAME} Vektorillustrator (erforderlich)" + +; Core section description +LangString lng_CoreDesc $(LANG_GERMAN) "${PRODUCT_NAME} Basis-Dateien und -DLLs" + + +; GTK+ section +LangString lng_GTKFiles $(LANG_GERMAN) "GTK+ Runtime Umgebung (erforderlich)" + +; GTK+ section description +LangString lng_GTKFilesDesc $(LANG_GERMAN) "Ein Multi-Plattform GUI Toolkit, verwendet von ${PRODUCT_NAME}" + + +; shortcuts section +LangString lng_Shortcuts $(LANG_GERMAN) "Verknüpfungen" + +; shortcuts section description +LangString lng_ShortcutsDesc $(LANG_GERMAN) "Verknüpfungen zum Start von ${PRODUCT_NAME}" + +; multi user installation +LangString lng_Alluser ${LANG_GERMAN} "für Alle Benutzer" + +; multi user installation description +LangString lng_AlluserDesc ${LANG_GERMAN} "Installiert diese Anwendung für alle Benutzer dieses Computers (all users)" + +; Start Menu section +LangString lng_Startmenu $(LANG_GERMAN) "Startmenü" + +; Start Menu section description +LangString lng_StartmenuDesc $(LANG_GERMAN) "Erstellt einen Eintrag für ${PRODUCT_NAME} im Startmenü" + +; Desktop section +LangString lng_Desktop $(LANG_GERMAN) "Desktop" + +; Desktop section description +LangString lng_DesktopDesc $(LANG_GERMAN) "Erstellt eine Verknüpfung zu ${PRODUCT_NAME} auf dem Desktop" + +; Quick launch section +LangString lng_Quicklaunch $(LANG_GERMAN) "Schnellstartleiste" + +; Quick launch section description +LangString lng_QuicklaunchDesc $(LANG_GERMAN) "Erstellt eine Verknüpfung zu ${PRODUCT_NAME} auf der Schnellstartleiste" + +; File type association for editing +LangString lng_SVGWriter ${LANG_GERMAN} "Öffne SVG Dateien mit ${PRODUCT_NAME}" + +;LangString lng_UseAs ${LANG_ENGLISH} "Select ${PRODUCT_NAME} as default application for:" +LangString lng_SVGWriterDesc ${LANG_GERMAN} "Wählen Sie ${PRODUCT_NAME} als Standardanwendung für SVG Dateien" + +; Context Menu +LangString lng_ContextMenu ${LANG_GERMAN} "Kontext-Menü" + +; Context Menu description +LangString lng_ContextMenuDesc ${LANG_GERMAN} "Fügt ${PRODUCT_NAME} in das Kontext-Menü für SVG Dateien ein" + + +; Additional Files section +LangString lng_Addfiles $(LANG_GERMAN) "weitere Dateien" + +; additional files section dscription +LangString lng_AddfilesDesc $(LANG_GERMAN) "weitere Dateien" + +; Examples section +LangString lng_Examples $(LANG_GERMAN) "Beispiele" + +; Examples section dscription +LangString lng_ExamplesDesc $(LANG_GERMAN) "Beispiele mit ${PRODUCT_NAME}" + +; Tutorials section +LangString lng_Tutorials $(LANG_GERMAN) "Tutorials" + +; Tutorials section dscription +LangString lng_TutorialsDesc $(LANG_GERMAN) "Tutorials für die Benutzung mit ${PRODUCT_NAME}" + + +; Languages section +LangString lng_Languages $(LANG_GERMAN) "Übersetzungen" + +; Languages section dscription +LangString lng_LanguagesDesc $(LANG_GERMAN) "Installiert verschiedene Übersetzungen für ${PRODUCT_NAME}" + +LangString lng_am $(LANG_GERMAN) "am Amharisch" +LangString lng_az $(LANG_GERMAN) "az Aserbaidschanisch" +LangString lng_be $(LANG_GERMAN) "be Weißrussisch" +LangString lng_ca $(LANG_GERMAN) "ca Katalanisch" +LangString lng_cs $(LANG_GERMAN) "cs Tschechisch" +LangString lng_da $(LANG_GERMAN) "da Dänisch" +LangString lng_de $(LANG_GERMAN) "de Deutsch" +LangString lng_el $(LANG_GERMAN) "el Griechisch" +LangString lng_en $(LANG_GERMAN) "en Englisch" +LangString lng_es $(LANG_GERMAN) "es Spanisch" +LangString lng_es_MX $(LANG_GERMAN) "es_MX Spanisch-Mexio" +LangString lng_et $(LANG_GERMAN) "es Estonisch" +LangString lng_fr $(LANG_GERMAN) "fr Französisch" +LangString lng_ga $(LANG_GERMAN) "ga Irisch" +LangString lng_gl $(LANG_GERMAN) "gl Galizisch" +LangString lng_hu $(LANG_GERMAN) "hu Ungarisch" +LangString lng_it $(LANG_GERMAN) "it Italienisch" +LangString lng_ja $(LANG_GERMAN) "ja Japanisch" +LangString lng_mk $(LANG_GERMAN) "mk Mazedonisch" +LangString lng_nb $(LANG_GERMAN) "nb Norwegisch-Bokmal" +LangString lng_nl $(LANG_GERMAN) "nl Holländisch" +LangString lng_nn $(LANG_GERMAN) "nn Nynorsk-Norwegisch" +LangString lng_pa $(LANG_GERMAN) "pa Panjabi" +LangString lng_pl $(LANG_GERMAN) "po Polnisch" +LangString lng_pt $(LANG_GERMAN) "pt Portugiesisch" +LangString lng_pt_BR $(LANG_GERMAN) "pt_BR Portugiesisch Brazilien" +LangString lng_ru $(LANG_GERMAN) "ru Russisch" +LangString lng_sk $(LANG_GERMAN) "sk Slowakisch" +LangString lng_sl $(LANG_GERMAN) "sl Slowenisch" +LangString lng_sr $(LANG_GERMAN) "sr Serbisch" +LangString lng_sr@Latn $(LANG_GERMAN) "sr@Latn Serbisch mit lat. Buchstaben" +LangString lng_sv $(LANG_GERMAN) "sv Schwedisch" +LangString lng_tr $(LANG_GERMAN) "tr Türkisch" +LangString lng_uk $(LANG_GERMAN) "uk Ukrainisch" +LangString lng_zh_CN $(LANG_GERMAN) "zh_CH Chinesisch (vereinfacht)" + + +; uninstallation options +;LangString lng_UInstOpt ${LANG_ENGLISH} "Uninstallation Options" +LangString lng_UInstOpt ${LANG_GERMAN} "Deinstallations Optionen" + +; uninstallation options subtitle +;LangString lng_UInstOpt1 ${LANG_ENGLISH} "Please make your choices for additional options" +LangString lng_UInstOpt1 ${LANG_GERMAN} "Bitte wählen Sie die optionalen Deinstalltionsparameter" + +; Ask to purge the personal preferences +;LangString lng_PurgePrefs ${LANG_ENGLISH} "Keep Inkscape preferences" +LangString lng_PurgePrefs ${LANG_GERMAN} "behalte persönliche Inkscape-Vorgaben" diff --git a/packaging/win32/header.bmp b/packaging/win32/header.bmp Binary files differnew file mode 100644 index 000000000..26e863ec4 --- /dev/null +++ b/packaging/win32/header.bmp diff --git a/packaging/win32/inkscape.nsi b/packaging/win32/inkscape.nsi new file mode 100644 index 000000000..ff22af02e --- /dev/null +++ b/packaging/win32/inkscape.nsi @@ -0,0 +1,1055 @@ +; ####################################### +; Inkscape NSIS installer project file +; Used as of 0.40 +; ####################################### + +; ####################################### +; DEFINES +; ####################################### +!define PRODUCT_NAME "Inkscape" +!define PRODUCT_VERSION "0.43+devel" +!define PRODUCT_PUBLISHER "Inkscape Organization" +!define PRODUCT_WEB_SITE "http://www.inkscape.org" +!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\inkscape.exe" +!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" + + + +; ####################################### +; MUI SETTINGS +; ####################################### +; MUI 1.67 compatible ------ +SetCompressor /SOLID lzma +!include "MUI.nsh" +!include "sections.nsh" +!define MUI_ABORTWARNING +!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_BITMAP "header.bmp" +!define MUI_COMPONENTSPAGE_SMALLDESC + + +; Welcome page +!insertmacro MUI_PAGE_WELCOME +; License page +; !define MUI_LICENSEPAGE_RADIOBUTTONS +LicenseForceSelection off +!define MUI_LICENSEPAGE_BUTTON $(lng_LICENSE_BUTTON) +!define MUI_LICENSEPAGE_TEXT_BOTTOM $(lng_LICENSE_BOTTOM_TEXT) +!insertmacro MUI_PAGE_LICENSE "..\..\Copying" +!insertmacro MUI_PAGE_COMPONENTS +; InstType $(lng_Full) +; InstType $(lng_Optimal) +; InstType $(lng_Minimal) +; Directory page +!insertmacro MUI_PAGE_DIRECTORY +; Instfiles page +!insertmacro MUI_PAGE_INSTFILES +; Finish page +!define MUI_FINISHPAGE_RUN "$INSTDIR\inkscape.exe" +!insertmacro MUI_PAGE_FINISH + +; Uninstaller pages +!insertmacro MUI_UNPAGE_CONFIRM +UninstPage custom un.CustomPageUninstall +!insertmacro MUI_UNPAGE_INSTFILES +ShowUninstDetails hide +!insertmacro MUI_UNPAGE_FINISH + +; ####################################### +; STRING LOCALIZATION +; ####################################### +; Thanks to Adib Taraben and Luca Bruno for getting this started +; Add your translation here! :-) +; I had wanted to list the languages alphabetically, but apparently +; the first is the default. So putting English first is just being +; practical. It is not chauvinism or hubris, I swear! ;-) +; default language first + +; Language files +!include "english.nsh" +;!include "catalan.nsh" +;!include "czech.nsh" +;!include "french.nsh" +!include "german.nsh" +;!include "italian.nsh" +;!include "polish.nsh" + +ReserveFile "inkscape.nsi.uninstall" + + +; ####################################### +; SETTINGS +; ####################################### + +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" +Caption $(lng_Caption) +OutFile "Inkscape-${PRODUCT_VERSION}-1.win32.exe" +InstallDir "$PROGRAMFILES\Inkscape" +InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" +ShowInstDetails hide +ShowUnInstDetails hide + +var askMultiUser +Var MultiUser + +; ####################################### +; I N S T A L L E R S E C T I O N S +; ####################################### + +; Turn off old selected section +; GetWindowsVersion +; +; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/ +; Updated by Joost Verburg +; Updated for Windows 98 SE by Matthew Win Tibbals 5-21-03 +; +; Returns on top of stack +; +; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003) +; or +; '' (Unknown Windows Version) +; +; Usage: +; Call GetWindowsVersion +; Pop $R0 +; ; at this point $R0 is "NT 4.0" or whatnot +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function GetWindowsVersion + + Push $R0 + Push $R1 + + ClearErrors + + ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + + IfErrors 0 lbl_winnt + + ; we are not NT + ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber + + StrCpy $R1 $R0 1 + StrCmp $R1 '4' 0 lbl_error + + StrCpy $R1 $R0 3 + + StrCmp $R1 '4.0' lbl_win32_95 + StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98 + + lbl_win32_95: + StrCpy $R0 '95' + StrCpy $AskMultiUser "0" + Goto lbl_done + + lbl_win32_98: + StrCpy $R0 '98' + StrCpy $AskMultiUser "0" + Goto lbl_done + lbl_win32_ME: + StrCpy $R0 'ME' + StrCpy $AskMultiUser "0" + Goto lbl_done + + lbl_winnt: + + StrCpy $R1 $R0 1 + + StrCmp $R1 '3' lbl_winnt_x + StrCmp $R1 '4' lbl_winnt_x + + StrCpy $R1 $R0 3 + + StrCmp $R1 '5.0' lbl_winnt_2000 + StrCmp $R1 '5.1' lbl_winnt_XP + StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error + + lbl_winnt_x: + StrCpy $R0 "NT $R0" 6 + Goto lbl_done + + lbl_winnt_2000: + Strcpy $R0 '2000' + Goto lbl_done + + lbl_winnt_XP: + Strcpy $R0 'XP' + Goto lbl_done + + lbl_winnt_2003: + Strcpy $R0 '2003' + Goto lbl_done + + lbl_error: + Strcpy $R0 '' + lbl_done: + + Pop $R1 + Exch $R0 + +FunctionEnd + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + ; StrStr + ; input, top of stack = string to search for + ; top of stack-1 = string to search in + ; output, top of stack (replaces with the portion of the string remaining) + ; modifies no other variables. + ; + ; Usage: + ; Push "this is a long ass string" + ; Push "ass" + ; Call StrStr + ; Pop $R0 + ; ($R0 at this point is "ass string") + + Function StrStr + Exch $R1 ; st=haystack,old$R1, $R1=needle + Exch ; st=old$R1,haystack + Exch $R2 ; st=old$R1,old$R2, $R2=haystack + Push $R3 + Push $R4 + Push $R5 + StrLen $R3 $R1 + StrCpy $R4 0 + ; $R1=needle + ; $R2=haystack + ; $R3=len(needle) + ; $R4=cnt + ; $R5=tmp + loop: + StrCpy $R5 $R2 $R3 $R4 + StrCmp $R5 $R1 done + StrCmp $R5 "" done + IntOp $R4 $R4 + 1 + Goto loop + done: + StrCpy $R1 $R2 "" $R4 + Pop $R5 + Pop $R4 + Pop $R3 + Pop $R2 + Exch $R1 + FunctionEnd + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + ; GetParameters + ; input, none + ; output, top of stack (replaces, with e.g. whatever) + ; modifies no other variables. + + Function GetParameters + + Push $R0 + Push $R1 + Push $R2 + Push $R3 + + StrCpy $R2 1 + StrLen $R3 $CMDLINE + + ;Check for quote or space + StrCpy $R0 $CMDLINE $R2 + StrCmp $R0 '"' 0 +3 + StrCpy $R1 '"' + Goto loop + StrCpy $R1 " " + + loop: + IntOp $R2 $R2 + 1 + StrCpy $R0 $CMDLINE 1 $R2 + StrCmp $R0 $R1 get + StrCmp $R2 $R3 get + Goto loop + + get: + IntOp $R2 $R2 + 1 + StrCpy $R0 $CMDLINE 1 $R2 + StrCmp $R0 " " get + StrCpy $R0 $CMDLINE "" $R2 + + Pop $R3 + Pop $R2 + Pop $R1 + Exch $R0 + + FunctionEnd + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; GetParameterValue +; Chris Morgan<cmorgan@alum.wpi.edu> 5/10/2004 +; -Updated 4/7/2005 to add support for retrieving a command line switch +; and additional documentation +; +; Searches the command line input, retrieved using GetParameters, for the +; value of an option given the option name. If no option is found the +; default value is placed on the top of the stack upon function return. +; +; This function can also be used to detect the existence of just a +; command line switch like /OUTPUT Pass the default and "OUTPUT" +; on the stack like normal. An empty return string "" will indicate +; that the switch was found, the default value indicates that +; neither a parameter or switch was found. +; +; Inputs - Top of stack is default if parameter isn't found, +; second in stack is parameter to search for, ex. "OUTPUT" +; Outputs - Top of the stack contains the value of this parameter +; So if the command line contained /OUTPUT=somedirectory, "somedirectory" +; will be on the top of the stack when this function returns +; +; Register usage +;$R0 - default return value if the parameter isn't found +;$R1 - input parameter, for example OUTPUT from the above example +;$R2 - the length of the search, this is the search parameter+2 +; as we have '/OUTPUT=' +;$R3 - the command line string +;$R4 - result from StrStr calls +;$R5 - search for ' ' or '"' + +Function GetParameterValue + Exch $R0 ; get the top of the stack(default parameter) into R0 + Exch ; exchange the top of the stack(default) with + ; the second in the stack(parameter to search for) + Exch $R1 ; get the top of the stack(search parameter) into $R1 + + ;Preserve on the stack the registers used in this function + Push $R2 + Push $R3 + Push $R4 + Push $R5 + + Strlen $R2 $R1+2 ; store the length of the search string into R2 + + Call GetParameters ; get the command line parameters + Pop $R3 ; store the command line string in R3 + + # search for quoted search string + StrCpy $R5 '"' ; later on we want to search for a open quote + Push $R3 ; push the 'search in' string onto the stack + Push '"/$R1=' ; push the 'search for' + Call StrStr ; search for the quoted parameter value + Pop $R4 + StrCpy $R4 $R4 "" 1 ; skip over open quote character, "" means no maxlen + StrCmp $R4 "" "" next ; if we didn't find an empty string go to next + + # search for non-quoted search string + StrCpy $R5 ' ' ; later on we want to search for a space since we + ; didn't start with an open quote '"' we shouldn't + ; look for a close quote '"' + Push $R3 ; push the command line back on the stack for searching + Push '/$R1=' ; search for the non-quoted search string + Call StrStr + Pop $R4 + + ; $R4 now contains the parameter string starting at the search string, + ; if it was found +next: + StrCmp $R4 "" check_for_switch ; if we didn't find anything then look for + ; usage as a command line switch + # copy the value after /$R1= by using StrCpy with an offset of $R2, + # the length of '/OUTPUT=' + StrCpy $R0 $R4 "" $R2 ; copy commandline text beyond parameter into $R0 + # search for the next parameter so we can trim this extra text off + Push $R0 + Push $R5 ; search for either the first space ' ', or the first + ; quote '"' + ; if we found '"/output' then we want to find the + ; ending ", as in '"/output=somevalue"' + ; if we found '/output' then we want to find the first + ; space after '/output=somevalue' + Call StrStr ; search for the next parameter + Pop $R4 + StrCmp $R4 "" done ; if 'somevalue' is missing, we are done + StrLen $R4 $R4 ; get the length of 'somevalue' so we can copy this + ; text into our output buffer + StrCpy $R0 $R0 -$R4 ; using the length of the string beyond the value, + ; copy only the value into $R0 + goto done ; if we are in the parameter retrieval path skip over + ; the check for a command line switch + +; See if the parameter was specified as a command line switch, like '/output' +check_for_switch: + Push $R3 ; push the command line back on the stack for searching + Push '/$R1' ; search for the non-quoted search string + Call StrStr + Pop $R4 + StrCmp $R4 "" done ; if we didn't find anything then use the default + StrCpy $R0 "" ; otherwise copy in an empty string since we found the + ; parameter, just didn't find a value + +done: + Pop $R5 + Pop $R4 + Pop $R3 + Pop $R2 + Pop $R1 + Exch $R0 ; put the value in $R0 at the top of the stack +FunctionEnd + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +!macro Language polng lng + SectionIn 1 2 3 + SetOutPath $INSTDIR + File /nonfatal /a "..\..\inkscape\*.${lng}.txt" + SetOutPath $INSTDIR\locale + File /nonfatal /a /r "..\..\inkscape\locale\${polng}" + SetOutPath $INSTDIR\lib\locale + File /nonfatal /a /r "..\..\inkscape\lib\locale\${polng}" + SectionGetFlags ${SecTutorials} $R1 + IntOp $R1 $R1 & ${SF_SELECTED} + IntCmp $R1 ${SF_SELECTED} 0 skip_tutorials + SetOutPath $INSTDIR\share\tutorials + File /nonfatal /a "..\..\inkscape\share\tutorials\*.${lng}.*" + skip_tutorials: +!macroend + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + + + +;-------------------------------- +; Installer Sections + +Section -removeInkscape + ; check for an old installation and clean that dlls and stuff + ClearErrors + IfFileExists $INSTDIR\etc 0 doDeleteLib + DetailPrint "$INSTDIR\etc exists, will be removed" + RmDir /r $INSTDIR\etc + IfErrors 0 +4 + DetailPrint "fatal: failed to delete $INSTDIR\etc" + DetailPrint "aborting installation" + Abort + doDeleteLib: + + ClearErrors + IfFileExists $INSTDIR\lib 0 doDeleteLocale + DetailPrint "$INSTDIR\lib exists, will be removed" + RmDir /r $INSTDIR\lib + IfErrors 0 +4 + DetailPrint "fatal: failed to delete $INSTDIR\lib" + DetailPrint "aborting installation" + Abort + doDeleteLocale: + + ClearErrors + IfFileExists $INSTDIR\locale 0 doDeleteDll + DetailPrint "$INSTDIR\locale exists, will be removed" + RmDir /r $INSTDIR\locale + IfErrors 0 +4 + DetailPrint "fatal: failed to delete $INSTDIR\locale" + DetailPrint "aborting installation" + Abort + doDeleteDll: + + ClearErrors + FindFirst $0 $1 $INSTDIR\*.dll + FindNextLoop: + StrCmp $1 "" FindNextDone + DetailPrint "$INSTDIR\$1 exists, will be removed" + Delete $INSTDIR\$1 + IfErrors 0 +4 + DetailPrint "fatal: failed to delete $INSTDIR\$1" + DetailPrint "aborting installation" + Abort + FindNext $0 $1 + Goto FindNextLoop + FindNextDone: +SectionEnd + +Section $(lng_Core) SecCore + + DetailPrint "Installing Inkscape Core Files ..." + + SectionIn 1 2 3 RO + SetOutPath $INSTDIR + SetOverwrite on + SetAutoClose false + + File /a "..\..\inkscape\ink*.exe" + File /a "..\..\inkscape\AUTHORS" + File /a "..\..\inkscape\COPYING" + File /a "..\..\inkscape\COPYING.LIB" + File /a "..\..\inkscape\NEWS" + File /a "..\..\inkscape\HACKING.txt" + File /a "..\..\inkscape\README" + File /a "..\..\inkscape\TRANSLATORS" + File /nonfatal /a /r "..\..\inkscape\data" + File /nonfatal /a /r "..\..\inkscape\doc" + File /nonfatal /a /r "..\..\inkscape\plugins" + File /nonfatal /a /r /x *.??*.???* /x "examples" /x "tutorials" "..\..\inkscape\share" + SetOutPath $INSTDIR\modules + File /nonfatal /a /r "..\..\inkscape\modules\*.*" + + +SectionEnd + +Section $(lng_GTKFiles) SecGTK + + DetailPrint "Installing GTK Files ..." + + SectionIn 1 2 3 RO + SetOutPath $INSTDIR + SetOverwrite on + File /a /r "..\..\inkscape\*.dll" + File /a /r /x "locale" "..\..\inkscape\lib" + File /a /r "..\..\inkscape\etc" +SectionEnd + +Section $(lng_Alluser) SecAlluser + ; disable this option in Win95/Win98/WinME + SectionIn 1 2 3 + StrCpy $MultiUser "1" +SectionEnd + +SectionGroup $(lng_Shortcuts) SecShortcuts + +Section $(lng_Desktop) SecDesktop + SectionIn 1 2 3 + CreateShortCut "$DESKTOP\Inkscape.lnk" "$INSTDIR\inkscape.exe" +SectionEnd + +Section $(lng_Quicklaunch) SecQuicklaunch + SectionIn 1 2 3 + StrCmp $QUICKLAUNCH $TEMP +2 + CreateShortCut "$QUICKLAUNCH\Inkscape.lnk" "$INSTDIR\inkscape.exe" +SectionEnd + +Section $(lng_SVGWriter) SecSVGWriter + SectionIn 1 2 3 + ; create file associations, test before if needed + DetailPrint "creating file associations" + ReadRegStr $0 HKCR ".svg" "" + StrCmp $0 "" 0 +3 + WriteRegStr HKCR ".svg" "" "svgfile" + WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file" + ReadRegStr $0 HKCR ".svgz" "" + StrCmp $0 "" 0 +3 + WriteRegStr HKCR ".svgz" "" "svgfile" + WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file" + + DetailPrint "creating default editor" + ClearErrors + ReadRegStr $0 HKCR ".svg" "" + WriteRegStr HKCR "$0\shell\edit\command" "" '"$INSTDIR\Inkscape.exe" "%1"' + ReadRegStr $0 HKCR ".svgz" "" + WriteRegStr HKCR "$0\shell\edit\command" "" '"$INSTDIR\Inkscape.exe" "%1"' + IfErrors 0 +2 + DetailPrint "Uups! Problems creating default editor" +SectionEnd + +Section $(lng_ContextMenu) SecContextMenu + SectionIn 1 2 3 + ; create file associations, test before if needed + DetailPrint "creating file associations" + ReadRegStr $0 HKCR ".svg" "" + StrCmp $0 "" 0 +3 + WriteRegStr HKCR ".svg" "" "svgfile" + WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file" + ReadRegStr $0 HKCR ".svgz" "" + StrCmp $0 "" 0 +3 + WriteRegStr HKCR ".svgz" "" "svgfile" + WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file" + + DetailPrint "creating context menue" + ClearErrors + ReadRegStr $0 HKCR ".svg" "" + WriteRegStr HKCR "$0\shell\${PRODUCT_NAME}\command" "" '"$INSTDIR\Inkscape.exe" "%1"' + ReadRegStr $0 HKCR ".svgz" "" + WriteRegStr HKCR "$0\shell\${PRODUCT_NAME}\command" "" '"$INSTDIR\Inkscape.exe" "%1"' + IfErrors 0 +2 + DetailPrint "Uups! Problems creating context menue integration" + +SectionEnd + +SectionGroupEnd + +SectionGroup $(lng_Addfiles) SecAddfiles + +Section $(lng_Examples) SecExamples + SectionIn 1 2 + SetOutPath $INSTDIR\share + File /nonfatal /a /r /x "*.??*.???*" "..\..\inkscape\share\examples" +SectionEnd + +Section $(lng_Tutorials) SecTutorials + SectionIn 1 2 + SetOutPath $INSTDIR\share + File /nonfatal /a /r /x "*.??*.???*" "..\..\inkscape\share\tutorials" +SectionEnd + +SectionGroupEnd + +SectionGroup /e $(lng_Languages) SecLanguages + +Section $(lng_am) SecAmharic + !insertmacro Language am am +SectionEnd + +Section $(lng_az) SecAzerbaijani + !insertmacro Language az az +SectionEnd + +Section $(lng_be) SecByelorussian + !insertmacro Language be be +SectionEnd + +Section $(lng_ca) SecCatalan + !insertmacro Language ca ca +SectionEnd + +Section $(lng_cs) SecCzech + !insertmacro Language cs cs +SectionEnd + +Section $(lng_da) SecDanish + !insertmacro Language da da +SectionEnd + +Section $(lng_de) SecGerman + !insertmacro Language 'de' 'de' +SectionEnd + +Section $(lng_el) SecGreek + !insertmacro Language el el +SectionEnd + +Section $(lng_en) SecEnglish + SectionIn 1 2 3 RO +SectionEnd + +Section $(lng_es) SecSpanish + !insertmacro Language 'es' 'es' +SectionEnd + +Section $(lng_es_MX) SecSpanishMexico + !insertmacro Language 'es_MX' 'es_MX' +SectionEnd + +Section $(lng_et) SecEstonian + !insertmacro Language et et +SectionEnd + +Section $(lng_fr) SecFrench + !insertmacro Language 'fr' 'fr' +SectionEnd + +Section $(lng_ga) SecIrish + !insertmacro Language ga ga +SectionEnd + +Section $(lng_gl) SecGallegan + !insertmacro Language gl gl + SectionIn 1 2 3 +SectionEnd + +Section $(lng_hu) SecHungarian + !insertmacro Language hu hu + SectionIn 1 2 3 +SectionEnd + +Section $(lng_it) SecItalian + !insertmacro Language it it + SectionIn 1 2 3 +SectionEnd + +Section $(lng_ja) SecJapanese + !insertmacro Language 'ja' 'jp' +SectionEnd + +Section $(lng_mk) SecMacedonian + !insertmacro Language mk mk +SectionEnd + +Section $(lng_nb) SecNorwegianBokmal + !insertmacro Language nb nb +SectionEnd + +Section $(lng_nl) SecDutch + !insertmacro Language nl nl +SectionEnd + +Section $(lng_nn) SecNorwegianNynorsk + !insertmacro Language nn nn +SectionEnd + +Section $(lng_pa) SecPanjabi + !insertmacro Language pa pa +SectionEnd + +Section $(lng_pl) SecPolish + !insertmacro Language pl pl +SectionEnd + +Section $(lng_pt) SecPortuguese + !insertmacro Language pt pt +SectionEnd + +Section $(lng_pt_BR) SecPortugueseBrazil + !insertmacro Language pt_BR pt_BR +SectionEnd + +Section $(lng_ru) SecRussian + !insertmacro Language ru ru +SectionEnd + +Section $(lng_sk) SecSlovak + !insertmacro Language sk sk +SectionEnd + +Section $(lng_sl) SecSlovenian + !insertmacro Language sl sl +SectionEnd + +Section $(lng_sr) SecSerbian + !insertmacro Language sr sr +SectionEnd + +Section $(lng_sr@Latn) SecSerbianLatin + !insertmacro Language 'sr@Latn' 'sr@Latn' +SectionEnd + +Section $(lng_sv) SecSwedish + !insertmacro Language sv sv +SectionEnd + +Section $(lng_tr) SecTurkish + !insertmacro Language tr tr +SectionEnd + +Section $(lng_uk) SecUkrainian + !insertmacro Language uk uk +SectionEnd + +Section $(lng_zh_CN) SecChineseSimplified + !insertmacro Language zh_CN zh_CN +SectionEnd + +Section -FinalizeInstallation + StrCmp $MultiUser "1" "" SingleUser + DetailPrint "admin mode, registry root will be HKLM" + SetShellVarContext all + Goto endSingleUser + SingleUser: + DetailPrint "single user mode, registry root will be HKCU" + SetShellVarContext current + endSingleUser: + + ; check for writing registry + ClearErrors + WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\inkscape.exe" + ;IfErrors 0 +4 + ; DetailPrint "fatal: failed to write to ${PRODUCT_DIR_REGKEY}" + ; DetailPrint "aborting installation" + ; Abort + WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "MultiUser" "$MultiUser" + WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "askMultiUser" "$askMultiUser" + + ; start menu entries + CreateDirectory "$SMPROGRAMS\Inkscape" + CreateShortCut "$SMPROGRAMS\Inkscape\Inkscape.lnk" "$INSTDIR\inkscape.exe" + CreateShortCut "$SMPROGRAMS\Inkscape\Uninstall Inkscape.lnk" "$INSTDIR\uninst.exe" + + ; uninstall settings + WriteUninstaller "$INSTDIR\uninst.exe" + WriteRegExpandStr SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString" '"$INSTDIR\uninst.exe"' + WriteRegExpandStr SHCTX "${PRODUCT_UNINST_KEY}" "InstallLocation" "$INSTDIR" + WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayName" "${PRODUCT_NAME} ${PRODUCT_VERSION}" + WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\Inkscape.exe,0" + WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" + WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoModify" "1" + WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoRepair" "1" +SectionEnd + +SectionGroupEnd + +; Last the Descriptions +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} $(lng_CoreDesc) + !insertmacro MUI_DESCRIPTION_TEXT ${SecGTK} $(lng_GTKFilesDesc) + !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} $(lng_ShortcutsDesc) + !insertmacro MUI_DESCRIPTION_TEXT ${SecAlluser} $(lng_AlluserDesc) + !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} $(lng_DesktopDesc) + !insertmacro MUI_DESCRIPTION_TEXT ${SecQuicklaunch} $(lng_QuicklaunchDesc) + !insertmacro MUI_DESCRIPTION_TEXT ${SecSVGWriter} $(lng_SVGWriterDesc) + !insertmacro MUI_DESCRIPTION_TEXT ${SecContextMenu} $(lng_ContextMenuDesc) + !insertmacro MUI_DESCRIPTION_TEXT ${SecAddfiles} $(lng_AddfilesDesc) + !insertmacro MUI_DESCRIPTION_TEXT ${SecExamples} $(lng_ExamplesDesc) + !insertmacro MUI_DESCRIPTION_TEXT ${SecTutorials} $(lng_TutorialsDesc) + !insertmacro MUI_DESCRIPTION_TEXT ${SecLanguages} $(lng_LanguagesDesc) +!insertmacro MUI_FUNCTION_DESCRIPTION_END + +!macro Parameter key Section + Push ${key} + Push "" + Call GetParameterValue + Pop $1 + StrCmp $1 "OFF" 0 +5 + SectionGetFlags ${Section} $0 + IntOp $2 ${SF_SELECTED} ~ + IntOp $0 $0 & $2 + SectionSetFlags ${Section} $0 + StrCmp $1 "ON" 0 +4 + SectionGetFlags ${Section} $0 + IntOp $0 $0 | ${SF_SELECTED} + SectionSetFlags ${Section} $0 +!macroend + +Function .onInit + ;Extract InstallOptions INI files + StrCpy $AskMultiUser "1" + StrCpy $MultiUser "0" + ; this resets AskMultiUser if Win95/98/ME + Call GetWindowsVersion + Pop $R0 + DetailPrint "detected operating system $R0" + ;MessageBox MB_OK "operating system: $R0; AskMultiuser: $AskMultiUser" + + ; hide all user section if win98 + StrCmp $AskMultiUser "1" +2 + SectionSetText ${SecAlluser} "" + + ; hide if quick launch if not available + StrCmp $QUICKLAUNCH $TEMP 0 +2 + SectionSetText ${SecQuicklaunch} "" + + ; proccess command line parameter + !insertmacro Parameter "GTK" ${SecGTK} + !insertmacro Parameter "SHORTCUTS" ${secShortcuts} + !insertmacro Parameter "ALLUSER" ${SecAlluser} + !insertmacro Parameter "DESKTOP" ${SecDesktop} + !insertmacro Parameter "QUICKLAUNCH" ${SecQUICKlaunch} + !insertmacro Parameter "SVGEDITOR" ${SecSVGWriter} + !insertmacro Parameter "CONTEXTMENUE" ${SecContextMenu} + !insertmacro Parameter "ADDFILES" ${SecAddfiles} + !insertmacro Parameter "EXAMPLES" ${SecExamples} + !insertmacro Parameter "TUTORIALS" ${SecTutorials} + !insertmacro Parameter "LANGUAGES" ${SecLanguages} + !insertmacro Parameter "am" ${SecAmharic} + !insertmacro Parameter "az" ${SecAzerbaijani} + !insertmacro Parameter "be" ${SecByelorussian} + !insertmacro Parameter "ca" ${SecCatalan} + !insertmacro Parameter "cs" ${SecCzech} + !insertmacro Parameter "da" ${SecDanish} + !insertmacro Parameter "de" ${SecGerman} + !insertmacro Parameter "el" ${SecGreek} + !insertmacro Parameter "es" ${SecSpanish} + !insertmacro Parameter "es_MX" ${SecSpanishMexico} + !insertmacro Parameter "et" ${SecEstonian} + !insertmacro Parameter "fr" ${SecFrench} + !insertmacro Parameter "ga" ${SecIrish} + !insertmacro Parameter "gl" ${SecGallegan} + !insertmacro Parameter "hu" ${SecHungarian} + !insertmacro Parameter "it" ${SecItalian} + !insertmacro Parameter "ja" ${SecJapanese} + !insertmacro Parameter "mk" ${SecMacedonian} + !insertmacro Parameter "nb" ${SecNorwegianBokmal} + !insertmacro Parameter "nl" ${SecDutch} + !insertmacro Parameter "nn" ${SecNorwegianNynorsk} + !insertmacro Parameter "pa" ${SecPanjabi} + !insertmacro Parameter "pl" ${SecPolish} + !insertmacro Parameter "pt" ${SecPortuguese} + !insertmacro Parameter "pt_BR" ${SecPortugueseBrazil} + !insertmacro Parameter "ru" ${SecRussian} + !insertmacro Parameter "sk" ${SecSlovak} + !insertmacro Parameter "sl" ${SecSlovenian} + !insertmacro Parameter "sr" ${SecSerbian} + !insertmacro Parameter "sr@Latn" ${SecSerbianLatin} + !insertmacro Parameter "sv" ${SecSwedish} + !insertmacro Parameter "tr" ${SecTurkish} + !insertmacro Parameter "uk" ${SecUkrainian} + !insertmacro Parameter "zh_CN" ${SecChineseSimplified} + + Push "?" + Push "TEST" + Call GetParameterValue + Pop $1 + StrCmp $1 "TEST" +3 + MessageBox MB_OK "possible parameters for installer:$\r$\n \ + /?: this help screen$\r$\n \ + /S: silent$\r$\n \ + /D=(directory): where to install inkscape$\r$\n \ + /GTK=(OFF/ON): GTK+ Runtime environment$\r$\n \ + /SHORTCUTS=(OFF/ON): shortcuts to start inkscape$\r$\n \ + /ALLUSER=(OFF/ON): for all users on the computer$\r$\n \ + /DESKTOP=(OFF/ON): Desktop icon$\r$\n \ + /QUICKLAUNCH=(OFF/ON): quick launch icon$\r$\n \ + /SVGEDITOR=(OFF/ON): default SVG editor$\r$\n \ + /CONTEXTMENUE=(OFF/ON): context menue integration$\r$\n \ + /ADDFILES=(OFF/ON): additional files$\r$\n \ + /EXAMPLES=(OFF/ON): examples$\r$\n \ + /TUTORIALS=(OFF/ON): tutorials$\r$\n \ + /LANGUAGES=(OFF/ON): translated menues, examples, etc.$\r$\n \ + /[locale code]=(OFF/ON): e.g am, es, es_MX as in Inkscape supported" + Abort +FunctionEnd + +Function .onSelChange +FunctionEnd + +; -------------------------------------------------- + +Function un.CustomPageUninstall + !insertmacro MUI_HEADER_TEXT "$(lng_UInstOpt)" "$(lng_UInstOpt1)" + !insertmacro MUI_INSTALLOPTIONS_WRITE "inkscape.nsi.uninstall" "Field 1" "Text" "$APPDATA\Inkscape\preferences.xml" + !insertmacro MUI_INSTALLOPTIONS_WRITE "inkscape.nsi.uninstall" "Field 2" "Text" "$(lng_PurgePrefs)" + + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "inkscape.nsi.uninstall" + !insertmacro MUI_INSTALLOPTIONS_READ $MultiUser "inkscape.nsi.uninstall" "Field 2" "State" + DetailPrint "keepfiles = $MultiUser" + ;MessageBox MB_OK "adminmode = $MultiUser MultiUserOS = $askMultiUser" + +FunctionEnd + + +Function un.onInit + + StrCpy $askMultiUser "1" + StrCpy $MultiUser "1" + + ; Test if this was a multiuser installation + ReadRegStr $0 HKLM "${PRODUCT_DIR_REGKEY}" "" + StrCmp $0 "$INSTDIR\inkscape.exe" 0 +4 + ReadRegStr $MultiUser HKLM "${PRODUCT_DIR_REGKEY}" "MultiUser" + ReadRegStr $askMultiUser HKLM "${PRODUCT_DIR_REGKEY}" "askMultiUser" + Goto +3 + ReadRegStr $MultiUser HKCU "${PRODUCT_DIR_REGKEY}" "MultiUser" + ReadRegStr $askMultiUser HKCU "${PRODUCT_DIR_REGKEY}" "askMultiUser" + + + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "inkscape.nsi.uninstall" + + ;check whether Multi user installation ? + SetShellVarContext all + StrCmp $MultiUser "0" 0 +2 + SetShellVarContext current + ;MessageBox MB_OK "adminmode = $MultiUser MultiUserOS = $askMultiUser" + +FunctionEnd + +Section Uninstall + + ; remove personal settings + Delete "$APPDATA\Inkscape\extension-errors.log" + StrCmp $MultiUser "0" 0 endPurge ; multiuser assigned in dialog + DetailPrint "purge personal settings in $APPDATA\Inkscape" + RMDir /r "$APPDATA\Inkscape" + endPurge: + + ; Remove file associations for svg editor + DetailPrint "removing file associations for svg editor" + ClearErrors + ReadRegStr $0 HKCR ".svg" "" + DetailPrint ".svg associated as $0" + IfErrors endUninstSVGEdit + ReadRegStr $1 HKCR "$0\shell\edit\command" "" + IfErrors 0 +2 + DetailPrint "svg editor is $1" + StrCmp $1 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3 + DetailPrint "removing default .svg editor" + DeleteRegKey HKCR "$0\shell\edit\command" + DeleteRegKey /ifempty HKCR "$0\shell\edit" + DeleteRegKey /ifempty HKCR "$0\shell" + DeleteRegKey /ifempty HKCR "$0" + endUninstSVGEdit: + + ClearErrors + ReadRegStr $2 HKCR ".svgz" "" + DetailPrint ".svgz associated as $2" + IfErrors endUninstSVGZEdit + ReadRegStr $3 HKCR "$2\shell\edit\command" "" + IfErrors 0 +2 + DetailPrint "svgz editor is $1" + StrCmp $3 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3 + DetailPrint "removing default .svgz editor" + DeleteRegKey HKCR "$2\shell\edit\command" + DeleteRegKey /ifempty HKCR "$2\shell\edit" + DeleteRegKey /ifempty HKCR "$2\shell" + DeleteRegKey /ifempty HKCR "$2" + endUninstSVGZEdit: + + ; Remove file associations for svg editor + DetailPrint "removing file associations for svg editor" + ClearErrors + ReadRegStr $0 HKCR ".svg" "" + IfErrors endUninstSVGView + ReadRegStr $1 HKCR "$0\shell\open\command" "" + IfErrors 0 +2 + DetailPrint "svg viewer is $1" + StrCmp $1 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3 + DetailPrint "removing default .svg viewer" + DeleteRegKey HKCR "$0\shell\open\command" + DeleteRegKey /ifempty HKCR "$0\shell\open" + DeleteRegKey /ifempty HKCR "$0\shell" + DeleteRegKey /ifempty HKCR "$0" + endUninstSVGView: + + ClearErrors + ReadRegStr $2 HKCR ".svgz" "" + IfErrors endUninstSVGZView + ReadRegStr $3 HKCR "$2\shell\open\command" "" + IfErrors 0 +2 + DetailPrint "svgz viewer is $1" + StrCmp $3 '"$INSTDIR\Inkscape.exe" "%1"' 0 +3 + DetailPrint "removing default .svgz viewer" + DeleteRegKey HKCR "$2\shell\open\command" + DeleteRegKey /ifempty HKCR "$2\shell\open" + DeleteRegKey /ifempty HKCR "$2\shell" + DeleteRegKey /ifempty HKCR "$2" + endUninstSVGZView: + + ; Remove file associations for context menue + DetailPrint "removing file associations for svg editor" + ClearErrors + ReadRegStr $0 HKCR ".svg" "" + IfErrors endUninstSVGContext + DetailPrint "removing default .svg context menue" + DeleteRegKey HKCR "$0\shell\${PRODUCT_NAME}" + DeleteRegKey /ifempty HKCR "$0\shell" + DeleteRegKey /ifempty HKCR "$0" + endUninstSVGContext: + + ClearErrors + ReadRegStr $2 HKCR ".svgz" "" + IfErrors endUninstSVGZContext + DetailPrint "removing default .svgzcontext menue" + DeleteRegKey HKCR "$2\shell\${PRODUCT_NAME}" + DeleteRegKey /ifempty HKCR "$2\shell" + DeleteRegKey /ifempty HKCR "$2" + endUninstSVGZContext: + + ReadRegStr $1 HKCR "$0" "" + StrCmp $1 "" 0 +3 + DetailPrint "removing filetype .svg $0" + DeleteRegKey HKCR ".svg" + + ReadRegStr $3 HKCR "$2" "" + StrCmp $3 "" 0 +3 + DetailPrint "removing filetype .svgz $2" + DeleteRegKey HKCR ".svgz" + + + DetailPrint "removing product regkey" + DeleteRegKey SHCTX "${PRODUCT_DIR_REGKEY}" + DetailPrint "removing uninstall info" + DeleteRegKey SHCTX "${PRODUCT_UNINST_KEY}" + + DetailPrint "removing shortcuts" + Delete "$DESKTOP\Inkscape.lnk" + Delete "$QUICKLAUNCH\Inkscape.lnk" + Delete "$SMPROGRAMS\Inkscape\Uninstall Inkscape.lnk" + Delete "$SMPROGRAMS\Inkscape\Inkscape.lnk" + RMDir "$SMPROGRAMS\Inkscape" + + DetailPrint "removing uninstall info" + RMDir /r "$INSTDIR" + + SetAutoClose false + +SectionEnd + diff --git a/packaging/win32/inkscape.nsi.uninstall b/packaging/win32/inkscape.nsi.uninstall new file mode 100644 index 000000000..fde117bca --- /dev/null +++ b/packaging/win32/inkscape.nsi.uninstall @@ -0,0 +1,20 @@ +[Settings] +NumFields=2 + +[Field 1] +Type=label +Text=Display a Message +Left=0 +Right=-1 +Top=10 +Bottom=20 +State=1 + +[Field 2] +Type=checkbox +Text=Display a MessageBox +Left=10 +Right=-1 +Top=25 +Bottom=35 +State=1
\ No newline at end of file |
