Migrating existing projects under source control
Migrating from PowerBuilder 8
There are different strategies for migrating existing source
control projects from earlier versions of PowerBuilder. To migrate
a target from PowerBuilder 8 or later, you can check the
target out from source control, then add the target to a workspace in
the new version of PowerBuilder. When the Migrate Application dialog
box prompts you to migrate the libraries in the application library
list, click OK to begin the migration.
If you change the directory hierarchy for target libraries
in the new version of PowerBuilder, you should use the Existing
Application target wizard to create a new target instead of adding
and migrating a PowerBuilder 8 or later target. If you keep the
old target file (PBT) in the new target path, you must give the new
target a different name or the wizard will not be able to create
a new PBT.
For information on using the Existing Application target wizard,
see “Using the Existing Application
target wizard”.
When you open a PowerBuilder 8 or later workspace in the new
version of PowerBuilder, a dialog box prompts you to migrate the
workspace targets. If you select the No Prompting check box and
click OK, the target libraries are migrated without additional prompting,
and the Migrate Application dialog box never displays. You can then
add the migrated target objects to source control from the new version
of PowerBuilder.
For more information about migration, see “Migrating targets”.
Uninstalling PowerBuilder 8 If you uninstall PowerBuilder 8 from a machine where you have
already installed a later version of PowerBuilder, the uninstall
deletes the PBNative registry entry. Subsequently, if you want to
use PBNative source control with PowerBuilder 10, you must
reregister PBNAT100.DLL. Attempting to use PBNative
before reregistering the DLL produces an error message that points out
the problem and the solution. You can reregister the DLL by opening
a DOS command box, switching to the SybaseSharedPowerBuilder directory, and
entering the command REGSVR32 PBNAT100.DLL.
The uninstall for PowerBuilder 9 and later does not remove
the DLL or the registry entry for PBNative source control.
Migrating from PowerBuilder 7 or earlier
Migrating an application from PowerBuilder 7 or earlier requires
a different approach, since workspaces and targets were introduced with PowerBuilder
8. You need to create a new workspace and appropriate targets for
any PowerBuilder 7 (or older) objects that you are migrating.
The strategies available to you or the project manager are:
To use the first strategy, you must keep a copy of the old
version of PowerBuilder—at least until you have finished
migrating all your source-controlled PBLs.
Using the Existing Application target wizard
Source control in early PowerBuilder versions
Because workspaces and targets were not available in PowerBuilder
prior to version 8, you must use the Existing Application wizard
to create targets for applications that you built with PowerBuilder
7 or earlier PowerBuilder versions. A source control project in
PowerBuilder 7 (or earlier PowerBuilder versions) was associated
with a single application. Beginning with PowerBuilder 8, source
control is associated with a workspace that can have multiple targets
and applications.
If you keep a copy of your old version of PowerBuilder, you
can check out your application object and all other objects from
source control to a work PBL.
By checking out the objects in the older version of PowerBuilder,
you make sure that no one else makes changes to the objects before
you migrate them to the current version of PowerBuilder.
Deciding on a directory hierarchy
You should decide on a directory hierarchy before you migrate.
PowerBuilder 7 and earlier versions required you to keep all source-controlled
files in a single directory. Beginning with PowerBuilder 8, you
can create subdirectories to contain each PBL in
your library list. Although this is not required, it is useful in
that it keeps objects from different PBLs separated
in source control subprojects.
You must also decide whether to add a new target to an existing
PowerBuilder workspace or to a new workspace that you create specifically
for the target. You can then use the Existing Application target
wizard to create a new target from the local copies of your registered PBLs (making sure to select all
the supporting PBLs for your
application on the Set Library Search Path page of the wizard).
When you run the wizard, PowerBuilder prompts you to migrate the PBLs you select.
After you have run the wizard and migrated all the source-controlled PBLs, you can define the source
control connection profile for the workspace to point to the old
source control project if you want to maintain it, or to a new source control
project if you do not. You can then check in or add the migrated
objects to source control and delete the work PBL containing
the older versions of the objects. You do not need a separate work PBL in PowerBuilder 9 or
later.
To migrate a source control project using the
Existing Application wizard:
-
From your old version of PowerBuilder,
check out your objects to a work PBL. -
Decide on a new file hierarchy for the libraries
in your application library list.You can keep all the libraries in the same directory if you
want, but it can be advantageous to create separate subdirectories
for each library in the list. If you plan to share libraries among
different targets, you should structure the directories so that
the common libraries are in the local root path of every target
that uses them. -
Create a new workspace in the new version of PowerBuilder,
or open an existing workspace in the new version of PowerBuilder. -
Create a new target using the Existing Application
wizard.In the wizard, point to the PBL with
an Application object and add all the helper PBLs to
the library search path.PowerBuilder prompts you to migrate the PBLs.
-
Click Yes to migrate each library in the path.
-
Create a source connection profile for the workspace
that points to the old source control project or to a new project. -
Check in the migrated objects to source control
if you are using the old source control project, or add the migrated
objects to source control if you are using a new source control
project. -
Delete the work PBL whenever
you want.
Importing source control files to a new library
You can use your source control manager to check out all the
old PowerBuilder objects to a named directory or folder. If you
plan to use the same project to store your migrated objects, you
must make sure that the manager locks the files you check out of
the source control archive.
You can create a new target using the Application target wizard
in a new or existing workspace. The Application wizard lets you
select or name a new PBL file
to associate with the target it creates. You can use the Target
property sheet to list any additional PBLs you
want to associate with the target.
You can then import the files that you checked out of source
control, distributing them as needed to the libraries you associated
with the new target. After importing the files, you can migrate
the target by right-clicking it in the System Tree and selecting
Migrate from the target pop-up menu. You should also do a full build
of the target. After you have migrated and built the target, you
can define the connection profile for the workspace to point to
the old source control project if you want to maintain it, or to
a new source control project if you do not.