📄 runjump
字号:
#!/bin/sh## Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved.# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER# # This program is free software; you can redistribute it and/or# modify it under the terms of the GNU General Public License version# 2 only, as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but# WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU# General Public License version 2 for more details (a copy is# included at /legal/license.txt). # # You should have received a copy of the GNU General Public License# version 2 along with this work; if not, write to the Free Software# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA# 02110-1301 USA # # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa# Clara, CA 95054 or visit www.sun.com if you need additional# information or have any questions.### Usage:# runjump [ server | executive | system | command | cvmc | cleanup | status | output | debug | getpid ]### Example commands:## Command: runjump# Action : does a cleanup, then runs the server and executive## Command: runjump server# Action : run the server only## Command: runjump executive# Action : run the executive only## Command: runjump system# Action : run the server and the executive## Command: runjump output# Action : print the server output## Command: runjump command <server command># Action : give a command to the server## Command: runjump cleanup# Action : kill all processes created by server, in addition to the server itself.# This will also kill qvfb if it is running## Command: runjump status # Action : get the status of the server############################ VARIABLE EXPLANATION ################################## Name: PHONEME_DIR# Desc: Location of the root of the phoneme workspace. This should only be used for# linux-86-suse or linux-arm-zaurus builds which are run from within a# development workspace.# Dflt: /home/$WHOAMI/phoneme## Name: PHONEME_DIST# Desc: Location of the phoneme build# Dflt: On linux-x86-suse, default is $PHONEME_DIR/build/linux-x86-suse/$CDC_SUBDIR# On linux-arm-zaurus, default is /home/cdcams.## Name: CDC_SUBDIR# Desc: Subdirectory name of phoneme build# Dflt: none## Name: JUMP_CONTENT_STORE_DIR# Desc: Root of content store# Dflt: data (default value is determined in modules-config.properties)## Name: USE_GCI# Desc: Determines if GCI/directfb will be used to display# Dflt: false## Name: USE_QVFB# Desc: Decides if Qtopia's qvfb is used for display purposes, will automatically# start if set to true.# Dflt: false## Name: QTOPIA_HOME# Desc: Location of Qtopia on a linux x86 machine, for use with linux x86 only.# The qvfb binary is assumed to be located in $QTOPIA_HOME/bin. # Dflt: /opt/Qtopia## Name: QWS_DISPLAY# Desc: For running with Qtopia's qvfb# Dflt: :2## Name: QVFB_WIDTH# Desc: For running with Qtopia's qvfb# Dflt: 240## Name: QWS_HEIGHT# Desc: For running with Qtopia's qvfb# Dflt: 320## Name: PROVISIONING_SERVER_URL# Desc: URL to a provisioning server# Dflt: None#WHOAMI=`whoami` ##### Start: Possible Variables Needing Modification #####if [ -z "$CVM_DEBUG" ] ; then CVM_DEBUG=falsefiPHONEME_PLATFORM=`uname -a | cut -d ' ' -f 12`if [ "$PHONEME_PLATFORM" = "unknown" ] ; then PHONEME_PLATFORM=`uname -a | cut -d ' ' -f 11`fi# PHONEME_DIR is primarily used when running from a build within your workspace.# It sets PHONEME_DIST, which is the important variable for determining the location# of the build. PHONEME_DIR is strategically used to determine PHONEME_DIST.# Note: PHONEME_DIR is when PHONEME_DIST is set by the user.if [ -z "$PHONEME_DIR" ] ; then export PHONEME_DIR=/home/$WHOAMI/phonemefi# Subdirectory name used in Phoneme buildif [ -z "$CDC_SUBDIR" ] ; then export SUBDIR=./else export SUBDIR=$CDC_SUBDIRfi# Default port for debuggingif [ -z "$CDC_DEBUG_PORT" ] ; then export CDC_DEBUG_PORT=8000fi# For running with Qtopia's qvfbif [ "$USE_QVFB" = "true" ] && [ -z "$QWS_DISPLAY" ] ; then export QWS_DISPLAY=:2fi# Location of Qtopia used for qvfbif [ "$USE_QVFB" = "true" ] && [ -z "$QTOPIA_HOME" ] ; then QTOPIA_HOME=/opt/Qtopiafi# The root of content storeif [ "$USE_QVFB" = "true" ] ; then if [ -z "$PBP_SCREEN_BOUNDS" ] ; then PBP_SCREEN_BOUNDS=0,50-640x392 fifiif [ "$USE_QVFB" = "true" ] && [ "$USE_GCI" = "true" ] ; then echo "USE_QVFB and USE_GCI cannot both be true." exit 0fiif [ "$USE_GCI" = "true" ] ; then if [ -z "$PBP_SCREEN_BOUNDS" ] ; then PBP_SCREEN_BOUNDS=0,50-240x270 fifi### Try to determine a default build platform.### This is just a simple way to determine it.### This should be adjusted to fit more platforms.if [ -z "$DEFAULT_LINUX_PLATFORM" ] ; then tmp=`uname -a | awk '{ print $3 }' | grep generic` if [ "$tmp" != "" ] ; then DEFAULT_LINUX_PLATFORM=linux-x86-generic else DEFAULT_LINUX_PLATFORM=linux-x86-suse fifi################# ZAURUS SECTION ########################if [ "$PHONEME_PLATFORM" = "armv5tel" ] ; then if [ -z "$PHONEME_DIST" ] ; then export PHONEME_DIST=/home/cdcams fi export USE_JIT=true export LOGNAME=$WHOAMI export QTDIR=/home/QtPalmtop export USE_QVFB=false################ LINUX X86 SECTION ######################elif [ "$PHONEME_PLATFORM" = "i686" ] ; then if [ -z "$PHONEME_DIST" ] ; then export PHONEME_DIST=$PHONEME_DIR/build/$DEFAULT_LINUX_PLATFORM/$SUBDIR fifiMIDP_PROPERTIES=""EXECUTIVE_PROPERTIES=""EXECUTIVE_ARGUMENTS=""if [ "$JUMP_CONTENT_STORE_DIR" != "" ] ; then SYSTEM_PROPERTIES="-Dcontentstore.root=$JUMP_CONTENT_STORE_DIR"fiif [ "$PROVISIONING_SERVER_URL" != "" ] ; then EXECUTIVE_PROPERTIES="$EXECUTIVE_PROPERTIES -Djump.installer.provisionURL=$PROVISIONING_SERVER_URL"fiSERVER_JARFILE=$PHONEME_DIST/lib/jump.jarEXECUTIVE_JARFILE=$PHONEME_DIST/lib/executive-jump.jarCVMC=$PHONEME_DIST/bin/cvmc##### End: Possible Variables Needing Modification #####DO_SETTINGS=trueDO_CLEANUP=falseDO_SERVER=falseDO_WARMUP=falseDO_EXECUTIVE=falseDO_COMMAND=falseDO_GETPID=falseDO_OUTPUT=falseDO_CVMC=falseif [ "$1" = "server" ] ; then DO_CLEANUP=true DO_SERVER=trueelif [ "$1" = "executive" ] ; then DO_CLEANUP=false DO_EXECUTIVE=true shift EXECUTIVE_ARGUMENTS="$EXECUTIVE_ARGUMENTS $*"elif [ "$1" = "system" ] ; then DO_CLEANUP=true DO_SERVER=true DO_EXECUTIVE=true shift EXECUTIVE_ARGUMENTS="$EXECUTIVE_ARGUMENTS $*"elif [ "$1" = "run" ] ; then DO_COMMAND=trueelif [ "$1" = "cleanup" ] ; then DO_CLEANUP=trueelif [ "$1" = "status" ] ; then DO_STATUS=true# -qcop is something that is returned when launching an icon from the Zauruselif [ "$1" = "-qcop" ] ; then DO_CLEANUP=true DO_SERVER=true DO_EXECUTIVE=trueelif [ "$1" = "" ] ; then DO_CLEANUP=true DO_SERVER=true DO_EXECUTIVE=trueelif [ "$1" = "debug" ] ; then DEBUG_OPTIONS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=$CDC_DEBUG_PORT -Dsun.boot.library.path=$PHONEME_DIST/lib" DO_CLEANUP=true DO_SERVER=true DO_EXECUTIVE=trueelif [ "$1" = "launch" ] ; then DO_COMMAND=trueelif [ "$1" = "getpid" ] ; then DO_GETPID=trueelif [ "$1" = "output" ] ; then DO_OUTPUT=trueelif [ "$1" = "cvmc" ] ; then DO_CVMC=trueelif [ "$1" = "install" ] ; then DO_CLEANUP=true DO_SERVER=true DO_EXECUTIVE=true else echo "Usage: " echo " runjump [ server | executive | system | command | cvmc | cleanup | status | output | debug | getpid ]" echo " Please read the documentation in the top section of this script for more information." exit 0fi if [ "$USE_QVFB" = "true" ]; then unset QTDIR export QTDIR=$QTOPIA_HOME export USE_DASH_QWS=true if [ -z "$QVFB_WIDTH" ] ; then export QVFB_WIDTH=240 fi if [ -z "$QVFB_HEIGHT" ] ; then export QVFB_HEIGHT=320 fi export LD_LIBRARY_PATH=$QTDIR/lib:$PHONEME_DIST/libelse # TBD just keeping old stuff, this line might need to be removed (and in this case the whole if should be simplified into then part) export LD_LIBRARY_PATH=$PHONEME_DIST/lib:$DIRECTFB_DIR/libfi ############# Output log filesCLEANUP_LOGFILE=/tmp/jump_cleanup_$WHOAMISERVER_LOGFILE=/tmp/jump_server_$WHOAMIWARMUP_LOGFILE=/tmp/jump_warmup_$WHOAMIAPP_LOGFILE=/tmp/jump_app_$WHOAMISETTINGS_LOGFILE=/tmp/jump_settings_$WHOAMI
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -