From ada83f016526fc958a6387686596a4b8ddfa271e Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Mon, 10 Apr 2006 04:51:25 -0500 Subject: [PATCH] Win32 installer --- Makefile.am | 6 +++++ actions.cfg.example | 17 +++++++++++++ configure.ac | 1 + makewin | 50 +++++++++++++++++++++++++++++++++++++++ wininstaller/medit.iss.in | 33 ++++++++++++++++++++++++++ 5 files changed, 107 insertions(+) create mode 100644 actions.cfg.example create mode 100755 makewin create mode 100644 wininstaller/medit.iss.in diff --git a/Makefile.am b/Makefile.am index 13df49b0..02aef784 100644 --- a/Makefile.am +++ b/Makefile.am @@ -94,6 +94,12 @@ nodist_libmoo_sources = $(moo_nodist_sources) EXTRA_DIST += $(moo_extra_dist) +mooedit_datadir = ${MOO_DATA_DIR} +mooedit_data_DATA = ui.xml.example actions.cfg.example +ui.xml.example: tests/medit-ui.xml + cp $(srcdir)/tests/medit-ui.xml ui.xml.example +EXTRA_DIST += actions.cfg.example + ############################################################################## # tests diff --git a/actions.cfg.example b/actions.cfg.example new file mode 100644 index 00000000..9623f899 --- /dev/null +++ b/actions.cfg.example @@ -0,0 +1,17 @@ +## weferger +#rgreger +#ergergerg +action: DoSomething +label: Do Something +command: shell + ls $file + +action: DoSomethingElse +label: Do Something Else +accel: B + if doc.file then + output = Exec('ls ' + doc.file); + else + output = Exec('ls'); + fi; + Insert(output); diff --git a/configure.ac b/configure.ac index 0f91ed95..a3900694 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,7 @@ moo/moo.pc moo/moo-version.h tests/pyapp.py m4/Makefile +wininstaller/medit.iss ]) diff --git a/makewin b/makewin new file mode 100755 index 00000000..5dec7780 --- /dev/null +++ b/makewin @@ -0,0 +1,50 @@ +#!/bin/sh + +dir=`pwd` +builddir=/home/muntyan/projects/moo/build +medit_windir=/usr/local/win/medit + +if [ x$1 != x -a x$1 != x"--no-cygwin" ]; then + medit_builddir=`cd $1 && pwd` +else + medit_builddir=$builddir/mingw +fi +config=`basename $medit_builddir` +installdir=$dir/$config-root +issdir=Z:$medit_builddir/wininstaller + +iss=$issdir/medit.iss +installer=medit`echo $config | sed s/mingw//`.exe + +do_cmd () { + echo "*** " $* + $* + return $? +} + +copy_files () { + do_cmd cp $1/usr/local/bin/medit.exe $2/ && \ + do_cmd cp -r $1/usr/local/share/moo/ui.xml.example $2/ui.xml && \ + do_cmd cp -r $1/usr/local/share/moo/actions.cfg.example $2/actions.cfg && \ + do_cmd cp -r $1/usr/local/share/moo/syntax $2/ +} + +build () { + do_cmd mkdir $medit_windir && \ + do_cmd mkdir $installdir && \ + do_cmd cd $medit_builddir && \ + do_cmd make install-strip DESTDIR=$installdir && \ + copy_files $installdir $medit_windir && \ + echo "*** " wine /usr/local/win/InnoSetup5/ISCC.exe $iss && \ + wine /usr/local/win/InnoSetup5/ISCC.exe $iss && \ + do_cmd mv $medit_builddir/wininstaller/Output/setup.exe $dir/$installer +} + +clean () { + do_cmd rm -rf $medit_windir + do_cmd rm -rf $installdir + do_cmd rm -rf $medit_builddir/wininstaller/Output +} + +build +clean diff --git a/wininstaller/medit.iss.in b/wininstaller/medit.iss.in new file mode 100644 index 00000000..b587617f --- /dev/null +++ b/wininstaller/medit.iss.in @@ -0,0 +1,33 @@ +[Setup] +AppName=medit +AppVerName=medit @MOO_VERSION_UNQUOTED@ +AppPublisher=Yevgen Muntyan +AppPublisherURL=http://ggap.sourceforge.net/ +AppSupportURL=http://ggap.sourceforge.net/ +AppUpdatesURL=http://ggap.sourceforge.net/ +DefaultDirName={pf}\medit +DefaultGroupName=medit +AllowNoIcons=yes +; LicenseFile=C:\ggap\license.txt +Compression=lzma +SolidCompression=yes + +[Tasks] +Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked +Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked + +[Files] +Source: C:\medit\medit.exe; DestDir: {app}; Flags: ignoreversion +Source: C:\medit\syntax\*; DestDir: {app}\syntax; Flags: ignoreversion recursesubdirs +Source: C:\medit\actions.cfg; DestDir: {app}; Flags: ignoreversion +Source: C:\medit\ui.xml; DestDir: {app}; Flags: ignoreversion +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: {group}\medit; Filename: {app}\medit.exe +Name: {group}\{cm:UninstallProgram,medit}; Filename: {uninstallexe} +Name: {userdesktop}\medit; Filename: {app}\medit.exe; Tasks: desktopicon +Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\medit; Filename: {app}\medit.exe; Tasks: quicklaunchicon + +[Run] +Filename: {app}\medit.exe; Description: {cm:LaunchProgram,medit}; Flags: nowait postinstall skipifsilent