Revert "[Tizen] Add codes for Dali Windows Backend"
[platform/core/uifw/dali-core.git] / build / scripts / dali_env
index d3ba046..b55670c 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+# Copyright (c) 2018 Samsung Electronics Co., Ltd.
 
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -47,7 +47,11 @@ my @system_packages = (
     "libharfbuzz-dev",
     "doxygen",
     "lcov",
-    "libcurl4-gnutls-dev"
+    "libcurl4-gnutls-dev",
+    "curl",
+    "libssl-dev",
+    "cifs-utils",
+    "libgtest-dev",
 );
 
 # Some packages like require building from source
@@ -62,7 +66,8 @@ my @source_pkgs = (
 
      # original version used with DALi is 3.25.19. 3.32.7 is the latest we can use before
      # upgrading DALi to use  c++0x or c++11
-     "version" => " 3.32.7", "make" => "make -j8 library=shared", "build-mode" =>"debug" }
+     "version" => " 3.32.7", "make" => "make -j8 library=shared", "build-mode" =>"debug" },
+    {"name" => "gtest" },
 );
 
 ### Detect any http proxy, part of v8 installation requires this information
@@ -129,9 +134,9 @@ else
     }
 }
 
-my $src_path     = "$root_path/src-packages";
-my $sbs_path     = "$root_path/target";
-my $install_path = "$root_path/opt";
+my $src_path         = "$root_path/src-packages";
+my $sbs_path         = "$root_path/target";
+my $install_path     = "$root_path/opt";
 
 my $opt_create=0;
 my $opt_setenv=0;
@@ -176,6 +181,7 @@ sub in_dali_env
 sub create_setenv
 {
     print <<"EOF";
+#
 # To use the desktop libraries, please add the following lines to your .bashrc or
 # create a setenv script from them, e.g. by running this command as follows
 # \$ $install_path/bin/dali_env -s > setenv
@@ -191,6 +197,9 @@ export PATH=$install_path/bin:\$PATH
 export LD_LIBRARY_PATH=$install_path/lib:\$LD_LIBRARY_PATH
 export INCLUDEDIR=$install_path/include
 export PKG_CONFIG_PATH=$install_path/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
+export DOTNET_CLI_TELEMETRY_OPTOUT=1
+export DALI_WINDOW_WIDTH=480
+export DALI_WINDOW_HEIGHT=800
 
 EOF
 }
@@ -206,7 +215,7 @@ sub check_system_package
         if($x[0] ne "ii")
         {
             print "Attempting to install $package\n";
-            system("sudo apt-get -y install $package");
+            system("sudo apt-get -y --force-yes install $package");
         }
     }
 }
@@ -216,6 +225,7 @@ sub check_system_packages
     print "Checking for required system packages (may require sudo password)\n";
 
     check_system_package(@system_packages);
+
     my $gnome_v =`dpkg -l gnome-common| tail -1| sed "s/ \\+/ /g" | cut -d' ' -f 3`;
     my @am = split(/\./, `automake --version | head -1 | cut -f4 -d' '`);
     if($gnome_v =~ /$2.24/ && $am[1]>10)
@@ -245,6 +255,12 @@ sub check_source_packages
         {
             install_v8( $pkgref );
         }
+        elsif ($pkg eq "gtest")
+        {
+            print "Attempting to build $pkg\n";
+            # from https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/
+            run_command("cd /usr/src/gtest; sudo cmake CMakeLists.txt; sudo make; sudo cp *.a /usr/lib; cd -;");
+        }
     }
 }
 
@@ -363,7 +379,7 @@ sub install_v8
 {
     my $v8 = $_[0];
     my $ret;
-    my $v8Version = $v8->{"version"} ;
+    my $v8Version = $v8->{"version"};
     print( "Checking if V8 ". $v8Version. " is installed \n");
 
 ####
@@ -527,7 +543,6 @@ END
 
 }
 
-
 ################################################################################
 #                                       MAIN
 ################################################################################