diff --git a/README.md b/README.md index fb13270a..d8c897b6 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,11 @@ Full docs can be found [**here**](https://data.catering). 1. [Mac download](https://nightly.link/data-catering/data-caterer/workflows/build/main/data-caterer-mac.zip) 2. [Windows download](https://nightly.link/data-catering/data-caterer/workflows/build/main/data-caterer-windows.zip) - 1. After downloaded, go to 'Downloads' folder and 'Extract All' + 1. After downloaded, go to 'Downloads' folder and 'Extract All' from data-caterer-windows 2. Double-click 'DataCaterer-1.0.0' to install Data Caterer - 3. Go to '/Program Files/DataCaterer' folder and run DataCaterer application - 4. If browser doesn't open, go to [http://localhost:9898](http://localhost:9898) in your preferred browser + 3. Click on 'More info' then at the bottom, click 'Run anyway' + 4. Go to '/Program Files/DataCaterer' folder and run DataCaterer application + 5. If browser doesn't open, go to [http://localhost:9898](http://localhost:9898) in your preferred browser 3. [Linux download](https://nightly.link/data-catering/data-caterer/workflows/build/main/data-caterer-linux.zip) 4. Docker ```shell diff --git a/app/src/main/scala/io/github/datacatering/datacaterer/core/ui/config/UiConfiguration.scala b/app/src/main/scala/io/github/datacatering/datacaterer/core/ui/config/UiConfiguration.scala index 9bb73540..1897d606 100644 --- a/app/src/main/scala/io/github/datacatering/datacaterer/core/ui/config/UiConfiguration.scala +++ b/app/src/main/scala/io/github/datacatering/datacaterer/core/ui/config/UiConfiguration.scala @@ -2,6 +2,8 @@ package io.github.datacatering.datacaterer.core.ui.config import org.apache.log4j.Logger +import java.nio.file.Paths + object UiConfiguration { private val LOGGER = Logger.getLogger(getClass.getName) @@ -11,21 +13,21 @@ object UiConfiguration { def getInstallDirectory: String = { val osName = System.getProperty("os.name").toLowerCase if (osName.contains("win")) { - setHadoopHome() val appDataDir = System.getenv("APPDATA") + setHadoopHome(appDataDir) s"$appDataDir/DataCaterer" } else if (osName.contains("nix") || osName.contains("nux") || osName.contains("aix")) { "/opt/DataCaterer" } else if (osName.contains("mac")) { - "/Applications/DataCaterer.app" + "/Library/DataCaterer" } else { LOGGER.warn(s"Unknown operating system name, defaulting install directory to '/tmp/DataCaterer', os.name=$osName") "/tmp/DataCaterer" } } - private def setHadoopHome(): Unit = { - System.setProperty("hadoop.home.dir", "/") + private def setHadoopHome(appDataDir: String): Unit = { + System.setProperty("hadoop.home.dir", s"$appDataDir/hadoop") } }