[pitivi] build: Cleanup the way we launch apps in the sandbox



commit 051f9b2d2303581d80e12384269d64d24a1526cd
Author: Thibault Saunier <tsaunier gnome org>
Date:   Mon Mar 21 14:05:45 2016 +0100

    build: Cleanup the way we launch apps in the sandbox
    
    And set some env variables

 build/xdg-app/enter_env     |   12 ++++++++++-
 build/xdg-app/pitivi-bundle |   44 ++++++++----------------------------------
 2 files changed, 20 insertions(+), 36 deletions(-)
---
diff --git a/build/xdg-app/enter_env b/build/xdg-app/enter_env
index e9427ee..fb6b69a 100755
--- a/build/xdg-app/enter_env
+++ b/build/xdg-app/enter_env
@@ -14,4 +14,14 @@ cp ~/.bashrc $RCFILE
 echo "export PS1=[ptv]\ \$PS1" >> $RCFILE
 generate_path_and_completion_calls >> $RCFILE
 
-bash --rcfile $RCFILE
+
+if [ -z "$*" ]
+then
+  echo "=============================="
+  echo "Entering own built environment"
+  echo "=============================="
+
+  bash --rcfile $RCFILE
+else
+  $*
+fi
diff --git a/build/xdg-app/pitivi-bundle b/build/xdg-app/pitivi-bundle
index 672482f..de36c7d 100755
--- a/build/xdg-app/pitivi-bundle
+++ b/build/xdg-app/pitivi-bundle
@@ -359,41 +359,15 @@ then
   # Launch development environment if we are not creating a bundle
   if [ -z $BUNDLE ]
   then
-    if [ -z "$*" ]
-    then
-      echo "=============================="
-      echo "Entering own built environment"
-      echo "=============================="
-
-      cd $SCRIPTDIR
-      xdg-app build --socket=x11 --socket=session-bus --socket=pulseaudio --share=network $PREFIX 
$SCRIPTDIR/enter_env
-    else
-
-      echo "#!/bin/sh" > $SCRIPTDIR/tmpscript
-      echo $* >> $SCRIPTDIR/tmpscript
-      chmod +x $SCRIPTDIR/tmpscript
-
-      xdg-app build --socket=x11 --socket=session-bus --socket=pulseaudio --share=network $PREFIX 
$SCRIPTDIR/tmpscript
-    fi
-
-    exit $?
-  fi
-else
-  if [ -n "$INSTALLER" ]
-  then
-    printf "$GREEN
-====>$APPLICATION_DESKTOP_NAME is now ready to be used, you can launch it through the application launcher, \
-as any other application. $NC
-
-To update the application, you can re launch that installer.\n\n"
-  fi
-
-  echo "-> Running $APPLICATION_REF_NAME $BRANCH..."
-  xdg-app run --branch=$BRANCH $APPLICATION_REF_NAME
-
-  exitcode=$?
-  if [ -n "$INSTALLER" ]
-  then
+    cd $SCRIPTDIR
+    xdg-app build --socket=x11 --socket=session-bus --socket=pulseaudio \
+      --share=network \
+      --env=GST_DEBUG=$GST_DEBUG \
+      --env=GST_VALIDATE=$GST_VALIDATE \
+      --env=GST_VALIDATE_LAUNCHER_DEBUG=$GST_VALIDATE_LAUNCHER_DEBUG \
+      --env=PITIVI_DEBUG=$PITIVI_DEBUG \
+      --env=GST_DEBUG_DUMP_DOT_DIR=$GST_DEBUG_DUMP_DOT_DIR \
+      $PREFIX $SCRIPTDIR/enter_env $*
     printf "\n\nYou can now exit that terminal."
   fi
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]