Skip to content

Commit 8ef96c9

Browse files
committed
[LW-12086] Remove MacInstaller.hs
1 parent 039a1c9 commit 8ef96c9

11 files changed

+9
-690
lines changed

installers/Installer.hs

-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import qualified System.Info as Sys
77
import Turtle (export)
88
import qualified System.IO as IO
99

10-
import qualified MacInstaller
1110
import qualified WindowsInstaller
1211
import Data.Yaml (decodeFileThrow)
1312

@@ -20,7 +19,6 @@ main = do
2019
IO.hSetEncoding IO.stdout IO.utf8
2120
let os = case Sys.os of
2221
"linux" -> Linux64
23-
"darwin" -> Macos64
2422
"mingw32" -> Win64
2523
_ -> error ("Unsupported OS: " <> pack Sys.os)
2624

@@ -43,5 +41,4 @@ genSignedInstaller os options'= do
4341
export "NETWORK" (clusterNetwork $ oCluster options')
4442
case os of
4543
Linux64 -> putStrLn ("Use default.nix, please." :: String)
46-
Macos64 -> MacInstaller.main options'
4744
Win64 -> WindowsInstaller.main options'

installers/Spec.hs

-32
Original file line numberDiff line numberDiff line change
@@ -19,45 +19,13 @@ import Data.Aeson (decode)
1919

2020
import Config
2121
import Types
22-
import qualified MacInstaller as Mac
2322
import Util
2423

2524
main :: IO ()
2625
main = hspec $ do
2726
describe "Utility functions" utilSpec
28-
describe "MacInstaller build" macBuildSpec
2927
describe "recursive directory deletion" deleteSpec
3028

31-
macBuildSpec :: Spec
32-
macBuildSpec = do
33-
describe "The whole thing" $ do
34-
it "Runs through the whole installer build" $ runManaged $ do
35-
out <- getTempDir "test-build"
36-
installersDir <- makeTestInstallersDir
37-
daedalusBridge <- liftIO getDaedalusBridge
38-
39-
let opts = Options
40-
{ oOS = Win64
41-
, oBackend = Cardano daedalusBridge
42-
, oBuildJob = Just (BuildJob "test")
43-
, oCluster = Testnet
44-
, oAppName = "Daedalus"
45-
, oOutputDir = out
46-
, oTestInstaller = testInstaller False
47-
, oSigningConfigPath = Nothing
48-
}
49-
50-
liftIO $ do
51-
withDir installersDir $ do
52-
mktree "../release/darwin-x64/Daedalus-darwin-x64/Daedalus.app/Contents/Resources/app"
53-
mktree "../release/darwin-arm64/Daedalus-darwin-arm64/Daedalus.app/Contents/Resources/app"
54-
writeFile "../release/darwin-x64/Daedalus-darwin-x64/Daedalus.app/Contents/Resources/app/package.json" "{}"
55-
writeFile "../release/darwin-arm64/Daedalus-darwin-arm64/Daedalus.app/Contents/Resources/app/package.json" "{}"
56-
Mac.main opts
57-
58-
-- there should be an installer file at the end
59-
fold (ls out) Fold.length `shouldReturn` 1
60-
6129
-- | Set up a temporary source/installers directory with everything
6230
-- required for the installer builder. This is so that the installer
6331
-- builder can be tested in a pure environment without any

installers/common/Config.hs

+1-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ data Options = Options
6363
, oOS :: OS
6464
, oCluster :: Cluster
6565
, oAppName :: AppName
66-
, oAppRootOverride :: Maybe FilePath
6766
, oDontPkgbuild :: Bool
6867
, oOutputDir :: FilePath
6968
, oTestInstaller :: TestInstaller
@@ -87,12 +86,11 @@ optionsParser detectedOS = Options
8786
<*> (optional $
8887
(BuildJob <$> optText "build-counter" 'v' "‘inputs.self.sourceInfo.revCount’"))
8988
<*> (fromMaybe detectedOS <$> (optional $
90-
optReadLower "os" 's' "OS, defaults to host OS. One of: linux64 macos64 win64"))
89+
optReadLower "os" 's' "OS, defaults to host OS. One of: linux64 win64"))
9190
<*> (fromMaybe Selfnode <$> (optional $
9291
optReadLower "cluster" 'c' "Cluster the resulting installer will target: mainnet, staging, or testnet"))
9392
<*> (fromMaybe "daedalus" <$> (optional $
9493
(AppName <$> optText "appname" 'n' "Application name: daedalus or..")))
95-
<*> (optional (optPath "app-root-override" 'r' "If you built the Electron app outside of MacInstaller.hs"))
9694
<*> (switch "dont-pkgbuild" 'd' "Stop after preparing the package (content root), don’t create the final *.pkg file")
9795
<*> optPath "out-dir" 'o' "Installer output directory"
9896
<*> (testInstaller

0 commit comments

Comments
 (0)