コード例 #1
0
 def _GetLocation(self):
    """
    """
    hn = SystemConfig.instance().GetHostname()
    if isWindows():
       return "windows://" + hn
    elif isLinux():
       if os.getenv("DISPLAY"):
          return "X11://" + hn + ":" + os.getenv("DISPLAY").split(":")[-1]
       else:
          return "X11://" + hn + ":0.0"
    else:
       return "unknown://hn"
コード例 #2
0
ファイル: CvsSetup.py プロジェクト: aabhasgarg/accessgrid
    os.system( "export PYTHONPATH=%s; " % python_path + os.path.join(".", "GenerateInterfaces.py") + " --quiet" )
os.chdir(origDir)

# Tell users how to use the new configuration files.
from AccessGrid.Platform import isOSX, isLinux, isWindows
if not options.quiet:
    print "\n    --------------------------------------------------------------"
    print ""
    print "    To use this configuration:\n"
    print "       Make sure media-related programs (vic, rat, etc.) are in your path."
    if isWindows():
        print "          On Windows: copying the vic and rat related binaries (if needed, "
        print "          from a real install) into their own directory before adding them "
        print "          to your path is recommended.  If you don't want to bother modifying "
        print "          your path, copying them into AccessGrid/bin is a quick fix.\n"
    elif isLinux() or isOSX():
        print "          On linux: if you've installed the vic and rat rpm packages,"
        print "          they should already be in your path.\n"
    else:
        print "Error, your platform is not defined.  Please add it to CvsSetup.py"

    print "       set AGTK_LOCATION to", agtk_location
    print "       set PYTHONPATH to", python_path
    print ""

if isLinux() or isOSX():

    #
    # Write bourne/bash shell version
    #
    
コード例 #3
0
#-----------------------------------------------------------------------------
import sys
import os

from wxPython import wx

from AccessGrid.Platform import isWindows, isLinux
from AccessGrid.Platform.Config import SystemConfig
from AccessGrid.GUID import GUID

from AccessGrid.hosting import Server
from AccessGrid.hosting.SOAPInterface import SOAPInterface, SOAPIWrapper

if isWindows():
   from DisplayWin32 import GetWindowList
elif isLinux():
   from DisplayLinux import *
   
class DisplayService:
   """
   id : string
   location : string [protocol://<host>:<port>/]  
      - examples: 
      - x://host:0
      - windows://host
      - vnc://host:port/
      - rdp://host:port/)
   
   displayWidth : integer
   displayHeight : integer
   displayDepth : integer
コード例 #4
0
    os.system( "export PYTHONPATH=%s; " % python_path + " " + sys.executable + " " + os.path.join(".", "GenerateInterfaces.py") + " --quiet" )
os.chdir(origDir)


#--------------------------------------------------------------------------------
# Build device discovery executables
#--------------------------------------------------------------------------------
os.system("%s\\tools\\makewdmscan.bat %s" % (ABS_AG_BASE_DIR,ABS_AG_BASE_DIR))
os.system("%s\\tools\\makevfwscan.bat %s" % (ABS_AG_BASE_DIR,ABS_AG_BASE_DIR))

#--------------------------------------------------------------------------------
# Write environment initialization files
#--------------------------------------------------------------------------------
from AccessGrid.Platform import isOSX, isLinux, isWindows
print "Writing environment initialization files"
if isLinux() or isOSX():

    #
    # Write bourne/bash shell version
    #
    
    fh = open("env-init.sh", "w")
    fh.write("""
export AGTK_LOCATION=%(agtk_location)s

DELIM=
if [ -n "$PYTHONPATH" ] ; then
    DELIM=:
fi
export PYTHONPATH=${PYTHONPATH}${DELIM}%(python_path)s
""" % locals())