Add "--version" option for dotnet-launcher
authorpius.lee <pius.lee@samsung.com>
Tue, 11 Oct 2016 07:27:34 +0000 (16:27 +0900)
committerpius.lee <pius.lee@samsung.com>
Tue, 11 Oct 2016 07:27:34 +0000 (16:27 +0900)
Change-Id: I74e371732fd617e753711bcf9f1e9d9ba4c7e6a9

NativeLauncher/CMakeLists.txt
NativeLauncher/src/dotnet/dotnet_launcher.cc
NativeLauncher/src/main.cc
packaging/dotnet-launcher.spec

index 00657be..37db3f2 100644 (file)
@@ -34,6 +34,10 @@ IF(DEFINED RUNTIME_DIR)
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DRUNTIME_DIR=${RUNTIME_DIR}")
 ENDIF(DEFINED RUNTIME_DIR)
 
+IF(DEFINED VERSION)
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DVERSION=${VERSION}")
+ENDIF(DEFINED VERSION)
+
 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -pthread -std=c++11 -Wl,--no-as-needed -ggdb")
 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wl,-zdefs" )
 #SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
index 62738a3..d9879ba 100644 (file)
@@ -171,7 +171,7 @@ int CoreRuntime::RunManagedLauncher()
     "UseLatestBehaviorWhenTFMNotSpecified"
   };
   
-  _DBG("trusted platform assemblies : %s", propertyValues[0]);
+  //_DBG("trusted platform assemblies : %s", propertyValues[0]);
   _DBG("app_path : %s", propertyValues[1]);
   _DBG("app_ni_path : %s", propertyValues[2]);
   _DBG("native dll search path : %s", propertyValues[3]);
index 41c0362..c9790ce 100644 (file)
 #include <Ecore.h>
 #include <Eina.h>
 
+#define __XSTR(x) #x
+#define __STR(x) __XSTR(x)
+
+#ifndef VERSION
+#define LAUNCHER_VERSION_STR "-Unknown-"
+#else
+#define LAUNCHER_VERSION_STR __STR(VERSION)
+#endif
+
+static std::string VersionOption("--version");
 static std::string StandaloneOption("--standalone");
 
 int main(int argc, char *argv[])
@@ -22,7 +32,12 @@ int main(int argc, char *argv[])
 
   for (i=1; i<argc; i++)
   {
-    if (StandaloneOption.compare(argv[i]) == 0)
+    if (VersionOption.compare(argv[i]) == 0)
+    {
+      printf("Dotnet launcher Version %s\n", LAUNCHER_VERSION_STR);
+      return 0;
+    }
+    else if (StandaloneOption.compare(argv[i]) == 0)
     {
       standalone = true;
 
index ee96df0..9ff66ee 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:       dotnet-launcher
 Summary:    Launchpad plugin for dotnet apps
-Version:    0.0.2
+Version:    1.0.0
 Release:    2
 Group:      Application Framework/Application State Management
 License:    Apache License, Version 2.0