Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Remove all references to Win32 from tools
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmincke committed Jan 11, 2019
1 parent e0802a2 commit 601a2ce
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 0 additions & 2 deletions tools/cardano-sl-tools.cabal
Expand Up @@ -156,8 +156,6 @@ executable cardano-launcher
, yaml , yaml
if !os(windows) if !os(windows)
build-depends: unix build-depends: unix
else
build-depends: Win32
default-language: Haskell2010 default-language: Haskell2010
ghc-options: -threaded ghc-options: -threaded
-Wall -Wall
Expand Down
10 changes: 1 addition & 9 deletions tools/src/launcher/Main.hs
Expand Up @@ -12,7 +12,6 @@
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE TypeSynonymInstances #-}
{-# OPTIONS_GHC -Wno-type-defaults #-}


import qualified Prelude (show) import qualified Prelude (show)
import Universum import Universum
Expand Down Expand Up @@ -58,8 +57,6 @@ import Text.PrettyPrint.ANSI.Leijen (Doc)
#ifndef mingw32_HOST_OS #ifndef mingw32_HOST_OS
import System.Posix.Signals (sigKILL, signalProcess) import System.Posix.Signals (sigKILL, signalProcess)
import qualified System.Process.Internals as Process import qualified System.Process.Internals as Process
#else
import qualified System.Win32.Process as Process
#endif #endif


-- Modules needed for system' -- Modules needed for system'
Expand Down Expand Up @@ -589,13 +586,8 @@ writeWindowsUpdaterRunner :: FilePath -> M ()
writeWindowsUpdaterRunner runnerPath = liftIO $ do writeWindowsUpdaterRunner runnerPath = liftIO $ do
exePath <- getExecutablePath exePath <- getExecutablePath
launcherArgs <- getArgs launcherArgs <- getArgs
#ifdef mingw32_HOST_OS
selfPid <- Process.getCurrentProcessId
#else
let selfPid = 0 -- This will never be run on non-Windows
#endif
writeFile (toString runnerPath) $ unlines writeFile (toString runnerPath) $ unlines
[ "TaskKill /PID "<>show selfPid<>" /F" [ "TaskKill /IM cardano-launcher.exe /F"
-- Run updater -- Run updater
, "%*" , "%*"
-- Delete updater -- Delete updater
Expand Down

0 comments on commit 601a2ce

Please sign in to comment.