createAppDir :: LocalBuildInfo -> MacApp -> IO FilePath
createAppDir localb app =
  do putStrLn $ "Creating application bundle directory " ++ appPath
     createDirectoryIfMissing False appPath
     createDirectoryIfMissing True  $ takeDirectory exeDest
     createDirectoryIfMissing True  $ appPath </> "Contents/Resources"
     putStrLn $ "Copying executable " ++ appName app ++ " into place"
     copyFile exeSrc exeDest
     return appPath
  where appPath = buildDir localb </> appName app <.> "app"
        exeDest = appPath </> pathInApp app (appName app)
        exeSrc = buildDir localb </> appName app </> appName app

-- | Include any external resources specified.
createAppDir :: LocalBuildInfo -> MacApp -> IO FilePath
createAppDir localb app =
  do putStrLn $ "Creating application bundle directory " ++ appPath
     createDirectoryIfMissing False appPath
     createDirectoryIfMissing True  $ takeDirectory exeDest
     createDirectoryIfMissing True  $ appPath </> "Contents/Resources"
     putStrLn $ "Copying executable " ++ appName app ++ " into place"
     copyFile exeSrc exeDest
     return appPath
  where appPath = buildDir localb </> appName app <.> "app"
        exeDest = appPath </> pathInApp app (appName app)
        exeSrc = buildDir localb </> appName app </> appName app

-- | Include any external resources specified.
createAppDir localb app =
  do putStrLn $ "Creating application bundle directory " ++ appPath
     createDirectoryIfMissing False appPath
     createDirectoryIfMissing True  $ takeDirectory exeDest
     createDirectoryIfMissing True  $ appPath </> "Contents/Resources"
     putStrLn $ "Copying executable " ++ appName app ++ " into place"
     copyFile exeSrc exeDest
     return appPath
  where appPath = buildDir localb </> appName app <.> "app"
        exeDest = appPath </> pathInApp app (appName app)
        exeSrc = buildDir localb </> appName app </> appName app

-- | Include any external resources specified.