You can start the PocketBuilder executable from a command line to build a workspace without opening the development environment, or to open the development environment with a specific painter or object open. You can also use the Windows Run dialog box to accomplish these tasks.
The general syntax is:
directory\pk20.exe {/workspace workspacepath} {deployoptions | runoptions} {/output outputpath}
where directory is the fully qualified name of the directory containing PocketBuilder.
Option |
Description |
---|---|
/W workspacepath |
Opens the workspace workspacepath. This option is required for deployment. To open PocketBuilder, the default is the most recently used workspace if you have selected the Reopen Workspace on Startup check box in the System Options dialog box. If you have not selected this check box, you must specify the /W option before specifying any other options. |
deployoptions |
Options for deploying the workspace. See Table 22-2. |
runoptions |
Options for opening the development environment. See Table 22-3. |
/OU outputpath |
Logs the contents of the Output window to outputpath. |
Short option names
The syntax statements in this chapter show the long form of
option names. You need only use the initial letter or letters of
the option name as long as the option is uniquely identified, as
shown in Table 22-1.
The deploy options are deploy, fullbuild, and incrementalbuild. These options must be used with the workspace option.
You need to create projects and specify build and deploy options for the workspace in PocketBuilder before you start a build from the command line. Deploy builds the projects in the target in the order listed on the Deploy page of the target properties dialog box.
When you deploy or build a workspace from a command line, PocketBuilder starts, completes the build, and exits as soon as the operation is completed. To retain a log file for the session, you can send the contents of the Output window to a file.
This example assumes that the location of the PocketBuilder executable file is in your system path or in the directory from which you enter the command. It opens the workspace called CDShop, builds and deploys the targets in the workspace according to your specifications in the workspace and target properties, records the content of the Output window in the file D:\tmp\cdshop.out, and exits PocketBuilder:
pk20 /w D:\CDShop\CDShop.pkw /d /out D:\tmp\cdshop.out
When you start PocketBuilder from a command line, you can optionally open a workspace, target, and/or painter. These are the painters and tools you can open:
Application painter
Database painter
DataWindow painter
Debugger
File Editor
Function painter
Library painter
Menu painter
Query painter
Structure painter
User Object painter
Window painter
You can also add options to the command line after /painter paintername to open a specific object or create a new one:
{/target targetpath} {/painter paintername} {/library libraryname} {/object objectname} {/inherit objectname} {/new} {/run} {/runonly} {/argument arguments}
The following examples assume that the location of the PocketBuilder executable file is in your system path.
This example starts a PocketBuilder session by opening a new window (a window object is not specified) in the Window painter for the Client PKL in the Math workspace. The output of the session is sent to a file called math.log. The workspace file, the PKL, and the log file are all in the current directory:
pk20 /w Math.pkw /l Client.pkl /p window /out math.log
Enter this command to start PocketBuilder and open the DataWindow object called d_emp_report in the workspace Emp.pkw:
pk20 /w D:\pkws\Emp.pkw /P dataw /O d_emp_report
Copyright © 2004. Sybase Inc. All rights reserved. |