bleh
authordarco <darco@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 19 Apr 2005 22:51:44 +0000 (22:51 +0000)
committerdarco <darco@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 19 Apr 2005 22:51:44 +0000 (22:51 +0000)
git-svn-id: http://svn.voria.com/code@22 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/Makefile.am
synfig-studio/trunk/bootstrap
synfig-studio/trunk/config/build.cfg
synfig-studio/trunk/config/configure.ac
synfig-studio/trunk/config/ltmain.patch [new file with mode: 0644]
synfig-studio/trunk/config/package [new file with mode: 0755]
synfig-studio/trunk/macosxbuild.sh [new file with mode: 0755]
synfig-studio/trunk/src/gtkmm/dialog_gradient.cpp
synfig-studio/trunk/src/gtkmm/dockdialog.cpp
synfig-studio/trunk/src/gtkmm/toolbox.cpp

index c1eaf84..a3ce6b2 100644 (file)
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS=dist-zip dist-shar dist-bzip2
 
-MAINTAINERCLEANFILES=config/config.guess config/config.sub config/ltmain.sh config/install-sh config/mkinstalldirs config/aclocal.m4 config/missing config/texinfo.tex config/depcomp aclocal.m4 config.h.in configure stamp-h.in Makefile.in config.log config.status .doc_stamp .DS_Store @PACKAGE_TARNAME@-@VERSION@.spec
+MAINTAINERCLEANFILES=config/package config/ltmain.sh config/config.guess config/config.sub config/ltmain.sh config/install-sh config/mkinstalldirs config/aclocal.m4 config/missing config/texinfo.tex config/depcomp aclocal.m4 config.h.in configure stamp-h.in Makefile.in config.log config.status .doc_stamp .DS_Store @PACKAGE_TARNAME@-@VERSION@.spec
 
 SUBDIRS=images src
 
index fe60751..83e9f41 100755 (executable)
@@ -61,7 +61,7 @@ output Prepairing build environment for $PACKAGE-$VERSION...
 
 # Look for the CVS directory. If we don't find it, we need to
 # ask the user if they know what they are doing.
-test -d CVS ||
+( test -d CVS || test -d .svn ) ||
 {
        echo "
 $BOOTSTRAP_NAME: warning: This shell script is intended for those
index f9ce723..4dedb02 100644 (file)
@@ -1,13 +1,21 @@
 
-PACKAGE_NAME="Synfg Studio"
+PACKAGE_NAME="Synfig Studio"
 PACKAGE_BUGREPORT="darco@voria.com"
 PACKAGE_TARNAME=synfigstudio
 VERSION_MAJ="0"
 VERSION_MIN="61"
 VERSION_REV="00"
-VERSION_REL="1"
+VERSION_REL=`svn info | grep Revision | sed "s/.* \([0123456789]*\)/\1/"`
 
-VERSION=$VERSION_MAJ.$VERSION_MIN.$VERSION_REV
+[ -d CVS ] && VERSION_REL="CVS"
+
+if [ x$VERSION_REL = "x" ] ; then {
+       VERSION=$VERSION_MAJ.$VERSION_MIN.$VERSION_REV
+} else {
+       VERSION=$VERSION_MAJ.$VERSION_MIN.$VERSION_REV-$VERSION_REL
+} ; fi
+
+API_VERSION="0.0"
 
 PACKAGE_VERSION=$VERSION
 PACKAGE=$PACKAGE_TARNAME
index 5281339..0357c90 100755 (executable)
@@ -157,6 +157,7 @@ src/gtkmm/Makefile
 src/sinfgapp/Makefile
 images/Makefile
 win32inst.nsi
+pkg-info/macosx/synfig-studio.info
 )
 
 # -- S U M M A R Y --------------------------------------------
diff --git a/synfig-studio/trunk/config/ltmain.patch b/synfig-studio/trunk/config/ltmain.patch
new file mode 100644 (file)
index 0000000..9d51a5c
--- /dev/null
@@ -0,0 +1,17 @@
+--- ltmain.bak Thu Apr  7 19:12:55 2005
++++ ltmain.sh  Thu Apr  7 19:20:28 2005
+@@ -5362,10 +5362,10 @@
+         # At present, this check doesn't affect windows .dll's that
+         # are installed into $libdir/../bin (currently, that works fine)
+         # but it's something to keep an eye on.
+-        if test "$inst_prefix_dir" = "$destdir"; then
+-          $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+-          exit 1
+-        fi
++#       if test "$inst_prefix_dir" = "$destdir"; then
++#         $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
++#         exit 1
++#       fi
+         if test -n "$inst_prefix_dir"; then
+           # Stick the inst_prefix_dir data into the link command.
diff --git a/synfig-studio/trunk/config/package b/synfig-studio/trunk/config/package
new file mode 100755 (executable)
index 0000000..ae31c14
--- /dev/null
@@ -0,0 +1,292 @@
+#! /bin/csh -ef
+# this file was orignally distributed by Apple in the Developer Tools package 
+#it is distributed under the Apple Open Source License
+set version=0.2
+set prog = `/usr/bin/basename $0`
+set usage = "Usage: $prog [-f] root-dir info-file [tiff-file] [-d dest-dir] [-r resource-dir] [-traditional | -gnutar] [-bzip]"
+set noglob
+
+if (-x /usr/bin/mkbom) then
+    set mkbom=/usr/bin/mkbom
+    set lsbom=/usr/bin/lsbom
+else
+    set mkbom=/usr/etc/mkbom
+    set lsbom=/usr/etc/lsbom
+endif
+
+if (-x /usr/bin/awk) then
+    set awk=/usr/bin/awk
+else
+    set awk=/bin/awk
+endif
+set bzip2=`which bzip2`
+set gnutar=/usr/bin/gnutar
+set tar=/usr/bin/tar
+set pax=/bin/pax
+
+# gather parameters
+if ($#argv == 0) then
+    echo $usage
+    exit(1)
+endif
+unset usebzip
+while ( $#argv > 0 )
+    switch ( $argv[1] )
+       case -d:
+           if ( $?destDir ) then
+               echo ${prog}: dest-dir parameter already set to ${destDir}.
+               echo $usage
+               exit(1)
+           else if ( $#argv < 2 ) then
+               echo ${prog}: -d option requires destination directory.
+               echo $usage
+               exit(1)
+           else
+               set destDir = $argv[2]
+               shift; shift
+               breaksw
+           endif
+       case -f:
+           if ( $?rootDir ) then
+               echo ${prog}: root-dir parameter already set to ${rootDir}.
+               echo $usage
+               exit(1)
+           else if ( $#argv < 2 ) then
+               echo ${prog}: -f option requires package root directory.
+               echo $usage
+               exit(1)
+           else
+               set rootDir = $argv[2]
+               set fflag
+               shift; shift
+               breaksw
+           endif
+       case -r:
+           if ( $?resDir ) then
+               echo ${prog}: resource-dir parameter already set to ${resDir}.
+               echo $usage
+               exit(1)
+           else if ( $#argv < 2 ) then
+               echo ${prog}: -r option requires package resource directory.
+               echo $usage
+               exit(1)
+           else
+               set resDir = $argv[2]
+               shift; shift
+               breaksw
+           endif
+       case -traditional:
+            echo useing standard tar
+           set usetar
+            unset usegnutar
+           unset usepax
+           breaksw
+        case -gnutar:
+           echo using gnutar
+           set usegnutar
+            unset usepax
+           unset usetar
+            shift
+       case -bzip:
+           if (-x $bzip2) then
+               set usebzip
+                echo using bzip compression
+           else
+               echo COMPRESSION ERROR: You can not use BZIP2 you do not have it installed
+               exit(1)
+           endif
+            shift
+            breaksw
+       case -*:
+           echo ${prog}: Unknown option: $argv[1]
+           echo $usage
+           exit(1)
+       case *.info:
+           if ( $?info ) then
+               echo ${prog}: info-file parameter already set to ${info}.
+               echo $usage
+               exit(1)
+           else
+               set info = "$argv[1]"
+               shift
+               breaksw
+           endif
+       case *.tiff:
+           if ( $?tiff ) then
+               echo ${prog}: tiff-file parameter already set to ${tiff}.
+               echo $usage
+               exit(1)
+           else
+               set tiff = "$argv[1]"
+               shift
+               breaksw
+           endif
+       default:
+           if ( $?rootDir ) then
+               echo ${prog}: unrecognized parameter: $argv[1]
+               echo $usage
+               exit(1)
+           else
+               set rootDir = "$argv[1]"
+               shift
+               breaksw
+           endif
+    endsw
+end
+
+# check for mandatory parameters
+if ( ! $?rootDir ) then
+    echo ${prog}: missing root-dir parameter.
+    echo $usage
+    exit(1)
+else if ( ! $?info) then
+    echo ${prog}: missing info-file parameter.
+    echo $usage
+    exit(1)
+endif
+
+# destDir gets default value if unset on command line
+if ( $?destDir ) then
+    /bin/mkdir -p $destDir
+else
+    set destDir = .
+endif
+
+# derive the root name for the package from the root name of the info file
+set root = `/usr/bin/basename $info .info`
+
+# create package directory
+set pkg = ${destDir}/${root}.pkg
+echo Generating Installer package $pkg ...
+if ( -e $pkg ) /bin/rm -rf $pkg
+/bin/mkdir -p -m 755 $pkg
+/bin/mkdir -p -m 755 $pkg/Contents
+/bin/mkdir -p -m 755 $pkg/Contents/Resources
+/bin/mkdir -p -m 755 $pkg/Contents/Resources/English.lproj/
+echo "gxpmpkg2" >$pkg/Contents/PkgInfo
+chmod 755 $pkg/Contents/PkgInfo
+# (gnu)tar/pax and compress root directory to package archive
+echo -n "      creating package archive ... "
+if ( $?fflag ) then
+    set pkgTop = ${rootDir:t}
+    set parent = ${rootDir:h}
+    if ( "$parent" == "$pkgTop" ) set parent = "."
+else
+    set parent = $rootDir
+    set pkgTop = .    
+endif
+if ( $?usetar ) then
+    set pkgArchive = $pkg/Contents/Resources/$root.tar.Z
+    (cd $parent; $tar -w $pkgTop) | /usr/bin/tar -f -c > $pkgArchive
+else if ( $?usegnutar ) then
+     if ( $?usebzip ) then
+         set pkgArchive = $pkg/Contents/Resources/$root.tar.bz2
+         (cd $parent; $gnutar c $pkgTop) | $bzip2 -f -c > $pkgArchive
+     else 
+          set pkgArchive = $pkg/Contents/Resources/$root.tar.gz
+          (cd $parent; $gnutar zcf $pkgArchive $pkgTop)
+     endif
+else
+    set pkgArchive = $pkg/Contents/Resources/$root.pax.gz
+    (cd $parent; $pax -w -z -x cpio $pkgTop) > $pkgArchive
+endif
+/bin/chmod 755 $pkgArchive
+echo done.
+
+# copy info file to package
+set pkgInfo = $pkg/Contents/Resources/English.lproj/$root.info
+echo -n "      copying ${info:t} ... "
+/bin/cp $info $pkgInfo
+/bin/chmod 755 $pkgInfo
+echo done.
+
+# copy tiff file to package
+if ( $?tiff ) then
+    set pkgTiff = $pkg/$root.tiff
+    echo -n "  copying ${tiff:t} ... "
+    /bin/cp $tiff $pkgTiff
+    /bin/chmod 444 $pkgTiff
+    echo done.
+endif
+
+# copy resources to package
+if ( $?resDir ) then
+    echo -n "  copying ${resDir:t} ... "
+
+    # don't want to see push/pop output
+    pushd $resDir > /dev/null
+       # get lists of resources. We'll want to change
+       # permissions on just these things later.
+        set directoriesInResDir = `find . -type d | grep -v -e .svn -e CVS`
+        set filesInResDir = `find . -type f`
+    popd > /dev/null
+
+    # copy the resource directory contents into the package directory
+    foreach resFile (`cd $resDir && find . | grep -v -e .svn -e CVS`)
+       cp -r "$resDir/$resFile" "$pkg/Contents/Resources"
+    end
+
+    pushd $pkg/Contents/Resources > /dev/null
+       # Change all directories to +r+x, except the package
+       # directory itself
+        foreach resFileItem ($directoriesInResDir)
+            if ( $resFileItem != "." ) then
+                chmod 755 "$resFileItem"
+            endif
+        end
+       # change all flat files to read only
+        foreach resFileItem ($filesInResDir)
+            if ( $resFileItem != "./.DS_Store" ) then
+            chmod 755 "$resFileItem"
+           endif
+        end
+    popd > /dev/null
+
+    echo done.
+endif
+
+# generate bom file
+set pkgBom = $pkg/Contents/Resources/$root.bom
+echo -n "      generating bom file ... "
+/bin/rm -f $pkgBom
+if ( $?fflag ) then
+    $mkbom $parent $pkgBom >& /dev/null
+else
+    $mkbom $rootDir $pkgBom >& /dev/null
+endif
+/bin/chmod 444 $pkgArchive
+echo done.
+       
+# generate sizes file
+set pkgSizes = $pkg/Contents/Resources/$root.sizes
+echo -n "      generating sizes file ... "
+
+# compute number of files in package
+set numFiles = `$lsbom -s $pkgBom | /usr/bin/wc -l`
+
+# compute package size when compressed
+@ compressedSize = `/usr/bin/du -k -s $pkg | $awk '{print $1}'`
+@ compressedSize += 3          # add 1KB each for sizes, location, status files
+
+@ infoSize = `/bin/ls -s $pkgInfo | $awk '{print $1}'`
+@ bomSize = `/bin/ls -s $pkgBom | $awk '{print $1}'`
+if ( $?tiff ) then
+    @ tiffSize = `/bin/ls -s $pkgTiff | $awk '{print $1}'`
+else
+    @ tiffSize = 0
+endif 
+
+@ installedSize = `/usr/bin/du -k -s $rootDir | $awk '{print $1}'`
+@ installedSize += $infoSize + $bomSize + $tiffSize + 3
+
+# echo size parameters to sizes file
+echo NumFiles $numFiles             >  $pkgSizes
+echo InstalledSize $installedSize   >> $pkgSizes
+echo CompressedSize $compressedSize >> $pkgSizes
+echo done.
+echo " ... finished generating $pkg."
+
+exit(0)
+
+# end package
+       
diff --git a/synfig-studio/trunk/macosxbuild.sh b/synfig-studio/trunk/macosxbuild.sh
new file mode 100755 (executable)
index 0000000..d03be84
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+#OPTIONS="--disable-optimization --enable-debug"
+
+OPTIONS=""
+#OPTIONS="$OPTIONS --enable-timelimit=120"
+OPTIONS="$OPTIONS --enable-optimization=2"
+#OPTIONS="$OPTIONS --enable-optimization=3 --enable-g5opt"
+#OPTIONS="$OPTIONS --disable-optimization"
+OPTIONS="$OPTIONS --disable-debug"
+
+BUILDDIR=macosxbuild
+
+[ -e configure ] || ./bootstrap || exit 1
+
+ [ -d $BUILDDIR ] && rm -fr $BUILDDIR
+
+mkdir $BUILDDIR
+
+cd $BUILDDIR
+
+../configure $OPTIONS || exit 1
+
+make -j2
+#make package
+
+#make installer
+
+
index e65c4fa..5a3b0a7 100644 (file)
@@ -63,7 +63,12 @@ Dialog_Gradient::Dialog_Gradient():
        dialog_settings(this,"gradient"),
        adjustment_pos(0,0.0,1.0,0.001,0.001,0.001)
 {
-       set_type_hint(Gdk::WINDOW_TYPE_HINT_UTILITY);
+       set_type_hint(Gdk::WINDOW_TYPE_HINT_DIALOG);
+       set_keep_below(true);
+       set_keep_above(false);
+
+       set_role("gradient_editor");
+       
        // Setup the buttons
        Gtk::Button *grab_button(manage(new class Gtk::Button(Gtk::StockID("Grab"))));
        grab_button->show();
index 98034d3..62ff671 100644 (file)
@@ -58,11 +58,13 @@ using namespace studio;
 
 /* === M A C R O S ========================================================= */
 
-#define GRAB_HINT_DATA(y)      { \
+#define GRAB_HINT_DATA(y,default)      { \
                String x; \
                if(sinfgapp::Main::settings().get_value(String("pref.")+y+"_hints",x)) \
                { \
                        set_type_hint((Gdk::WindowTypeHint)atoi(x.c_str()));    \
+               } else {\
+                       set_type_hint(default); \
                } \
        }
 
@@ -86,10 +88,21 @@ DockDialog::DockDialog():
        // Give ourselves an ID that is most likely unique
        set_id(sinfg::UniqueID().get_uid()^reinterpret_cast<int>(this));
        
+       set_role(strprintf("dock_dialog_%d",get_id()));
+       GRAB_HINT_DATA(
+               "dock_dialog",
+#ifdef __APPLE__
+               Gdk::WINDOW_TYPE_HINT_NORMAL
+#else
+               Gdk::WINDOW_TYPE_HINT_UTILITY
+#endif
+       );
+       set_keep_below(true);
+       set_keep_above(false);
+       
        // Set up the window
        //set_type_hint(Gdk::WINDOW_TYPE_HINT_UTILITY);
        set_title("Dock Dialog");
-       GRAB_HINT_DATA("dock_dialog");
        
        // Register with the dock manager
        App::dock_manager->dock_dialog_list_.push_back(this);
@@ -115,6 +128,7 @@ DockDialog::DockDialog():
 
        add_accel_group(App::ui_manager()->get_accel_group());
        App::signal_present_all().connect(sigc::mem_fun(*this,&DockDialog::present));
+
 }
 
 DockDialog::~DockDialog()
index 2b03fa6..2aea790 100644 (file)
@@ -84,11 +84,13 @@ using namespace SigC;
 
 /* === M A C R O S ========================================================= */
 
-#define GRAB_HINT_DATA(y)      { \
+#define GRAB_HINT_DATA(y,default)      { \
                String x; \
                if(sinfgapp::Main::settings().get_value(String("pref.")+y+"_hints",x)) \
                { \
-                       set_type_hint((Gdk::WindowTypeHint)atoi(x.c_str())); \
+                       set_type_hint((Gdk::WindowTypeHint)atoi(x.c_str()));    \
+               } else {\
+                       set_type_hint(default); \
                } \
        }
 
@@ -188,6 +190,20 @@ Toolbox::Toolbox():
        Gtk::Window(Gtk::WINDOW_TOPLEVEL),
        dialog_settings(this,"toolbox")
 {
+       GRAB_HINT_DATA(
+               "toolbox",
+#ifdef __APPLE__
+               Gdk::WINDOW_TYPE_HINT_NORMAL
+#else
+               Gdk::WINDOW_TYPE_HINT_UTILITY
+#endif
+       );
+       set_keep_below(true);
+       set_keep_above(false);
+       set_role("toolbox");
+
+
+
        recent_files_menu= manage(new class Gtk::Menu());
        
        Gtk::Menu       *filemenu       =manage(new class Gtk::Menu());
@@ -357,7 +373,7 @@ Toolbox::Toolbox():
        
        changing_state_=false;
        
-       GRAB_HINT_DATA("toolbox");
+
        add_accel_group(App::ui_manager()->get_accel_group());
        
        App::signal_present_all().connect(sigc::mem_fun(*this,&Toolbox::present));