ITPub博客

首页 > Linux操作系统 > Linux操作系统 > [转]WHAT IS PBORCA.EXE ?

[转]WHAT IS PBORCA.EXE ?

原创 Linux操作系统 作者:minkun 时间:2009-08-14 09:49:54 0 删除 编辑

此文转载于http://dm.char.com.ua/pb/pborca.htm

WHAT IS PBORCA.EXE ? - it is a free tool to compile Powerbuilder projects and to manage objects in PBL libraries.
*.ORC files - it's a special scripts to do it.

Download Old ANSI version:
pborcaA.rar version (YMD)2005-01-13
Download New UNICODE+ANSI version:
pborcaW.rar version (YMD)2007-08-08


Package contents
install.cmd installation script. copies pborca.exe to windows\system32 directory and imports pborca.reg into your registry
pborca.exe A unicode tool to execute orca scripts (*.orc)
pborcaa.exe An ansi tool to execute orca scripts (*.orc)
pborca.htm this file
example.orc contains all orca script commands with explanations.
pborca.reg windows registry modification to support context menu for *.orc files

You can use install.cmd to install this tool on your computer.
After installation you'll have a special context menu in the explorer for *.orc files:

Edit Script opens selected orca script. using notepad
Run Script executes all commands from the selected orca script using pborca.exe

NOTE : To use this tool you have to set your path environment variable to PowerBuilder shared files.


Rools of the ORCA SCRIPT

One command - one line.
Comma - is delimiter for parameters of the command.
# at the begining of the line designate all text on the line as a comment.
% - is a meta. symbol.
the following meta. symbols are supported:

%n New line
%r Carriage return
%t Tab
%, Comma
%% %
combination with any other symbol - returns symbol itself
Some parameters are optional and could be omitted. In this help they are quoted with []:
regenerate
[pblName], [itemName], [itemType]
If a parameter is omitted, you must specify coma in any case. Example:
#regenerate all windows in test.pbl
regenerate
test.pbl, , win

#regenerate all objects named "main" in test.pbl
regenerate
test.pbl, main,

#regenerate all objects in test.pbl
regenerate
test.pbl, ,

#regenerate all objects in all libraries from the current library list
regenerate
, ,

The command parameters could contain environment variables:
#create library my.pbl in %TMP% directory
library create
%%TMP%%\my.pbl ,

You can pass variables as parameters to pborca.exe :
    pborca.exe -Dsrcdir=c:\projects\TestSvn -Ddstdir=c:\projects\TestPb
In script. you can access these new variables:
#import c:\projects\TestSvn\myObject.sru into c:\projects\TestPb\myLib.pbl
import
%%SRCDIR%%\myObject.sru , %%DSTDIR%%\myLib.pbl


SUPPORTED ORCA COMMANDS
session begin pbOrcDll Starts orca session. The new parameter pbOrcDll defines which PowerBuilder version you are going to use during this session.
This library appears in the PowerBuilder Shared folder.
The name of this library is pborcXX.dll, where XX is version of PowerBuilder. For example:
PB Version DLL Name
6.5 pborc65.dll
7.0 pborc70.dll
9.0 pborc90.dll
10.0 pborc100.dll
10.5 pborc105.dll
#Example of command:
session begin
pborc70.dll
Note: current version of PBORCA.exe does not support unicode versions of PB
copy item pblSrc, [entryName], [entryType], pblDst copies object(s) from library pblSrc to pblDst.
entryName or/and entryType could be omitted for all objects.
entryType: app, dw, fn, menu, query, struct, uo, pipe, proxy, or win.
pblSrc can contain wildcard characters (* and ?).
Note: this command overwrites item in the destination library.
library create pblName, [comments] creates a new library pblName with comments
set liblist begin Special command to begin library list enumeration.
After this command, every line is a pbl library name.
There could be comments within the library list.
Optionally you can specify parameters of PBL compilation (used only for build exe command).
The format of library list item is:
pblName[;] [, isPBD [, pbrName] ]
Where:
pblName is a library name. It can contain ';' at the end (like in PB library list)
isPBD specifies a way to build this library. Use value 1 to build PBD/DLL for this library, or 0 to include it into executable. If this option is omitted then default value used = 1.
pbrName defines a resource file for the pblName. You can't specify pbrName if isPBD=0.
#Usage example:

set liblist begin
#do not compile test1.pbl into separate PBD/DLL
test1.pbl , 0
#compile test2.pbl into separate PBD/DLL and use test2.pbr resource file
test2.pbl , 1, test2.pbr
#compile test3.pbl into separate PBD/DLL (default behavior)
test3.pbl
set liblist end
set liblist end Special command to end library list enumeration.
set application pblName, applicationName Sets current application applicationName. The parameter pblName defines name of the application library.
If both parameters ommited, ORCA will set up an internal default application as current application (usefull to create(import) a new application).
build app buildType Compiles all the objects in the libraries included on the library list.
If necessary, the compilation is done in multiple passes to resolve circular dependencies.
buildType: full or incremental or migrate.
build exe exeName, iconName, pbrName, codeType Creates a PowerBuilder executable with codeType=pcode or codeType=machinecode.
Note: before creating executable you must delete the file exeName if it exists.
build library pblName, [pbrName], type Creates a separated PowerBuilder dynamic library with type=pbd or type=dll.
Note: To build all libraries+executable use build exe command.
delete item pblName, entryName, entryType Deletes a PowerBuilder library entry entryName of type entryType from library pblName.
delete duplex primaryLib, deleteFromLib Deletes objects from deleteFromLib that found in the primaryLib.
regenerate [pblName], [itemName], [itemType] Compiles an object itemName of type itemType in a PowerBuilder library pblName.
The itemName and/or itemType could be omitted, then the parameter will be ignored.
If pblName is omitted then regeneration will be done for all libraries from the library list.
Note: you should set library list and application, to make regeneration correctly.
regenerateall Compiles (regenerates) each object from the library list while there are compilation errors. This command was created specially for use after importing the whole project from source files. During rebuild ( full or migrate ) pborca can crash. In this case use this command.
Note: you should set library list and application, to make regeneration correctly.
export pblName, [itemName], [itemType], directory Exports object(s) defined by itemName and itemType from a library pblName to a destination directory.
The itemName and/or itemType could be omitted, then the parameter will be ignored.
The pblName can contain wildcard characters (* and ?). For unicode version only HEXASCII export type implemented.
import exportedFile, dstLibrary Imports previously exported object(s) from exportedFile into dstLibrary. Ignores all compilation errors. You must set application before calling this function. If it's a new application, you must set default application by calling
set application ,
without any parameters. After whole application import you must call build app migrate .
The exportedFile can contain wildcard characters (* and ?).
#Usage example:
import
*.sr?, temp\work.pbl
For unicode version only HEXASCII, ASCII, and UNICODE file types are supported.
import move exportedFile, dstLibrary The same as import but after execution exportedFile will be deleted from your disk.
import moveok exportedFile, dstLibrary The same as import move but after execution exportedFile will be deleted from your disk only if import was done without any errors.
import pbg2pbl pbgFile, dstFolder Imports all objects specified in the pbgFile into corresponding pbl file located in dstFolder
pbgFile
could contain wildcard symbols. dstFolder is a path where PBLs must be located.
Libraries must exist and present in the library list.
import pbg2pbl any pbgFile, dstFolder The same as import pbg2pbl but skips pbg and source files if they are not exists.
sys sys_command Executes system command defined by sys_command.
echo text Displays text messagee.
timestamp displays current date and time.
target create lib pbtFile creates powerbuilder libraries that are specified in the target file pbtFile.
Libraries will be located in the relative path to pbtFile.
Note: target should contain only relative paths for libraries!
target import pbtFile, sourceDir For each library specified in pbtFile,
    opens corresponding pbg file in sourceDir,
       and imports all the objects from the sourceDir for each pbg
          into a library that is located near pbtFile.
Note: Before this command you have to set library list and application.
target import any pbtFile, sourceDir The same as target import but skips pbg and source files if they are not exists.
target set app pbtFile Sets current application specified in pbtFile. See: set application command.
target set liblist pbtFile Sets library list specified in pbtFile.
session end ends orca session.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/1845770/viewspace-612286/,如需转载,请注明出处,否则将追究法律责任。

上一篇: [转]PB进程管理
请登录后发表评论 登录
全部评论

注册时间:2009-08-06

  • 博文量
    14
  • 访问量
    22156