Two releases of a library
Comparing two releases does not start with exporting them. This tutorial compares the two Order Desk libraries directly, opens one changed object from the result, and then compares a folder of exports against a library. The files are the Order Desk examples described in Your first comparison.
Compare the two libraries
Choose Compare ▸ New Comparison, leave it on
Two-way comparison, and give it
libraries/release-1.4/orders.pbl as Old
and libraries/release-1.5/orders.pbl as
New. Browse accepts a PowerBuilder library as well as a
source file. Choose Compare.
Two whole libraries open a Compare Summary tab: one
row per library entry, each marked New, Modified, Deleted or Unchanged.
Only Changed Items is on when it opens; on a real application
it turns four hundred rows into six. Switch it off to see all fourteen
entries: nine modified, n_invoice_export.sru new,
w_print_preview.srw deleted and three unchanged.
Double-click w_order_entry.srw. The same File Compare opens as the exported files
give in Your first comparison. A row
of a compiled or resource entry does not open a source comparison: it
explains that only metadata or byte comparison is available.
pb-diff opens both libraries read-only. From the command line (summary, changed only):
pb-diff-cli compare-lib libraries/release-1.4/orders.pbl libraries/release-1.5/orders.pbl --format json
pb-diff-cli compare-lib libraries/release-1.4/orders.pbl libraries/release-1.5/orders.pbl --changed-only --format json
Both return exit code 1, differences found; the JSON identifies each entry and its status.
Look through one library
To look through one library rather than compare two, choose
File ▸ Open Library and open
libraries/release-1.5/orders.pbl. Type in the search box to
narrow the list; Source only hides compiled and
resource entries. See Library.
The same list from the command line (result):
pb-diff-cli list libraries/release-1.5/orders.pbl --format json
A folder of exports against a library
New Comparison takes two paths. For a folder of exports, or any set of files, folders and libraries, open File ▸ New File Selection instead: a tab holding two lists, Old and New.
Add the folder old to Old and the library
libraries/release-1.5/orders.pbl to New, by dragging them
from Explorer onto the list or with the tool bar's Old Folder
and New Files buttons. Then save the selection with
File ▸ Save. The lists show a folder of release 1.4
exports against the release 1.5 library.
Compare pairs each exported file with the library entry of the same object, even though one side is a folder and the other a library: the same eleven changes as between the two libraries, and the unchanged objects with them when Only Changed Items is off.
The CLI addresses a library entry directly, written
library!entry (result):
pb-diff-cli compare libraries/release-1.4/orders.pbl!d_order_lines.srd libraries/release-1.5/orders.pbl!d_order_lines.srd --format json
The saved
selection names its folder and its library under
C:\pb-diff-demo. It opens unchanged when the examples are
there; otherwise build the same selection with your own paths.
Next
- Pair renamed objects: when an object was renamed between the releases.
- Reports: a report of what changed between the two libraries.
- PowerBuilder 2025 Solutions: the same comparison when a release is a Solution.
- Reading PowerBuilder libraries: what a library holds and what pb-diff does with each kind of entry.