win32: add scripts to create the new QT based installer

parent c3e55e87
......@@ -442,7 +442,6 @@ plugins/filebrowser/org.gnome.gedit.plugins.filebrowser.gschema.xml.in
plugins/pythonconsole/org.gnome.gedit.plugins.pythonconsole.gschema.xml.in
plugins/time/org.gnome.gedit.plugins.time.gschema.xml.in
po/Makefile.in
win32/gedit.iss
osx/Info.plist])
AC_OUTPUT
......
Subproject commit ac4ae160ee92fcf7010d0d9420e6f71532627f80
Subproject commit 0a9a80e4d38cd9a9e75e5438c7585d765689065f
# Stuff to build the Windows installer:
EXTRA_DIST += \
win32/gedit.iss.in \
win32/build-installer.sh \
win32/querymodules.bat
EXTRA_DIST += \
win32/make-gedit-installer \
win32/make-gedit-installer.bat \
win32/README \
win32/qt-ifw/config/config.xml \
win32/qt-ifw/packages/org.gnome.gedit.root/meta/installscript.js \
win32/qt-ifw/packages/org.gnome.gedit.root/meta/package.xml \
win32/qt-ifw/packages/org.gnome.gedit.root.package/meta/installscript.js \
win32/qt-ifw/packages/org.gnome.gedit.root.package/meta/package.xml
To create the Windows installer for gedit, ideally all you have to do is to run
the build-installer script, after having installed all dependencies to the
correct places (that means precompiled ones to /, and self-built
ones to /local/). Also, you will need to have Python at C:\Python25.
The Inno Setup compiler (iscc) needs to be in your PATH.
There are many paths hardcoded to fit my own build environment. Feel free to
generalize the script, to make it more adaptive to other environments.
The script takes an argument which is the revision number of the installer. If
it is not given, then it uses 1 as revision number. The revision number should
be increased every time the installer for the same gedit version is updated,
and be reset to 1 for a new gedit version.
Ignacio Casal Quinteiro <nacho.resa@gmail.com>
This script was based in Armin Burgmeier script for glom.
To create the installer you need to follow the next steps:
- install the latest version of msys2: http://msys2.github.io/
- launch msys2_shell.bat and update it with pacman -Syu, you will need to
relaunch msys2_shell.bat after updating it
- install git: pacman -S git
- clone gedit: git clone git://git.gnome.org/gedit
- cd gedit/win32
- edit make-gedit-installer and set the right version of gedit
- ./make-gedit-installer.bat
#!/bin/sh
echo "You need to execute this on a Windows machine within msys (http://www.mingw.org)"
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:\\Python26"
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 ASPELL_PREFIX WINDOWS_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 "$#" = 7; then
_gtk_prefix="$2"
_gtksourceview_prefix="$3"
_gedit_prefix="$4"
_python_prefix="$5"
_misc_prefix="$6"
_aspell_prefix="$7"
_windows_prefix="$8"
else
_gtk_prefix="/c/gtk"
_gtksourceview_prefix="/usr/local"
_gedit_prefix="/usr/local"
_python_prefix="/c/Python26"
_misc_prefix="/usr"
_aspell_prefix="/c/Aspell"
_windows_prefix="/c/WINDOWS/system32"
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"
echo "ASPELL_PREFIX: The path for Aspell: by default /c/Aspell"
exit
fi
revision=$1
if test "$revision" = ''; then
echo "Installer revision not provided, assuming 1"
revision=1
fi
echo "Cleanup..."
if test -e installer; then
rm installer -Rf || exit;
fi
mkdir -p installer || exit
echo "Copying the docs..."
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
echo "Copying gtk DLL files..."
#----------------------------- gtk ------------------------------------
mkdir -p installer/gtk/bin
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 "${_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 "${_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 "${_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 "${_gtk_prefix}/bin/libgtk-win32-2.0-0.dll" installer/gtk/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
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 "${_misc_prefix}/bin/libgettextpo-0.dll" installer/gedit/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 "${_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/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 "${_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
echo "Copying Python..."
# TODO: Find out Windows directory somehow, we should use WINDIR substuting c:\?
cp ${_windows_prefix}/python26.dll installer/gedit/bin || exit
# We through all python modules into python/. gedit sets PYTHONPATH accordingly.
mkdir -p installer/python || exit
# Copy the dlls needed to run python
cp -R ${_python_prefix}/DLLs installer/python || exit
# TODO: Perhaps some scripts need more python modules.
mkdir -p installer/python/Lib || exit
cp ${_python_prefix}/Lib/*.py installer/python/Lib || exit
mkdir -p installer/python/Lib/encodings || exit
cp ${_python_prefix}/Lib/encodings/*.py installer/python/Lib/encodings || exit
cp -R ${_python_prefix}/Lib/site-packages installer/python/Lib || exit
cp -R ${_python_prefix}/Lib/xml installer/python/Lib || exit
mkdir -p installer/python/Lib/sqlite3 || exit
cp ${_python_prefix}/Lib/sqlite3/*.py installer/python/Lib/sqlite3 || exit
echo "Copying modules..."
cp "${_gtk_prefix}/bin/gtk-query-immodules-2.0.exe" installer/gtk/bin || 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/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/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/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/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/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/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:
mkdir -p installer/locale/share/ || 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/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 "${_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/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/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/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/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/gedit/etc/gconf/schemas || exit
cp "${_gedit_prefix}/etc/gconf/schemas/"* installer/gedit/etc/gconf/schemas || exit
cp -R "${_misc_prefix}/etc/gconf/"* installer/gedit/etc/gconf/ || 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
#Aspell
mkdir -p installer/gedit/data || exit
cp "${_aspell_prefix}/data/"* installer/gedit/data || exit
cp "${_aspell_prefix}/bin/aspell-15.dll" installer/gedit/bin/libaspell-15.dll || exit
echo "Creating installer..."
perl -pe "s/INSTALLERREVISION/$revision/" gedit.iss > installer/gedit.iss || exit
#cp installer || exit
iscc installer/gedit.iss || exit
echo "Done"
[Setup]
AppName=gedit
AppVerName=gedit @VERSION@
DefaultDirName={pf}\gedit
DefaultGroupName=gedit
UninstallDisplayIcon={app}\gedit.exe
Uninstallable=yes
AppPublisher=GNOME
AppPublisherURL=http:\\www.gedit.org\
AppVersion=@VERSION@
OutputBaseFilename=gedit-setup-@VERSION@-INSTALLERREVISION
LicenseFile=gedit\share\doc\COPYING
[Components]
Name: "gtk"; Description: "GTK+ runtime environment"; Types: full compact custom; Flags: fixed
Name: "main"; Description: "Gedit"; Types: full compact custom; Flags: fixed
; TODO: 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
Name: user; Description: "For the current user only"; Components: main; Flags: exclusive unchecked
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Icons]
; Common task icons
Name: "{commonprograms}\{groupname}\gedit"; Filename: "{app}\bin\gedit.exe"; Tasks: common
Name: "{commonprograms}\{groupname}\Uninstall gedit"; Filename: "{uninstallexe}"; Tasks: common
Name: "{commondesktop}\gedit"; Filename: "{app}\bin\gedit.exe"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\gedit"; Filename: "{app}\bin\gedit.exe"; Tasks: quicklaunchicon
; User task icons
Name: "{userprograms}\{groupname}\gedit"; Filename: "{app}\bin\gedit.exe"; Tasks: user
Name: "{userprograms}\{groupname}\Uninstall gedit"; Filename: "{uninstallexe}"; Tasks: user
[Files]
; All files
Source: "gtk\*"; DestDir: "{app}\"; Components: gtk; Flags: recursesubdirs
Source: "gedit\*"; DestDir: "{app}\"; Components: main; Flags: recursesubdirs
Source: "python\*"; DestDir: "{app}\bin"; Components: python; Flags: recursesubdirs
Source: "locale\*"; DestDir: "{app}\"; Components: locale; Flags: recursesubdirs
[Run]
Filename: "{app}\bin\querymodules.bat"; StatusMsg: "Querying modules..."; Flags: runhidden
[Code]
{ Remove generated files not generated by the installer }
// Skip Components selection, all components are required anyway
function ShouldSkipPage(CurPageID: Integer): Boolean;
begin
if CurPageID = wpSelectComponents then
Result := True
else
Result := False;
end;
#!/usr/bin/env bash
_thisdir="$(dirname $0)"
test "${_thisdir}" = "." && _thisdir=${PWD}
_ifwroot="${_thisdir}"/qt-ifw
_arch=$(uname -m)
_date=$(date +'%Y%m%d')
_dateqif=$(date +'%Y-%m-%d')
_version=@VERSION@
_filename=gedit-${_arch}-${_version}.exe
_log=/tmp/installer.log
if [ "${_arch}" = "x86_64" ]; then
_bitness=64
else
_bitness=32
fi
declare -a undo_commands
_exitcode=5
usage() {
echo "Usage: $0 stage#"
exit 1
}
if [ "$#" != "1" ]; then
usage
fi
_stage="$1"
case "${_stage}" in
stage1 | stage2)
;;
*)
usage
;;
esac
exit_with_undo() {
for _cmd in ${undo_commands[@]}; do
eval "$_cmd"
done
exit ${_exitcode}
}
exit_cleanly() {
_exitcode=$1; shift;
local _message=$1; shift;
echo "${_message}"
exit_with_undo
}
do_seds() {
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" \) -exec sed -i "s|@DATE@|${_dateqif}|g" "{}" \;
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" \) -exec sed -i "s|@VERSION@|${_version}|g" "{}" \;
undo_commands+=("undo_seds")
}
undo_seds() {
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" \) -exec sed -i "s|<ReleaseDate>${_dateqif}<|<ReleaseDate>@DATE@<|g" "{}" \;
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" \) -exec sed -i "s|<Version>${_version}<|<Version>@VERSION@<|g" "{}" \;
}
# Add -v to get more information.
make_installer() {
"${_binarycreator}" \
-t "${_installerbase}" \
-p "${_ifwroot}/packages" \
-c "${_ifwroot}/config/config.xml" \
--offline-only \
"${_filename}" \
-v
}
trap exit_with_undo 1 2 15
_archivegen=/mingw${_bitness}/bin/archivegen.exe
_binarycreator=/mingw${_bitness}/bin/binarycreator.exe
_installerbase=/mingw${_bitness}/bin/installerbase.exe
_newgedit=/tmp/gedit
create_archive() {
local _data="${_ifwroot}"/packages/org.gnome.gedit.root.package/data
[ -d "${_data}" ] && rm -rf "${_data}"
# remove .a files not needed for the installer
find ${_newgedit} -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
# 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
# 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
# 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
mkdir -p "${_data}"
_dirs=
for curr_dir in /bin /etc /lib /share; do
if [[ -d ${_newgedit}/mingw${_bitness}/$curr_dir || -f ${_newgedit}/mingw${_bitness}/$curr_dir ]]; then
_dirs="${_dirs} ${_newgedit}/mingw${_bitness}/$curr_dir"
fi
done
if [ -n "$_dirs" ]; then
_compress_cmd="${_archivegen} ${_data}/gedit.7z ${_dirs}"
pushd / > /dev/null
eval ${_compress_cmd} | tee $_log 2>&1
_result=$?
if [ "$_result" -eq "0" ]; then
echo " archivegen succeeded. Created ${_data}/gedit.7z"
else
exit_cleanly "3" "archivegen failed. See $_log"
fi
popd > /dev/null
fi
# copy the license
cp ../COPYING "${_ifwroot}"/packages/org.gnome.gedit.root/meta/gpl2.txt
}
create_chroot_system() {
[ -d ${_newgedit} ] && rm -rf ${_newgedit}
mkdir -p "${_newgedit}"
pushd "${_newgedit}" > /dev/null
mkdir -p var/lib/pacman
mkdir -p var/log
mkdir -p tmp
pacman -Syu --root "${_newgedit}"
pacman -S filesystem bash pacman --noconfirm --root "${_newgedit}"
_result=$?
if [ "$_result" -ne "0" ]; then
exit_cleanly "1" "failed to create base data via command 'pacman -S filesystem bash pacman --noconfirm --root ${_newgedit}'"
fi
popd > /dev/null
}
install_gedit_packages() {
pacman -S mingw-w64-${_arch}-librsvg mingw-w64-${_arch}-gedit mingw-w64-${_arch}-gedit-plugins mingw-w64-${_arch}-adwaita-icon-theme --noconfirm --root "${_newgedit}"
_result=$?
if [ "$_result" -ne "0" ]; then
exit_cleanly "1" "failed to create newgedit via command 'pacman -S gedit --noconfirm --root ${_newgedit}'"
fi
# some packages are pulled by the deps but we do not need them like python2
pacman -Rdd mingw-w64-${_arch}-python2 --noconfirm --root "${_newgedit}"
pacman -Rdd mingw-w64-${_arch}-gtk2 --noconfirm --root "${_newgedit}"
}
if [ ! -f "${_archivegen}" ]; then
eval "pacman -S --noconfirm mingw${_bitness}/mingw-w64-${_arch}-qt-installer-framework-git" | tee $_log 2>&1
fi
if [ ! -f "${_archivegen}" ]; then
exit_cleanly "2" "installation of qt installer framework failed. See $_log"
fi
if [ "${_stage}" = "stage1" ]; then
echo "Creating gedit chroot system ${_newgedit}"
create_chroot_system
exit 0
fi
echo "Installing gedit packages into ${_newgedit}"
install_gedit_packages
echo "Creating gedit installer /tmp/$_filename"
[ -f /tmp/$_filename ] && rm -f /tmp/$_filename
do_seds
create_archive
make_installer
exit_cleanly "0" "All done, see ${_filename}"
C:/msys64/usr/bin/bash.exe -c "./make-gedit-installer stage1"
if errorlevel 1 (
exit /b %errorlevel%
)
C:/msys64/tmp/newgedit/msys64/usr/bin/bash.exe -c "./make-gedit-installer stage2"
if errorlevel 1 (
exit /b %errorlevel%
)
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
<Name>gedit Text Editor</Name>
<Version>@VERSION@</Version>
<Title>gedit Text Editor</Title>
<Publisher>The gedit Developers</Publisher>
<ProductUrl>http://www.gedit.org</ProductUrl>
<Logo>../../../pixmaps/gedit-logo.png</Logo>
<StartMenuDir>gedit Text Editor</StartMenuDir>
<RunProgram>@TargetDir@/bin/gedit.exe</RunProgram>
<RunProgramArguments></RunProgramArguments>
<InstallerApplicationIcon>../../../pixmaps/gedit.ico</InstallerApplicationIcon>
<InstallerWindowIcon>../../../pixmaps/gedit.ico</InstallerWindowIcon>
</Installer>
function Component()
{
// constructor
}
Component.prototype.isDefault = function()
{
// select the component by default
return true;
}
function createShortcuts()
{
var windir = installer.environmentVariable("WINDIR");
if (windir === "") {
QMessageBox["warning"]( "Error" , "Error", "Could not find windows installation directory");
return;
}
var cmdLocation = windir + "\\system32\\cmd.exe";
component.addOperation("CreateShortcut",
cmdLocation,
"@StartMenuDir@/gedit Text Editor",
"/A /Q /K " + installer.value("TargetDir") + "\\bin\\gedit.exe");
component.addOperation("Execute",
["@TargetDir@\\bin\\gdk-pixbuf-query-loaders.exe",
"--update-cache"]);
component.addOperation("Execute",
["@TargetDir@\\bin\\glib-compile-schemas.exe",
"@TargetDir@\\share\\glib-2.0\\schemas"]);
}
Component.prototype.createOperations = function()
{
component.createOperations();
createShortcuts();
}
<?xml version="1.0"?>
<Package>
<DisplayName>gedit Text Editor package</DisplayName>
<Description>gedit is the official text editor of the GNOME desktop environment</Description>
<Version>@VERSION@</Version>
<ReleaseDate>@DATE@</ReleaseDate>
<Default>true</Default>
<Script>installscript.js</Script>
</Package>
function Component() {
installer.setValue("TargetDir", installer.value("ApplicationsDir") + "\\gedit");
installer.setDefaultPageVisible(QInstaller.Introduction, false);
installer.setDefaultPageVisible(QInstaller.TargetDirectory, true);
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
installer.setDefaultPageVisible(QInstaller.ReadyForInstallation, false);
installer.setDefaultPageVisible(QInstaller.StartMenuSelection, true);
installer.setDefaultPageVisible(QInstaller.LicenseCheck, true);
}
<?xml version="1.0"?>
<Package>
<DisplayName>gedit Text Editor</DisplayName>
<Description>gedit is the official text editor of the GNOME desktop environment</Description>
<Version>@VERSION@</Version>
<ReleaseDate>@DATE@</ReleaseDate>
<Licenses>
<License name="GNU GENERAL PUBLIC LICENSE Version 2" file="gpl2.txt" />
</Licenses>
<Script>installscript.js</Script>
</Package>
rem pango-querymodules.exe > ../etc/pango/pango.modules
gdk-pixbuf-query-loaders.exe > ../etc/gtk-2.0/gdk-pixbuf.loaders
gtk-query-immodules-2.0.exe > ../etc/gtk-2.0/gtk.immodules
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment