diff options
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | distrib/ghc.iss.in (renamed from distrib/ghc.iss) | 16 | ||||
-rw-r--r-- | ghc.mk | 13 | ||||
-rw-r--r-- | mk/config.mk.in | 3 |
5 files changed, 29 insertions, 10 deletions
@@ -68,9 +68,14 @@ endif $(MAKE) -r --no-print-directory -f ghc.mk $@ binary-dist: +ifeq "$(mingw32_TARGET_OS)" "1" + $(MAKE) -r --no-print-directory -f ghc.mk windows-binary-dist + $(MAKE) -r --no-print-directory -f ghc.mk windows-installer +else rm -f bindist-list $(MAKE) -r --no-print-directory -f ghc.mk bindist BINDIST=YES $(MAKE) -r --no-print-directory -f ghc.mk binary-dist +endif clean distclean maintainer-clean: $(MAKE) -r --no-print-directory -f ghc.mk $@ CLEANING=YES diff --git a/configure.ac b/configure.ac index f1cd4ca504..d2cea57d48 100644 --- a/configure.ac +++ b/configure.ac @@ -941,7 +941,7 @@ fi AC_SUBST(BUILD_DOCBOOK_PS) AC_SUBST(BUILD_DOCBOOK_PDF) -AC_CONFIG_FILES([mk/config.mk mk/project.mk compiler/ghc.cabal ghc/ghc-bin.cabal ghc.spec extra-gcc-opts docs/users_guide/ug-book.xml]) +AC_CONFIG_FILES([mk/config.mk mk/project.mk compiler/ghc.cabal ghc/ghc-bin.cabal ghc.spec extra-gcc-opts docs/users_guide/ug-book.xml distrib/ghc.iss]) AC_CONFIG_COMMANDS([mk/stamp-h],[echo timestamp > mk/stamp-h]) AC_OUTPUT diff --git a/distrib/ghc.iss b/distrib/ghc.iss.in index c137f32cf8..f7a480367d 100644 --- a/distrib/ghc.iss +++ b/distrib/ghc.iss.in @@ -1,8 +1,8 @@ [Setup] AppName=GHC -AppVerName=GHC @VERSION@ -DefaultDirName={sd}\ghc\ghc-@VERSION@ +AppVerName=GHC @ProjectVersion@ +DefaultDirName={sd}\ghc\ghc-@ProjectVersion@ UsePreviousAppDir=no DefaultGroupName=GHC UninstallDisplayIcon={app}\bin\ghci.exe @@ -14,13 +14,13 @@ ChangesEnvironment=yes [Files] -Source: "ghc-@VERSION@\*"; DestDir: "{app}"; Flags: recursesubdirs +Source: "ghc-@ProjectVersion@\*"; DestDir: "{app}"; Flags: recursesubdirs [Icons] -Name: "{group}\@VERSION@\GHCi"; Filename: "{app}\bin\ghci.exe" -Name: "{group}\@VERSION@\GHC Documentation"; Filename: "{app}\doc\index.html" -Name: "{group}\@VERSION@\GHC Library Documentation"; Filename: "{app}\doc\libraries\index.html" -Name: "{group}\@VERSION@\GHC Flag Reference"; Filename: "{app}\doc\users_guide\flag-reference.html" +Name: "{group}\@ProjectVersion@\GHCi"; Filename: "{app}\bin\ghci.exe" +Name: "{group}\@ProjectVersion@\GHC Documentation"; Filename: "{app}\doc\index.html" +Name: "{group}\@ProjectVersion@\GHC Library Documentation"; Filename: "{app}\doc\libraries\index.html" +Name: "{group}\@ProjectVersion@\GHC Flag Reference"; Filename: "{app}\doc\users_guide\flag-reference.html" [Registry] ; set up icon associations @@ -34,7 +34,7 @@ Root: HKCR; Subkey: "ghc_haskell\shell\open\command"; ValueType: string; ValueNa ; these flags were always set in the past, by the installer ; some programs may rely on them to find GHC -Root: HKCU; Subkey: "Software\Haskell\GHC\ghc-@VERSION@"; ValueType: string; ValueName: "InstallDir"; ValueData: "{app}"; Flags: uninsdeletekey +Root: HKCU; Subkey: "Software\Haskell\GHC\ghc-@ProjectVersion@"; ValueType: string; ValueName: "InstallDir"; ValueData: "{app}"; Flags: uninsdeletekey Root: HKCU; Subkey: "Software\Haskell\GHC"; ValueType: string; ValueName: "InstallDir"; ValueData: "{app}"; Flags: uninsdeletevalue ; set the PATH variable, for both GHC and Cabal @@ -772,13 +772,24 @@ binary-dist: "$(RM)" $(RM_OPTS) $(BIN_DIST_TAR) # h means "follow symlinks", e.g. if aclocal.m4 is a symlink to a source # tree then we want to include the real file, not a symlink to it - "$(TAR)" hcf - -T $(BIN_DIST_LIST) | bzip2 -c >$(BIN_DIST_TAR_BZ2) + "$(TAR)" hcf - -T $(BIN_DIST_LIST) | bzip2 -c > $(BIN_DIST_TAR_BZ2) + +windows-binary-dist: + "$(RM)" $(RM_OPTS) -r $(BIN_DIST_NAME) + $(MAKE) prefix=$(BIN_DIST_DIR) install + "$(TAR)" cf - $(BIN_DIST_NAME) | bzip2 -c > $(BIN_DIST_TAR_BZ2) + +windows-installer: + "$(ISCC)" /O. /F$(WINDOWS_INSTALLER_BASE) - < distrib/ghc.iss nTimes = set -e; for i in `seq 1 $(1)`; do echo Try "$$i: $(2)"; if $(2); then break; fi; done .PHONY: publish-binary-dist publish-binary-dist: $(call nTimes,10,$(PublishCp) $(BIN_DIST_TAR_BZ2) $(PublishLocation)/dist) +ifeq "$(mingw32_TARGET_OS)" "1" + $(call nTimes,10,$(PublishCp) $(WINDOWS_INSTALLER) $(PublishLocation)/dist) +endif # ----------------------------------------------------------------------------- # Source distributions diff --git a/mk/config.mk.in b/mk/config.mk.in index 1e2bde0dec..eefb00dd95 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -380,6 +380,9 @@ BIN_DIST_PREP_DIR=$(TOP)/bindist-prep BIN_DIST_PREP=$(BIN_DIST_PREP_DIR)/$(BIN_DIST_NAME) BIN_DIST_LIST=$(TOP)/bindist-list +WINDOWS_INSTALLER_BASE = ghc-$(ProjectVersion)-i386-windows +WINDOWS_INSTALLER = $(WINDOWS_INSTALLER_BASE)$(exeext) + # Definition of installation directories, we don't use half of these, but since # the configure script has them on offer while passing through, we might as well # set them. Note that we have to be careful, because the GNU coding standards |