From a243b2db2d9423c30154ac90249a0b1721068023 Mon Sep 17 00:00:00 2001 From: onkarshinde Date: Thu, 4 Sep 2008 18:18:52 +0000 Subject: [PATCH] - Basic installer using NSIS git-svn-id: https://gnusim8085.svn.sourceforge.net/svnroot/gnusim8085/trunk@117 c0c784df-5f15-0410-a540-c3e77be2c7b8 --- ChangeLog | 7 +++++ Makefile.in | 11 +++++--- WINDOWS-PORT.txt | 29 +++++++++++++++------ configure | 3 ++- configure.in | 1 + installer.nsi.in | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 106 insertions(+), 13 deletions(-) create mode 100644 installer.nsi.in diff --git a/ChangeLog b/ChangeLog index c691913..81a3821 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-04 Onkar Shinde + * configure.in: Add installer.nsi.in + * installer.nsi.in: Template for generating installer script to be + used with NSIS. + * WINDOWS-PORT.txt: Updated with status about installer. + * configure, Makefile.in: Auto updated. + 2008-09-03 Onkar Shinde * configure.in: Update to check gtksourceview2 >= 2.2 and gtk >= 2.12. Also removed libgnomeui variables. diff --git a/Makefile.in b/Makefile.in index 987efbc..32b38f2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -36,9 +36,10 @@ subdir = . DIST_COMMON = README $(am__configure_deps) \ $(srcdir)/GNUSim8085.desktop.in $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ - INSTALL NEWS TODO acconfig.h compile config.guess config.rpath \ - config.sub depcomp install-sh ltmain.sh missing mkinstalldirs + $(srcdir)/installer.nsi.in $(top_srcdir)/configure ABOUT-NLS \ + AUTHORS COPYING ChangeLog INSTALL NEWS TODO acconfig.h compile \ + config.guess config.rpath config.sub depcomp install-sh \ + ltmain.sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ @@ -52,7 +53,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = GNUSim8085.desktop +CONFIG_CLEAN_FILES = GNUSim8085.desktop installer.nsi SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -282,6 +283,8 @@ distclean-hdr: -rm -f config.h stamp-h1 GNUSim8085.desktop: $(top_builddir)/config.status $(srcdir)/GNUSim8085.desktop.in cd $(top_builddir) && $(SHELL) ./config.status $@ +installer.nsi: $(top_builddir)/config.status $(srcdir)/installer.nsi.in + cd $(top_builddir) && $(SHELL) ./config.status $@ install-gnomemenuDATA: $(gnomemenu_DATA) @$(NORMAL_INSTALL) test -z "$(gnomemenudir)" || $(MKDIR_P) "$(DESTDIR)$(gnomemenudir)" diff --git a/WINDOWS-PORT.txt b/WINDOWS-PORT.txt index 3cd10df..333bd43 100644 --- a/WINDOWS-PORT.txt +++ b/WINDOWS-PORT.txt @@ -15,16 +15,31 @@ How to build (using mingw cross compiler, on a linux system): 2. Before doing "./configure --target=i586-mingw32msvc ..." a. Add target=win32 in gtksourceview-2.0.pc - a. Comment out Requires.private from gtksourceview-2.0.pc. This needs to + b. Comment out Requires.private from gtksourceview-2.0.pc. This needs to be done to workaround problem in libxml2 distribution. +How to build installer (using nsis, on a linux system): + + 1. Make sure you have nsis installed. + + 2. After doing "./configure --target=i586-mingw32msvc ..." + a. Execute command "makensis installer.nsi". + This builds the application and then installer. + How to install: 1. Install GTK+ runtime for windows available at http://www.gtk.org/download-windows.html - 2. Copy libgtksourceview-2.0-0.dll and libxml2.dll in same directory - where other dll files are placed in to GTK+ runtime installation. - 3. Copy gnusim8085.exe and 8085.lang file to windows machine. + + 2. Using installer + a. Just run the installer. :-) + + 3. Without using installer + a. Copy gnusim8085.exe and 8085asm.lang files to windows machine. + b. Copy libgtksourceview-2.0-0.dll and libxml2.dll to same directory + as gnusim8085.exe. + c. Copy language.dtd file found in gtksourceview installation to same + directory as gnusim8085.exe. Status: @@ -35,10 +50,8 @@ Status: TODO: - 0. [Onkar] Write a installer using NSIS. - - 1. [Nearfar] interface.c: Write replacement for gnome_url_show_on_screen(); + 0. [Nearfar] interface.c: Write replacement for gnome_url_show_on_screen(); - 2. [Nearfar] support.c: Write replacement for gnome_program_locate_file(); to + 1. [Nearfar] support.c: Write replacement for gnome_program_locate_file(); to make the ICON work. diff --git a/configure b/configure index fe8b200..637d9c7 100755 --- a/configure +++ b/configure @@ -8166,7 +8166,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF -ac_config_files="$ac_config_files Makefile po/Makefile.in src/Makefile pixmaps/Makefile doc/Makefile data/Makefile GNUSim8085.desktop" +ac_config_files="$ac_config_files Makefile po/Makefile.in src/Makefile pixmaps/Makefile doc/Makefile data/Makefile GNUSim8085.desktop installer.nsi" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -8783,6 +8783,7 @@ do "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "GNUSim8085.desktop") CONFIG_FILES="$CONFIG_FILES GNUSim8085.desktop" ;; + "installer.nsi") CONFIG_FILES="$CONFIG_FILES installer.nsi" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} diff --git a/configure.in b/configure.in index c9a2da9..8d8cde1 100644 --- a/configure.in +++ b/configure.in @@ -163,5 +163,6 @@ pixmaps/Makefile doc/Makefile data/Makefile GNUSim8085.desktop +installer.nsi ]) diff --git a/installer.nsi.in b/installer.nsi.in new file mode 100644 index 0000000..67f2f3d --- /dev/null +++ b/installer.nsi.in @@ -0,0 +1,68 @@ +# NSIS installer script for for gnusim8085 +# AUTHOR - Onkar Shinde +# LICENSE: Same as specified in COPYING file +# +# NOTE: Tested with NSIS 2.37 only + +# Define application name and installer file name +Name @PACKAGE@ +OutFile @PACKAGE@-@VERSION@-no-gtk-installer.exe +!define startmenu "$SMPROGRAMS\@PACKAGE@" +!define uninstaller "uninstaller.exe" + +# Set default installation directory +Function .onInit + StrCpy $INSTDIR "C:\@PACKAGE@" +FunctionEnd + +# Show license page +Page license + LicenseData COPYING + LicenseForceSelection checkbox + +# Show installation directory selector page +Page directory + +# Show installation progress page +Page instfiles + +# Show uninstall confirmation page +UninstPage uninstConfirm + +# Show uninstall progress page +UninstPage instfiles + +# Install section +Section "Install" + SetOutPath $INSTDIR + !system 'make' + !system 'cp /usr/i586-mingw32msvc/bin/libgtksourceview-2.0-0.dll src/' + !system 'cp /usr/i586-mingw32msvc/bin/libxml2.dll src/' + !system 'cp /usr/i586-mingw32msvc/share/gtksourceview-2.0/language-specs/language.dtd data/' + File AUTHORS + File ChangeLog + File COPYING + File NEWS + File TODO + File src/gnusim8085.exe + File /r /x *svn* /x Makefile* data + File /r /x *svn* doc/examples + File /r /x *svn* /x Makefile* pixmaps + File src/libgtksourceview-2.0-0.dll + File src/libxml2.dll + CreateDirectory ${startmenu} + CreateShortcut "${startmenu}\@PACKAGE@.lnk" "$INSTDIR\gnusim8085.exe" "" "$INSTDIR\pixmaps\gnusim8085_icon.png" + WriteUninstaller $INSTDIR\${uninstaller} + CreateShortcut "${startmenu}\Uninstall.lnk" "$INSTDIR\${uninstaller}" + !system 'rm -f src/libgtksourceview-2.0-0.dll' + !system 'rm -f src/libxml2.dll' + !system 'rm -f data/language.dtd' +SectionEnd + +# Uninstall section +Section "Uninstall" + Delete $INSTDIR\uninstaller.exe + RMDir /r ${startmenu} + RMDir /r $INSTDIR +SectionEnd +