[gedit] Cleanup the installer scripts.



commit a63e44bdf646a07fa20ec23197464ef917a4b587
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Sun Sep 13 03:03:41 2009 +0200

    Cleanup the installer scripts.
    
    Make the installer scripts more dynamic, now you can configure the
    paths and they are easier to maintain.

 win32/build-installer |  296 ++++++++++++++++++++++++++-----------------------
 win32/gedit.iss.in    |  142 ++----------------------
 2 files changed, 167 insertions(+), 271 deletions(-)
---
diff --git a/win32/build-installer b/win32/build-installer
index a5f07ef..ca093e9 100755
--- a/win32/build-installer
+++ b/win32/build-installer
@@ -3,6 +3,35 @@ echo "You need to execute this on a Windows machine within msys (http://www.ming
 echo "You also need InnoSetup (http://www.innosetup.org) with iscc in your PATH"
 echo "You need to have python, pygobject, pycairo and pygtk installed into C:\\Python25"
 echo "Make sure gedit and all its dependencies have been installed correctly to /local"
+echo "You can specify the paths by yourself:"
+echo "./build-installer.sh VERSION GTK_PREFIX GEDIT_PREFIX GTKSOURCEVIEW_PREFIX PYTHON_PREFIX MISC_PREFIX"
+
+# we assume glib, gtk etc were installed in the root while gedit and gtksourceview
+# in /local
+#FIXME we need to figure out a way for autodetecting this
+if test "$#" = 6; then
+  _gtk_prefix="$2"
+  _gtksourceview_prefix="$3"
+  _gedit_prefix="$4"
+  _python_prefix="$5"
+  _misc_prefix="$6"
+else
+  _gtk_prefix="/c/gtk"
+  _gtksourceview_prefix="/usr/local"
+  _gedit_prefix="/usr/local"
+  _python_prefix="/c/Python25"
+  _misc_prefix="/usr"
+fi
+
+if test "$1" = '--help'; then
+  echo "VERSION: The version of the installer"
+  echo "GTK_PREFIX: The path for gtk, by default /c/gtk"
+  echo "GEDIT_PREFIX: The path for gedit, by default /usr/local"
+  echo "GTKSOURCEVIEW_PREFIX: The path for gtksourceview, by default /usr/local"
+  echo "PYTHON_PREFIX: The path for python, by default /c/Python25"
+  echo "MISC_PREFIX: The path for the rest of dependencies: i.e: enchant: by default /usr"
+  exit
+fi
 
 revision=$1
 if test "$revision" = ''; then
@@ -10,9 +39,6 @@ if test "$revision" = ''; then
   revision=1
 fi
 
-# TODO: Let configure replace @pyexecdir@ to get the correct python path?
-PYTHONDIR=/c/Python25
-
 echo "Cleanup..."
 if test -e installer; then
   rm installer -Rf || exit;
@@ -21,71 +47,84 @@ fi
 mkdir -p installer || exit
 
 echo "Copying the docs..."
-mkdir -p installer/share/doc || exit
-cp ../COPYING installer/share/doc || exit
-cp ../AUTHORS installer/share/doc || exit
-cp ../README installer/share/doc || exit
-
-echo "Copying DLL files..."
+mkdir -p installer/gedit/share/doc || exit
+cp ../COPYING installer/gedit/share/doc || exit
+cp ../AUTHORS installer/gedit/share/doc || exit
+cp ../README installer/gedit/share/doc || exit
 
-mkdir -p installer/bin
+echo "Copying gtk DLL files..."
 
-#cp /local/bin/libintl-8.dll installer/bin || exit
-cp /bin/libgettextpo-0.dll installer/bin || exit
-# TODO: There are no usable libxslt Windows binaries, therefore I built this myself:
-#cp /local/bin/libxslt-1.dll installer/bin || exit
+#----------------------------- gtk ------------------------------------
+mkdir -p installer/gtk/bin
 
-cp /bin/libglib-2.0-0.dll installer/bin || exit
-cp /bin/libgio-2.0-0.dll installer/bin || exit
-cp /bin/libgmodule-2.0-0.dll installer/bin || exit
-cp /bin/libgobject-2.0-0.dll installer/bin || exit
-cp /bin/libgthread-2.0-0.dll installer/bin || exit
+cp "${_gtk_prefix}/bin/libglib-2.0-0.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libgio-2.0-0.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libgmodule-2.0-0.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libgobject-2.0-0.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libgthread-2.0-0.dll" installer/gtk/bin || exit
 
 # TODO: We can probably omit these, as we do not use g_spawn on Windows anymore
-cp /bin/gspawn-win32-helper.exe installer/bin || exit
-cp /bin/gspawn-win32-helper-console.exe installer/bin || exit
+cp "${_gtk_prefix}/bin/gspawn-win32-helper.exe" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/gspawn-win32-helper-console.exe" installer/gtk/bin || exit
+
+cp "${_gtk_prefix}/bin/libatk-1.0-0.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libcairo-2.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libpng12-0.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libjpeg-7.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libtiff-3.dll" installer/gtk/bin || exit
 
-cp /bin/libatk-1.0-0.dll installer/bin || exit
-cp /bin/libcairo-2.dll installer/bin || exit
-cp /bin/libpng12-0.dll installer/bin || exit
-cp /bin/jpeg62.dll installer/bin || exit
-cp /bin/libtiff3.dll installer/bin || exit
+cp "${_gtk_prefix}/bin/libpango-1.0-0.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libpangocairo-1.0-0.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libpangowin32-1.0-0.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libpangoft2-1.0-0.dll" installer/gtk/bin || exit
 
-cp /bin/libpango-1.0-0.dll installer/bin || exit
-cp /bin/libpangocairo-1.0-0.dll installer/bin || exit
-cp /bin/libpangowin32-1.0-0.dll installer/bin || exit
+cp "${_gtk_prefix}/bin/libgdk-win32-2.0-0.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libgdk_pixbuf-2.0-0.dll" installer/gtk/bin || exit
 
-cp /bin/libgdk-win32-2.0-0.dll installer/bin || exit
-cp /bin/libgdk_pixbuf-2.0-0.dll installer/bin || exit
+cp "${_gtk_prefix}/bin/libgtk-win32-2.0-0.dll" installer/gtk/bin || exit
 
-cp /bin/libgtk-win32-2.0-0.dll installer/bin || exit
-cp /local/bin/libgtksourceview-2.0-0.dll installer/bin || exit
+cp "${_gtk_prefix}/bin/libgailutil-18.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libfontconfig-1.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/libexpat-1.dll" installer/gtk/bin || exit
+cp "${_gtk_prefix}/bin/freetype6.dll" installer/gtk/bin || exit
 
-cp /bin/libORBit-2-0.dll installer/bin || exit
-cp /bin/libORBitCosNaming-2-0.dll installer/bin || exit
-cp /bin/libORBit-imodule-2-0.dll installer/bin || exit
+echo "Stripping DLL files..."
+strip installer/gtk/bin/*.dll || exit
+strip installer/gtk/bin/*.exe || exit
+
+#Copy zlib1 after stripping, as we strip this library it makes crash gedit
+cp "${_gtk_prefix}/bin/zlib1.dll" installer/gtk/bin || exit
+
+#-------------------------------- gedit ------------------------------------
+echo "Copying misc DLL files..."
+mkdir -p installer/gedit/bin
 
-cp /bin/libgconf-2-4.dll installer/bin || exit
+cp "${_misc_prefix}/bin/libgettextpo-0.dll" installer/gedit/bin || exit
 
-cp /bin/libgailutil-18.dll installer/bin || exit
+cp "${_misc_prefix}/bin/libORBit-2-0.dll" installer/gedit/bin || exit
+cp "${_misc_prefix}/bin/libORBitCosNaming-2-0.dll" installer/gedit/bin || exit
+cp "${_misc_prefix}/bin/libORBit-imodule-2-0.dll" installer/gedit/bin || exit
 
-cp /bin/libenchant.dll installer/bin || exit
-cp /bin/libsoup-2.4-1.dll installer/bin || exit
+cp "${_misc_prefix}/bin/libgconf-2-4.dll" installer/gedit/bin || exit
+
+cp "${_misc_prefix}/bin/libenchant.dll" installer/gedit/bin || exit
+cp "${_misc_prefix}/bin/libsoup-2.4-1.dll" installer/gedit/bin || exit
+
+cp "${_gtksourceview_prefix}/bin/libgtksourceview-2.0-0.dll" installer/gedit/bin || exit
 
 echo "Stripping DLL files..."
-strip installer/bin/*.dll || exit
-strip installer/bin/*.exe || exit
+strip installer/gedit/bin/*.dll || exit
+
 
 # stripping libxml2.dll renders it unusable (although not changing it in size).
 # We therefore copy it after having stripped the rest. Same with the other DLLs
 # here. Perhaps those were built with MSVC.
-cp /bin/libxml2.dll installer/bin || exit
-cp /bin/intl.dll installer/bin || exit
-cp /bin/iconv.dll installer/bin || exit
-cp /bin/zlib1.dll installer/bin || exit
+cp "${_misc_prefix}/bin/libxml2-2.dll" installer/gedit/bin || exit
+cp "${_misc_prefix}/bin/intl.dll" installer/gedit/bin || exit
+cp "${_misc_prefix}/bin/iconv.dll" installer/gedit/bin || exit
 
 #FIXME: We have to build with Python
-echo "Copying Python..."
+#echo "Copying Python..."
 
 # TODO: Find out Windows directory somehow, perhaps by looking at PATH?
 #cp /c/WINDOWS/system32/python25.dll installer/bin || exit
@@ -94,144 +133,127 @@ echo "Copying Python..."
 #mkdir -p installer/python || exit
 
 # TODO: Perhaps some scripts need more python modules.
-#cp $PYTHONDIR/Lib/*.py installer/python || exit
+#cp ${_python_prefix}/Lib/*.py installer/python || exit
 
 #mkdir -p installer/python/encodings || exit
-#cp $PYTHONDIR/Lib/encodings/*.py installer/python/encodings || exit
+#cp ${_python_prefix}/Lib/encodings/*.py installer/python/encodings || exit
 
-#cp $PYTHONDIR/Lib/site-packages/glom.pyd installer/python || exit
+#cp ${_python_prefix}/Lib/site-packages/glom.pyd installer/python || exit
 #strip installer/python/glom.pyd || exit
-#cp $PYTHONDIR/Lib/site-packages/gtk-2.0/gda.pyd installer/python || exit
+#cp ${_python_prefix}/Lib/site-packages/gtk-2.0/gda.pyd installer/python || exit
 #strip installer/python/gda.pyd || exit
 
-#cp $PYTHONDIR/Lib/site-packages/pygtk.py installer/python || exit
-#cp $PYTHONDIR/Lib/site-packages/gtk-2.0/*.pyd installer/python || exit
+#cp ${_python_prefix}/Lib/site-packages/pygtk.py installer/python || exit
+#cp ${_python_prefix}/Lib/site-packages/gtk-2.0/*.pyd installer/python || exit
 
 #mkdir -p installer/python/gobject || exit
-#cp $PYTHONDIR/Lib/site-packages/gtk-2.0/gobject/*.py installer/python/gobject || exit
-#cp $PYTHONDIR/Lib/site-packages/gtk-2.0/gobject/*.pyd installer/python/gobject || exit
+#cp ${_python_prefix}/Lib/site-packages/gtk-2.0/gobject/*.py installer/python/gobject || exit
+#cp ${_python_prefix}/Lib/site-packages/gtk-2.0/gobject/*.pyd installer/python/gobject || exit
 
 #mkdir -p installer/python/cairo || exit
-#cp $PYTHONDIR/Lib/site-packages/cairo/*.py installer/python/cairo || exit
-#cp $PYTHONDIR/Lib/site-packages/cairo/*.pyd installer/python/cairo || exit
+#cp ${_python_prefix}/Lib/site-packages/cairo/*.py installer/python/cairo || exit
+#cp ${_python_prefix}/Lib/site-packages/cairo/*.pyd installer/python/cairo || exit
 
 #mkdir -p installer/python/gtk || exit
-#cp $PYTHONDIR/Lib/site-packages/gtk-2.0/gtk/*.py installer/python/gtk || exit
-#cp $PYTHONDIR/Lib/site-packages/gtk-2.0/gtk/*.pyd installer/python/gtk || exit
+#cp ${_python_prefix}/Lib/site-packages/gtk-2.0/gtk/*.py installer/python/gtk || exit
+#cp ${_python_prefix}/Lib/site-packages/gtk-2.0/gtk/*.pyd installer/python/gtk || exit
 
 echo "Copying modules..."
 
-#cp $PYTHONDIR/Lib/site-packages/glom.pyd installer/bin || exit
-#cp $PYTHONDIR/Lib/site-packages/gtk-2.0/gda.pyd installer/bin || exit
+#cp ${_python_prefix}/Lib/site-packages/glom.pyd installer/bin || exit
+#cp ${_python_prefix}/Lib/site-packages/gtk-2.0/gda.pyd installer/bin || exit
 #strip installer/bin/*.pyd || exit
 
-mkdir -p installer/lib/gtk-2.0/2.10.0/immodules || exit
-cp /lib/gtk-2.0/2.10.0/immodules/*.dll installer/lib/gtk-2.0/2.10.0/immodules || exit
-strip installer/lib/gtk-2.0/2.10.0/immodules/*.dll || exit
-cp /bin/gtk-query-immodules-2.0.exe installer/bin || exit
+cp "${_gtk_prefix}/bin/gtk-query-immodules-2.0.exe" installer/gtk/bin || exit
 
-mkdir -p installer/lib/gtk-2.0/2.10.0/engines || exit
-cp /lib/gtk-2.0/2.10.0/engines/libwimp.dll installer/lib/gtk-2.0/2.10.0/engines || exit
-strip installer/lib/gtk-2.0/2.10.0/engines/libwimp.dll || exit
+mkdir -p installer/gtk/lib/gtk-2.0/2.10.0/engines || exit
+cp "${_gtk_prefix}/lib/gtk-2.0/2.10.0/engines/libwimp.dll" installer/gtk/lib/gtk-2.0/2.10.0/engines || exit
+strip installer/gtk/lib/gtk-2.0/2.10.0/engines/libwimp.dll || exit
 
-mkdir -p installer/lib/gtk-2.0/2.10.0/loaders || exit
-cp /lib/gtk-2.0/2.10.0/loaders/*.dll installer/lib/gtk-2.0/2.10.0/loaders || exit
-strip installer/lib/gtk-2.0/2.10.0/loaders/*.dll || exit
-cp /bin/gdk-pixbuf-query-loaders.exe installer/bin || exit
+mkdir -p installer/gtk/lib/gtk-2.0/2.10.0/loaders || exit
+cp "${_gtk_prefix}/lib/gtk-2.0/2.10.0/loaders/"*.dll installer/gtk/lib/gtk-2.0/2.10.0/loaders || exit
+strip installer/gtk/lib/gtk-2.0/2.10.0/loaders/*.dll || exit
+cp "${_gtk_prefix}/bin/gdk-pixbuf-query-loaders.exe" installer/gtk/bin || exit
 
 # Gail
-mkdir -p installer/lib/gtk-2.0/modules || exit
-cp /lib/gtk-2.0/modules/libgail.dll installer/lib/gtk-2.0/modules || exit
-strip installer/lib/gtk-2.0/modules/libgail.dll
+mkdir -p installer/gtk/lib/gtk-2.0/modules || exit
+cp "${_gtk_prefix}/lib/gtk-2.0/modules/libgail.dll" installer/gtk/lib/gtk-2.0/modules || exit
+strip installer/gtk/lib/gtk-2.0/modules/libgail.dll
 
 # TODO: Can we omit this?
-mkdir -p installer/etc/gtk-2.0
-cp /etc/gtk-2.0/gtk.immodules installer/etc/gtk-2.0 || exit -1
-cp /etc/gtk-2.0/gdk-pixbuf.loaders installer/etc/gtk-2.0 || exit -1
+mkdir -p installer/gtk/etc/gtk-2.0
+#cp "${_gtk_prefix}/etc/gtk-2.0/gtk.immodules" installer/etc/gtk-2.0 || exit -1
+cp "${_gtk_prefix}/etc/gtk-2.0/gdk-pixbuf.loaders" installer/gtk/etc/gtk-2.0 || exit -1
 
-mkdir -p installer/share/themes || exit
-cp -R /share/themes/MS-Windows installer/share/themes || exit
-mkdir -p installer/etc/gtk-2.0 || exit
-echo "gtk-theme-name = \"MS-Windows\"" > installer/etc/gtk-2.0/gtkrc || exit
+mkdir -p installer/gtk/share/themes || exit
+cp -R "${_gtk_prefix}/share/themes/MS-Windows" installer/gtk/share/themes || exit
+mkdir -p installer/gtk/etc/gtk-2.0 || exit
+echo "gtk-theme-name = \"MS-Windows\"" > installer/gtk/etc/gtk-2.0/gtkrc || exit
 
 # Enchant
-mkdir -p installer/lib/enchant || exit
-cp /lib/enchant/* installer/lib/enchant || exit
-strip installer/lib/enchant/*.dll || exit
-mkdir -p installer/share/enchant || exit
-cp /share/enchant/* installer/share/enchant || exit
+mkdir -p installer/gedit/lib/enchant || exit
+cp "${_misc_prefix}/lib/enchant/"* installer/gedit/lib/enchant || exit
+strip installer/gedit/lib/enchant/*.dll || exit
+mkdir -p installer/gedit/share/enchant || exit
+cp "${_misc_prefix}/share/enchant/"* installer/gedit/share/enchant || exit
 
 # Iso codes
-mkdir -p installer/share/iso-codes || exit
-cp /share/iso-codes/* installer/share/iso-codes || exit
-mkdir -p installer/share/xml/iso-codes || exit
-cp /share/xml/iso-codes/* installer/share/xml/iso-codes || exit
+mkdir -p installer/gedit/share/iso-codes || exit
+cp "${_misc_prefix}/share/iso-codes/"* installer/gedit/share/iso-codes || exit
+mkdir -p installer/gedit/share/xml/iso-codes || exit
+cp "${_misc_prefix}/share/xml/iso-codes/"* installer/gedit/share/xml/iso-codes || exit
 
 echo "Copying locales..."
 
 # We need to keep the locale files from share/locale in share/locale and those
 # from lib/locale in lib/locale:
-cp /share/locale installer/share -R || exit
-cp /local/share/locale installer/share -R || exit
-#cp /lib/locale installer/lib -R || exit
-#cp /gtksourceview/lib/locale installer/lib -R || exit
+mkdir -p installer/locale || exit
+cp "${_gtk_prefix}/share/locale" installer/locale/share -R || exit
+cp "${_gedit_prefix}/share/locale" installer/locale/share -R || exit
+cp "${_misc_prefix}/share/locale" installer/locale/share -R || exit
 
-find installer/share/locale/ -type f | grep -v atk10.mo | grep -v gtk20.mo | grep -v GConf2.mo | grep -v glib20.mo | grep -v gedit.mo | grep -v gtk20.mo | grep -v gtk20-properties.mo | grep -v gtksourceview-2.0.mo | grep -v iso_*.mo | xargs rm
-find installer/share/locale -type d | xargs rmdir -p --ignore-fail-on-non-empty
+find installer/locale/share/locale/ -type f | grep -v atk10.mo | grep -v gtk20.mo | grep -v GConf2.mo | grep -v glib20.mo | grep -v gedit.mo | grep -v gtk20.mo | grep -v gtk20-properties.mo | grep -v gtksourceview-2.0.mo | grep -v iso_*.mo | xargs rm
+find installer/locale/share/locale -type d | xargs rmdir -p --ignore-fail-on-non-empty
 
 echo "Copying executable..."
-cp /local/bin/gedit.exe installer/bin || exit
-strip installer/bin/gedit.exe || exit
+cp "${_gedit_prefix}/bin/gedit.exe" installer/gedit/bin || exit
+strip installer/gedit/bin/gedit.exe || exit
 
 
 echo "Copying shared data (ui files, icons, etc.)..."
 
-mkdir -p installer/share/gtksourceview-2.0 || exit
-cp -R /local/share/gtksourceview-2.0/language-specs installer/share/gtksourceview-2.0 || exit
-cp -R /local/share/gtksourceview-2.0/styles installer/share/gtksourceview-2.0 || exit
+mkdir -p installer/gedit/share/gtksourceview-2.0 || exit
+cp -R "${_gtksourceview_prefix}/share/gtksourceview-2.0/language-specs" installer/gedit/share/gtksourceview-2.0 || exit
+cp -R "${_gtksourceview_prefix}/share/gtksourceview-2.0/styles" installer/gedit/share/gtksourceview-2.0 || exit
 
 #GtkBuilder files and xml files
-mkdir -p installer/share/gedit-2/ui || exit
-cp /local/share/gedit-2/ui/* installer/share/gedit-2/ui || exit
+mkdir -p installer/gedit/share/gedit-2/ui || exit
+cp "${_gedit_prefix}/share/gedit-2/ui/"* installer/gedit/share/gedit-2/ui || exit
 
 #Icons & logo
-mkdir -p installer/share/gedit-2/icons || exit
-cp /local/share/gedit-2/icons/gedit-plugin.png installer/share/gedit-2/icons || exit
-mkdir -p installer/share/gedit-2/logo || exit
-cp /local/share/gedit-2/logo/gedit-logo.png installer/share/gedit-2/logo || exit
+mkdir -p installer/gedit/share/gedit-2/icons || exit
+cp "${_gedit_prefix}/share/gedit-2/icons/gedit-plugin.png" installer/gedit/share/gedit-2/icons || exit
+mkdir -p installer/gedit/share/gedit-2/logo || exit
+cp "${_gedit_prefix}/share/gedit-2/logo/gedit-logo.png" installer/gedit/share/gedit-2/logo || exit
 
 #Plugins
-mkdir -p installer/share/gedit-2/plugins || exit
-cp -R /local/share/gedit-2/plugins/* installer/share/gedit-2/plugins || exit
-mkdir -p installer/lib/gedit-2/plugins || exit
-cp -R /local/lib/gedit-2/plugins/* installer/lib/gedit-2/plugins || exit
-mkdir -p installer/lib/gedit-2/plugin-loaders || exit
-cp -R /local/lib/gedit-2/plugin-loaders/* installer/lib/gedit-2/plugin-loaders || exit
+mkdir -p installer/gedit/share/gedit-2/plugins || exit
+cp -R "${_gedit_prefix}/share/gedit-2/plugins/"* installer/gedit/share/gedit-2/plugins || exit
+mkdir -p installer/gedit/lib/gedit-2/plugins || exit
+cp -R "${_gedit_prefix}/lib/gedit-2/plugins/"* installer/gedit/lib/gedit-2/plugins || exit
+mkdir -p installer/gedit/lib/gedit-2/plugin-loaders || exit
+cp -R "${_gedit_prefix}/lib/gedit-2/plugin-loaders/"* installer/gedit/lib/gedit-2/plugin-loaders || exit
 
 #GConf
-mkdir -p installer/etc/gconf/schemas || exit
-cp /local/etc/gconf/schemas/gedit* installer/etc/gconf/schemas || exit
-mkdir -p installer/etc/gconf/2 || exit
-cp /etc/gconf/2/* installer/etc/gconf/2 || exit
-mkdir -p installer/etc/gconf/gconf.xml.defaults || exit
-cp -R /etc/gconf/gconf.xml.defaults/* installer/etc/gconf/gconf.xml.defaults || exit
-mkdir -p installer/etc/gconf/gconf.xml.mandatory || exit
-cp -R /etc/gconf/gconf.xml.mandatory/ installer/etc/gconf/ || exit
-mkdir -p installer/lib/GConf/2 || exit
-cp /lib/GConf/2/* installer/lib/GConf/2 || exit
-strip installer/lib/GConf/2/*.dll || exit
-mkdir -p installer/libexec || exit
-cp /libexec/gconfd-2.exe installer/libexec || exit
-
-#Icons
-mkdir -p installer/share/icons || exit
-cp -R /share/icons/* installer/share/icons || exit
-
-# This is used for the glom icon in the initial dialog. I'm not sure why GTK
-# does not already get it from the icons/ directory, but it took me already
-# long enough to figure out that this works:
-#mkdir -p installer/share/pixmaps
-#cp /local/share/icons/hicolor/16x16/apps/gedit.png installer/share/pixmaps || exit
+mkdir -p installer/gedit/etc/gconf/schemas || exit
+cp "${_gedit_prefix}/etc/gconf/schemas/"* installer/gedit/etc/gconf/schemas || exit
+mkdir -p installer/gedit/etc/gconf/2 || exit
+cp -R /etc/gconf/2/* installer/gedit/etc/gconf/2 || exit
+mkdir -p installer/gedit/lib/GConf/2
+cp "${_misc_prefix}/lib/GConf/2/"* installer/gedit/lib/GConf/2 || exit
+strip installer/gedit/lib/GConf/2/*.dll || exit
+mkdir -p installer/gedit/libexec || exit
+cp "${_misc_prefix}/libexec/gconfd-2.exe" installer/gedit/libexec || exit
 
 echo "Creating installer..."
 
diff --git a/win32/gedit.iss.in b/win32/gedit.iss.in
index 9b5f969..4ded6df 100644
--- a/win32/gedit.iss.in
+++ b/win32/gedit.iss.in
@@ -9,15 +9,15 @@ AppPublisher=GNOME
 AppPublisherURL=http:\\www.gedit.org\
 AppVersion= VERSION@
 OutputBaseFilename=gedit-setup- VERSION@-INSTALLERREVISION
-LicenseFile=share\doc\COPYING
+LicenseFile=gedit\share\doc\COPYING
 
 [Components]
 Name: "gtk"; Description: "GTK+ runtime environment"; Types: full compact custom; Flags: fixed
-Name: "python"; Description: "Python runtime and modules"; Types: full compact custom; Flags: fixed
 Name: "main"; Description: "Gedit"; Types: full compact custom; Flags: fixed
-Name: "locale"; Description: "Translations"; Types: full compact custom; Flags: fixed
 
-; TODO: Enable languages separately
+; TODO: Add python support and Enable languages separately
+Name: "python"; Description: "Python runtime and modules"; Types: full compact custom; Flags: fixed
+Name: "locale"; Description: "Translations"; Types: full compact custom; Flags: fixed
 
 [Tasks]
 Name: common; Description: "For all users"; Components: main; Flags: exclusive
@@ -38,117 +38,10 @@ Name: "{userprograms}\{groupname}\Uninstall gedit"; Filename: "{uninstallexe}";
 
 [Files]
 
-; Docs
-Source: "share\doc\COPYING"; DestDir: "{app}\share\doc"; Components: main
-Source: "share\doc\README"; DestDir: "{app}\share\doc"; Components: main
-Source: "share\doc\AUTHORS"; DestDir: "{app}\share\doc"; Components: main
-
-; GTK+
-Source: "bin\intl.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\iconv.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\zlib1.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libpng12-0.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\jpeg62.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libtiff3.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libxml2.dll"; DestDir: "{app}\bin"; Components: gtk
-;Source: "bin\libxslt-1.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libglib-2.0-0.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libgobject-2.0-0.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libgio-2.0-0.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libgmodule-2.0-0.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libgthread-2.0-0.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\gspawn-win32-helper.exe"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\gspawn-win32-helper-console.exe"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libatk-1.0-0.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libpango-1.0-0.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libpangocairo-1.0-0.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libpangowin32-1.0-0.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libcairo-2.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libgdk-win32-2.0-0.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libgtk-win32-2.0-0.dll"; DestDir: "{app}\bin"; Components: gtk
-Source: "bin\libgailutil-18.dll"; DestDir: "{app}\bin"; Components: gtk
-
-; Other gedit dependency DLLs
-Source: "bin\libORBit-2-0.dll"; DestDir: "{app}\bin"; Components: main
-Source: "bin\libORBit-imodule-2-0.dll"; DestDir: "{app}\bin"; Components: main
-Source: "bin\libORBitCosNaming-2-0.dll"; DestDir: "{app}\bin"; Components: main
-Source: "bin\libgconf-2-4.dll"; DestDir: "{app}\bin"; Components: main
-Source: "bin\libgettextpo-0.dll"; DestDir: "{app}\bin"; Components: main
-Source: "bin\libgtksourceview-2.0-0.dll"; DestDir: "{app}\bin"; Components: main
-Source: "lib\GConf\2\*.dll"; DestDir: "{app}\lib\GConf\2"; Components: main
-Source: "bin\libenchant.dll"; DestDir: "{app}\bin"; Components: main
-Source: "bin\libsoup-2.4-1.dll"; DestDir: "{app}\bin"; Components: main
-
-; Python modules
-;Source: "bin\python25.dll"; DestDir: "{app}\bin"; Components: python
-; TODO: I would like to install these into python\ instead of \bin, but I
-; could not get python to locate them there (setting PYTHONPATH with setenv()
-; in Glom's main() does not work).
-; TODO: Change component of gda.pyd and glom.pyd to main instead of python
-; since we also need these when the user installed python and pygtk on its own.
-;Source: "python\*.py"; DestDir: "{app}\bin"; Components: python; Flags: recursesubdirs
-;Source: "python\*.pyd"; DestDir: "{app}\bin"; Components: python; Flags: recursesubdirs
-
-; gedit executables
-Source: "bin\gedit.exe"; DestDir: "{app}\bin"; Components: main
-
-; Modules
-Source: "lib\gtk-2.0\2.10.0\immodules\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\immodules"; Components: gtk
-Source: "bin\gtk-query-immodules-2.0.exe"; DestDir: "{app}\bin"; Components: gtk; Flags: deleteafterinstall;
-Source: "etc\gtk-2.0\gdk-pixbuf.loaders"; DestDir: "{app}\etc\gtk-2.0"; Components: gtk;
-
-Source: "lib\gtk-2.0\2.10.0\engines\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Components: gtk
-
-Source: "lib\gtk-2.0\2.10.0\loaders\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\loaders"; Components: gtk
-Source: "bin\gdk-pixbuf-query-loaders.exe"; DestDir: "{app}\bin"; Components: gtk; Flags: deleteafterinstall;
-Source: "etc\gtk-2.0\gdk-pixbuf.loaders"; DestDir: "{app}\etc\gtk-2.0"; Components: gtk;
-
-Source: "lib\gtk-2.0\modules\*"; DestDir: "{app}\lib\gtk-2.0\modules"; Components: gtk
-
-;Source: "lib\pango\1.6.0\modules\*"; DestDir: "{app}\lib\pango\1.6.0\modules"; Components: gtk;
-;Source: "pango-querymodules.exe"; DestDir: "{app}\bin"; Components: gtk; Flags: deleteafterinstall;
-
-Source: "share\themes\MS-Windows\*"; DestDir: "{app}\share\themes\MS-Windows"; Flags: recursesubdirs; Components: gtk
-Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Components: gtk
-;Source: "querymodules.bat"; DestDir: "{app}\bin"; Components: gtk; Flags: deleteafterinstall;
-
-; Enchant
-Source: "lib\enchant\*"; DestDir: "{app}\lib\enchant"; Components: main
-Source: "share\enchant\*"; DestDir: "{app}\share\enchant"; Components: main
-
-; Iso codes
-Source: "share\iso-codes\*"; DestDir: "{app}\share\iso-codes"; Components: main
-Source: "share\xml\iso-codes\*"; DestDir: "{app}\share\xml\iso-codes"; Components: main
-
-; GtkSourceView
-Source: "share\gtksourceview-2.0\language-specs\*"; DestDir: "{app}\share\gtksourceview-2.0\language-specs"; Components: main
-Source: "share\gtksourceview-2.0\styles\*"; DestDir: "{app}\share\gtksourceview-2.0\styles"; Components: main
-
-; Icons
-;Source: "share\icons\*"; DestDir: "{app}\share\icons"; Components: main; Flags: recursesubdirs
-
-; Other shared gedit files
-Source: "share\gedit-2\ui\*"; DestDir: "{app}\share\gedit-2\ui"; Components: main
-Source: "share\gedit-2\icons\gedit-plugin.png"; DestDir: "{app}\share\gedit-2\icons"; Components: main
-Source: "share\gedit-2\logo\gedit-logo.png"; Destdir: "{app}\share\gedit-2\logo\"; Components: main
-
-; Plugins
-Source: "share\gedit-2\plugins\*"; DestDir: "{app}\share\gedit-2\plugins"; Components: main; Flags: recursesubdirs
-Source: "lib\gedit-2\plugins\*"; DestDir: "{app}\lib\gedit-2\plugins"; Components: main; Flags: recursesubdirs
-Source: "lib\gedit-2\plugin-loaders\*"; DestDir: "{app}\lib\gedit-2\plugin-loaders"; Components: main; Flags: recursesubdirs
-
-; GConf
-Source: "etc\gconf\*"; DestDir: "{app}\etc\gconf"; Components: main; Flags: recursesubdirs
-Source: "libexec\gconfd-2.exe"; DestDir: "{app}\libexec"; Components: main
-
-; Locales
-;Source: "lib\locale\*"; DestDir: "{app}\lib\locale\"; Flags: recursesubdirs; Components: locale
-Source: "share\locale\*"; DestDir: "{app}\share\locale\"; Flags: recursesubdirs; Components: locale
-
-[Dirs]
-;Name: "{app}\etc\pango";
-;Name: "{app}\etc\gtk-2.0";
+; All files
+Source: "gtk\*"; DestDir: "{app}\"; Components: gtk; Flags: recursesubdirs
+Source: "gedit\*"; DestDir: "{app}\"; Components: main; Flags: recursesubdirs
+Source: "locale\*"; DestDir: "{app}\"; Components: locale; Flags: recursesubdirs
 
 [Run]
 Filename: "{app}\bin\querymodules.bat"; StatusMsg: "Querying modules..."; Flags: runhidden
@@ -156,25 +49,6 @@ Filename: "{app}\bin\querymodules.bat"; StatusMsg: "Querying modules..."; Flags:
 [Code]
 { Remove generated files not generated by the installer }
 
-//procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
-//begin
-//	if CurUninstallStep = usUninstall then
-//	begin
-//		DeleteFile(ExpandConstant('{app}') + '\etc\gtk-2.0\gtk.immodules');
-//		DeleteFile(ExpandConstant('{app}') + '\etc\gtk-2.0\gdk-pixbuf.loaders');
-//		DeleteFile(ExpandConstant('{app}') + '\etc\pango\pango.modules');
-//	end;
-//end;
-
-//procedure DeinitializeUninstall();
-//begin
-//	{ Remove main dir and etc\ which are not removed automatically,
-//          probably because of the querymodule files not installed by the
-//          installer }
-//	DelTree(ExpandConstant('{app}') + '\etc', TRUE, TRUE, TRUE);
-//	DelTree(ExpandConstant('{app}'), TRUE, FALSE, FALSE);
-//end;
-
 // Skip Components selection, all components are required anyway
 function ShouldSkipPage(CurPageID: Integer): Boolean;
 begin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]