Skip to content
This repository was archived by the owner on Feb 3, 2022. It is now read-only.

Commit fe63519

Browse files
U-CIQDEV\gbazermanU-CIQDEV\gbazerman
authored andcommitted
add minimal/full info to build products
1 parent 6417e53 commit fe63519

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

hptool/src/OS/Mac.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ macOsFromConfig BuildConfig{..} = OS{..}
7979
copyFile' f $ hpDocDir </> takeFileName f
8080

8181
productName =
82-
"Haskell Platform " ++ showVersion hpVersion ++ archBits bcArch
82+
"Haskell Platform " ++ showVersion hpVersion ++ (if bcIncludeExtra then " Full" else " Minimal") ++ archBits bcArch
8383

8484
osProduct = productDir </> productName <.> "pkg"
8585
signedProduct = productDir </> (productName ++ "-signed") <.> "pkg"
@@ -140,7 +140,7 @@ macOsFromConfig BuildConfig{..} = OS{..}
140140
command_ []
141141
"pkgbuild"
142142
[ "--identifier", "org.haskell.HaskellPlatform.Libraries."
143-
++ hpPkgMajorVer ++ ".pkg"
143+
++ hpPkgMajorVer ++ (if bcIncludeExtra then "-full" else "-minimal") ++ ".pkg"
144144
, "--version", hpPkgMinorVer
145145
, "--install-location", "/Library/Haskell"
146146
, "--root", "build/target/Library/Haskell"
@@ -153,7 +153,7 @@ macOsFromConfig BuildConfig{..} = OS{..}
153153
command_ []
154154
"productbuild"
155155
[ "--identifier", "org.haskell.HaskellPlatform."
156-
++ hpPkgMajorVer ++ ".pkg"
156+
++ hpPkgMajorVer ++ (if bcIncludeExtra then "-full" else "-minimal") ++ ".pkg"
157157
, "--version", hpPkgMinorVer
158158
, "--resources", osxInstallResources
159159
, "--distribution", osxInstallerDist

hptool/src/OS/Posix.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ posixOS BuildConfig{..} = OS{..}
7171
installScript = extrasDir </> "installer" </> "install-haskell-platform.sh"
7272

7373
productName =
74-
"haskell-platform-" ++ showVersion hpVersion ++ "-unknown-posix-" ++ bcArch
74+
"haskell-platform-" ++ showVersion hpVersion ++ "-unknown-posix-" ++ (if bcIncludeExtra then "-full-" else "-minimal-") ++ bcArch
7575

7676
genericExtrasSrc = "hptool/os-extras/posix"
7777

hptool/src/OS/Win.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ winOsFromConfig BuildConfig{..} = os
120120

121121
osDocAction = return ()
122122

123-
osProduct = winProductFile hpVersion bcArch
123+
osProduct = winProductFile bcIncludeExtra hpVersion bcArch
124124

125125
osRules _rel bc = do
126126
winRules

hptool/src/OS/Win/WinNsis.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ expandNsisInfo :: (Monad m) => Release -> BuildConfig -> MuContext m
8484
expandNsisInfo rls BuildConfig{..} = mkStrContext ex
8585
where
8686
ex "productFile" = MuVariable . toNative $
87-
winProductFile hpver bcArch `relativeToDir` installerPartsDir
87+
winProductFile bcIncludeExtra hpver bcArch `relativeToDir` installerPartsDir
8888
-- NSIS tool needs to run from the installerPartsDir
8989
ex "build64bit" = MuBool is64
9090
ex "is32or64" = MuVariable $ if is64 then "64" else "32"

hptool/src/OS/Win/WinPaths.hs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ winDocTargetDir :: FilePath
145145
winDocTargetDir = winTargetDir </> "doc"
146146

147147
-- | The installer file name, dependent on the HP version and architecture
148-
winProductFileName :: Version -> String -> FilePath
149-
winProductFileName hpv arch =
148+
winProductFileName :: Bool -> Version -> String -> FilePath
149+
winProductFileName isFull hpv arch =
150150
("HaskellPlatform-" ++ versionAndArch ++ "-setup") <.> "exe"
151-
where versionAndArch = showVersion hpv ++ '-' : arch
151+
where versionAndArch = showVersion hpv ++ (if isFull then "-full" else "-minimal") ++ '-' : arch
152152

153153
-- | Directory where the installer file is built.
154-
winProductFile :: Version -> String -> FilePath
155-
winProductFile hpv arch = productDir </> winProductFileName hpv arch
154+
winProductFile :: Bool -> Version -> String -> FilePath
155+
winProductFile isFull hpv arch = productDir </> winProductFileName isFull hpv arch
156156

157157
-- | Relative to the install dir
158158
winGhcPackageDbDir :: FilePath
@@ -166,4 +166,3 @@ winGhcTargetPackageDbDir = winTargetDir </> winGhcPackageDbDir
166166
winNeeds :: [FilePath]
167167
winNeeds = [ nsisFile, nsisInstDat, nsisUninstDat ]
168168
++ winInstExtras
169-

0 commit comments

Comments
 (0)