Quantcast
Channel: Planet Object Pascal
Viewing all articles
Browse latest Browse all 1725

The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

Just as a few small notes as a reminder to myself:

  1. bash profile shortcuts to the right PAServer or paserver
  2. PAServer command-line options
  3. example output of PAServer commands

Lets get started:

1. bash profile shortcuts to …PAServer/…/paserver:

Jeroens-MacBook-Pro:~ jeroenp$ tail ~/.bash_profile
# PAServer: full version which includes the library path
PAServer()
{
#http://stackoverflow.com/questions/2135644/how-can-i-define-a-bash-alias-as-a-sequence-of-multiple-commands/2135794#2135794
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:"~/Applications/Embarcadero/RADPAServer/11.0"
~/Applications/Embarcadero/RADPAServer/11.0/paserver
}

# paserver: short version only executing the paserver
alias paserver='~/Applications/Embarcadero/RADPAServer/11.0/paserver'

Note that these directories are for Delphi XE4; for Delphi XE3, they are ~/Applications/Embarcadero/PAServer. Future versions probably only change the 11.0 version number.

I use that as I was a bit tired of performing the steps described in Running paserver on a Mac which only executes paserver, not paserver.command. Some Delphi applications depend on libraries that might not be copied over into the scratch directory. In that case you need to execute paserver.command for the library path to be set correctly and make sure that the correct libraries are installed with Delphi. So I have two commands:

  • PAServer executes what paserver.command would, but takes into account that the PAServer might have been relocated to another user
  • paserver executes just the paserver executable from the correct (relocatable) directory.

The first is actually a bash function, the last a bash alias.

This is the paserver.command file on my system:

Jeroens-MacBook-Pro:~ jeroenp$ cat ~/Applications/Embarcadero/RADPAServer/11.0/paserver.command
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:"/Users/jeroenp/Applications/Embarcadero/RADPAServer/11.0"
"/Users/jeroenp/Applications/Embarcadero/RADPAServer/11.0/paserver"

2. command-line options (both Windows and Mac OS X; I’m showing Mac OS X):

Edit I hate this, but WordPress screwed with the source code tags. Again. Their TinyMCE editor s(!@#, at least now they realize it. Will fix it later.

Jeroens-MacBook-Pro:~ jeroenp$ paserver --help
Platform Assistant Server  Version 3.0.4.01
Copyright (c) 2009-2013 Embarcadero Technologies, Inc.

Invalid option: --help; use paserver -help for Help
Jeroens-MacBook-Pro:~ jeroenp$ paserver -help
Platform Assistant Server  Version 3.0.4.01
Copyright (c) 2009-2013 Embarcadero Technologies, Inc.

Usage: paserver [options>]

where  include:
  -port=        Specify the port number, default=64211
  -scratchdir=</pre>
<dir>Specify the parent directory for client temporary files</dir>&nbsp;

<dir>-libextension= Specify the dynamic library extensions, default=,dylib,h</dir>&nbsp;

<dir>-tarcommand= Specify the path for tar binary, default=/usr/bin/tar</dir>&nbsp;

<dir>-debuglauncher= Specify the debugger launcher application</dir>&nbsp;

<dir>-devicetimeout= Specify the device connection timeout in seconds,</dir>&nbsp;

<dir>default=10</dir>&nbsp;

<dir>-nopermissioncheck Do not attempt to acquire permission to support debugging</dir>&nbsp;

<dir>-unrestricted Allow put and remove file(s) operation outside client</dir>&nbsp;

<dir>temporary files directory, default is not allowed</dir>&nbsp;

<dir>-password= Specify the remote profile login password, default is</dir>&nbsp;

<dir>to prompt for the login password</dir>&nbsp;

<dir>-passfile= Specify the remote profile login passfile, default is</dir>&nbsp;

<dir>to prompt for the login password</dir>&nbsp;

<dir>-config= Specify the default settings</dir>&nbsp;

<dir>-help Print this help screen</dir>&nbsp;

<dir>
  • default port number is 64211
    (you need this option if the port is already occupied by some other process, for instance when you run multiple sessions of different PAServer versions next to each other on the same system)
  • as of Delphi XE4, you can show the listening IP address: as with Delphi XE3, they are all IPv4 and IPv6 adresses (both physical and virtual VMware Fusion ones)
  • the default scratch-directory is under the PAServer one: ~/Applications/Embarcadero/RADPAServer/11.0/scratch-dir
  • there is no default passfile, but generating one puts it into /Users/jeroenp/Applications/Embarcadero/RADPAServer/11.0/paserver.passfile
  • you cannot show the current values of libextension, tarcommand, debuglauncher and devicetimeout
  • devicetimeout is new in Delphi XE4
  • if you want to get infected by trojans and other mayhem, leave the password blank, and allow for unrestricted
  • if you do not specify a password or passfile, you are prompted for a password
    (press Enter to keep it blank; if you do that, make sure PAServer does not listen on external IP adresses)
  • You can specify all the options in one big config file that has a set of key=value pairs containing the above settings.
  • the -help option gives you the above help.

3. the examples of the commands you can use within PAServer:

Finally some example output of these commands:

  • q – stop the server
  • c – print all clients
  • p – print port number
  • i – print available IP addresses
  • s – print scratch directory
  • g – generate login passfile
Jeroens-MacBook-Pro:~ jeroenp$ PAServer
Platform Assistant Server  Version 3.0.4.01
Copyright (c) 2009-2013 Embarcadero Technologies, Inc.

Connection Profile password :

Acquiring permission to support debugging...succeeded

Starting Platform Assistant Server on port 64211

Type ? for available commands
>?
q - stop the server
c - print all clients
p - print port number
i - print available IP addresses
s - print scratch directory
g - generate login passfile
>c
No client connected
>p
64211
>i
172.16.149.1
172.16.172.1
192.168.171.227
FE80:0:0:0:1610:9FFF:FED9:4C7F
>s
/Users/jeroenp/Applications/Embarcadero/RADPAServer/11.0/scratch-dir
>g
/Users/jeroenp/Applications/Embarcadero/RADPAServer/11.0/paserver.passfile generated
>q
Jeroens-MacBook-Pro:~ jeroenp$

–jeroen

.
.
.
.
.
.
.

.
.
.
.
.
.
.


Filed under: Delphi, Delphi XE3, Delphi XE4, Development, Software Development

Viewing all articles
Browse latest Browse all 1725

Trending Articles