[gedit/wip/wix] Better creation of installer
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/wix] Better creation of installer
- Date: Tue, 22 Dec 2015 11:14:36 +0000 (UTC)
commit 34361ae9111361d3d5e874c18780f0da269c5990
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Tue Dec 22 12:14:19 2015 +0100
Better creation of installer
win32/make-gedit-installer | 78 +++++++++++++++++++++++--------------------
1 files changed, 42 insertions(+), 36 deletions(-)
---
diff --git a/win32/make-gedit-installer b/win32/make-gedit-installer
index 2739a40..5c4a28d 100644
--- a/win32/make-gedit-installer
+++ b/win32/make-gedit-installer
@@ -61,51 +61,58 @@ undo_seds() {
find "${_installer_root}" \( -name "defines.wxi" \) -exec sed -i "s|ProductVersion =
\"${_version}\"|ProductVersion = \"@VERSION \"|g" "{}" \;
}
-# Add -v to get more information.
-make_installer() {
- "${_wixdir}/bin/heat.exe" dir "${_newgedit}/mingw${_bitness}" -gg -dr INSTALLDIR -cg binaries -sfrag -sreg
-srd -suid -template fragment -out "installer/binaries.wxs"
- "${_wixdir}/bin/candle.exe" "installer/gedit.wxs" "installer/binaries.wxs"
- "${_wixdir}/bin/light.exe" -ext WixUtilExtension "installer/gedit.wixobj" "installer/binaries.wixobj" -o
"/tmp/${_filename}"
-}
-
-trap exit_with_undo 1 2 15
-
-_archivegen=/mingw${_bitness}/bin/archivegen.exe
-_installerbase=/mingw${_bitness}/bin/installerbase.exe
_newgedit=/tmp/gedit
remove_useless_stuff() {
# remove .a files not needed for the installer
- find ${_newgedit} -name "*.a" -exec rm -f {} \;
+ find installer/SourceDir -name "*.a" -exec rm -f {} \;
# remove unneeded binaries
- find ${_newgedit}/mingw${_bitness} -not -name "g*.exe" -name "*.exe" -exec rm -f {} \;
- rm -rf ${_newgedit}/mingw${_bitness}/bin/py*
- rm -rf ${_newgedit}/mingw${_bitness}/bin/*-config
+ find installer/SourceDir -not -name "g*.exe" -name "*.exe" -exec rm -f {} \;
+ rm -rf installer/SourceDir/bin/py*
+ rm -rf installer/SourceDir/bin/*-config
# remove other useless folders
- rm -rf ${_newgedit}/mingw${_bitness}/share/man
- rm -rf ${_newgedit}/mingw${_bitness}/share/readline
- rm -rf ${_newgedit}/mingw${_bitness}/share/info
- rm -rf ${_newgedit}/mingw${_bitness}/share/aclocal
- rm -rf ${_newgedit}/mingw${_bitness}/share/gnome-common
- rm -rf ${_newgedit}/mingw${_bitness}/share/glade
- rm -rf ${_newgedit}/mingw${_bitness}/share/gettext
- rm -rf ${_newgedit}/mingw${_bitness}/share/terminfo
- rm -rf ${_newgedit}/mingw${_bitness}/share/tabset
- rm -rf ${_newgedit}/mingw${_bitness}/share/pkgconfig
- rm -rf ${_newgedit}/mingw${_bitness}/share/bash-completion
- rm -rf ${_newgedit}/mingw${_bitness}/share/appdata
- rm -rf ${_newgedit}/mingw${_bitness}/share/gdb
+ rm -rf installer/SourceDir/share/man
+ rm -rf installer/SourceDir/share/readline
+ rm -rf installer/SourceDir/share/info
+ rm -rf installer/SourceDir/share/aclocal
+ rm -rf installer/SourceDir/share/gnome-common
+ rm -rf installer/SourceDir/share/glade
+ rm -rf installer/SourceDir/share/gettext
+ rm -rf installer/SourceDir/share/terminfo
+ rm -rf installer/SourceDir/share/tabset
+ rm -rf installer/SourceDir/share/pkgconfig
+ rm -rf installer/SourceDir/share/bash-completion
+ rm -rf installer/SourceDir/share/appdata
+ rm -rf installer/SourceDir/share/gdb
# on windows we show the online help
- rm -rf ${_newgedit}/mingw${_bitness}/share/help
- rm -rf ${_newgedit}/mingw${_bitness}/share/gtk-doc
- rm -rf ${_newgedit}/mingw${_bitness}/share/doc
+ rm -rf installer/SourceDir/share/help
+ rm -rf installer/SourceDir/share/gtk-doc
+ rm -rf installer/SourceDir/share/doc
# remove on the lib folder
- rm -rf ${_newgedit}/mingw${_bitness}/lib/terminfo
- rm -rf ${_newgedit}/mingw${_bitness}/lib/python2*
- rm -rf ${_newgedit}/mingw${_bitness}/lib/pkgconfig
- rm -rf ${_newgedit}/mingw${_bitness}/lib/peas-demo
+ rm -rf installer/SourceDir/lib/terminfo
+ rm -rf installer/SourceDir/lib/python2*
+ rm -rf installer/SourceDir/lib/pkgconfig
+ rm -rf installer/SourceDir/lib/peas-demo
+}
+
+setup_source_dir() {
+ cp -R "${_newgedit}/mingw${_bitness}" "installer/SourceDir"
+ remove_useless_stuff
}
+# Add -v to get more information.
+make_installer() {
+ setup_source_dir
+
+ pushd "installer" > /dev/null
+ "${_wixdir}/bin/heat.exe" dir SourceDir -gg -dr INSTALLDIR -cg binaries -sfrag -sreg -srd -suid -template
fragment -out binaries.wxs
+ "${_wixdir}/bin/candle.exe" gedit.wxs binaries.wxs
+ "${_wixdir}/bin/light.exe" -ext WixUtilExtension gedit.wixobj binaries.wixobj -o "/tmp/${_filename}"
+ popd
+}
+
+trap exit_with_undo 1 2 15
+
create_chroot_system() {
[ -d ${_newgedit} ] && rm -rf ${_newgedit}
mkdir -p "${_newgedit}"
@@ -149,6 +156,5 @@ echo "Creating gedit installer /tmp/$_filename"
[ -f /tmp/$_filename ] && rm -f /tmp/$_filename
do_seds
-remove_useless_stuff
make_installer
exit_cleanly "0" "All done, see ${_filename}"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]