Commit de4cc55e authored by Ian Lynagh's avatar Ian Lynagh

Make Windows bindists and installers work in the new build system

parent d1df0c60
......@@ -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
......
......@@ -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
......
[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
......
......@@ -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
......
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