You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2021/08/01 19:18:14 UTC

[plc4x] 09/13: - Fine-tuned the prerequisiteCheck.groovy and added some finding to the README.md

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch feature/profinet-chris
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 019c6f49f7c4e639fa209df7dd8d15a106e62d39
Author: cdutz <ch...@c-ware.de>
AuthorDate: Sun Aug 1 19:53:14 2021 +0200

    - Fine-tuned the prerequisiteCheck.groovy and added some finding to the README.md
---
 README.md                                |  3 ++-
 src/main/script/prerequisiteCheck.groovy | 23 +++++++++++++----------
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/README.md b/README.md
index bacc30c..e735344 100644
--- a/README.md
+++ b/README.md
@@ -158,7 +158,8 @@ Some tools need to be installed before being able to build on Windows:
 * OpenSSL
 
 We have tested `WinBuilds` with the bundle of: http://win-builds.org/doku.php/download_and_installation_from_windows
-Run the installer as "Administrator" or you won't be able to install it to "C:\Program Files" or the 32 Bit counterpart.
+Run the installer as "Administrator" or you won't be able to install it to every location.
+Please install it to a location, for which the path doesn't contain any whitespaces.
 When running the installer, make sure to select the options:
 * Native Windows
 * x86_64
diff --git a/src/main/script/prerequisiteCheck.groovy b/src/main/script/prerequisiteCheck.groovy
index b672f56..304cf3e 100644
--- a/src/main/script/prerequisiteCheck.groovy
+++ b/src/main/script/prerequisiteCheck.groovy
@@ -183,6 +183,7 @@ def checkFlex() {
 
 def checkGcc() {
     print "Detecting Gcc version:     "
+    // TODO: For windows, check that mingw32-make is on the PATH
     def output
     try {
         output = "gcc --version".execute().text
@@ -286,7 +287,6 @@ def checkCmake() {
     }
 }
 
-
 def checkPython() {
     print "Detecting Python version:  "
     try {
@@ -333,6 +333,10 @@ def checkSetupTools() {
     }
 }
 
+def checkGo() {
+    //TODO: (On windows) ensure the "go" executable is in the path, or there are failures when running the tests.
+}
+
 /*
  * This check does an extremely simple check, if the boost library exists in the maven local repo.
  * We're not checking if it could be resolved.
@@ -437,12 +441,13 @@ println "Detected Arch: " + arch
 // Find out which profiles are enabled.
 /////////////////////////////////////////////////////
 
-println "Enabled profiles:"
 def boostEnabled = false
 def cEnabled = false
 def cppEnabled = false
 def dockerEnabled = false
 def dotnetEnabled = false
+def goEnabled = false
+// Java is always enabled ...
 def javaEnabled = true
 def pythonEnabled = false
 def sandboxEnabled = false
@@ -451,28 +456,22 @@ def activeProfiles = session.request.activeProfiles
 for (def activeProfile : activeProfiles) {
     if (activeProfile == "with-boost") {
         boostEnabled = true
-        println "boost"
     } else if (activeProfile == "with-c") {
         cEnabled = true
-        println "c"
     } else if (activeProfile == "with-cpp") {
         cppEnabled = true
-        println "cpp"
     } else if (activeProfile == "with-docker") {
         dockerEnabled = true
-        println "docker"
     } else if (activeProfile == "with-dotnet") {
         dotnetEnabled = true
-        println "dotnet"
+    } else if (activeProfile == "with-go") {
+        goEnabled = true
     } else if (activeProfile == "with-python") {
         pythonEnabled = true
-        println "python"
     } else if (activeProfile == "with-sandbox") {
         sandboxEnabled = true
-        println "sandbox"
     } else if (activeProfile == "apache-release") {
         apacheReleaseEnabled = true
-        println "apache-release"
     }
 }
 println ""
@@ -543,6 +542,10 @@ if (cppEnabled || cEnabled) {
     checkMavenVersion("3.6.0", null)
 }
 
+if (goEnabled) {
+    checkGo()
+}
+
 if (apacheReleaseEnabled) {
     // TODO: Check libpcap is installed
 }