Project Setup¶
Introduction¶
Once FWD is installed, a project must be created to provide the configuration and scripts that will be used to:
- Parse the 4GL application code and schemata.
- Calculate the report results.
- Run the Report Web Server.
In addition, the application's 4GL source code and schemata must be added to the project.
There are two ways to setup a such a project:
- Use a sample project as a template. (This is the preferred approach.)
- Setup the project from scratch, based on the FWD documentation.
There are many reasons to use the sample project as a template:
- The configuration as a whole is already designed and tested as working.
- Only the minimum changes needed can be applied, making it much faster to get started.
- There are scripts and build automation that can be leveraged (no need to "recreate the wheel").
Use a Sample Project as a Template¶
Download the Sample Project¶
You should pick the sample project that most closely fits your application type.
Use the Hotel GUI Download for any GUI application.
Use the Hotel ChUI Download for ChUI, batch or Appserver.
In the above pages, download the file from the "ABL Source Code and FWD Project" link and save it locally.
Unpack the Sample Project¶
These instructions assume that there is a directory structure as follows:
Purpose | Linux | Windows |
---|---|---|
Top level project directory. | ~/app_name/ |
c:\app_name\ |
FWD project location | ~/app_name/p2j/ |
c:\app_name\p2j\ |
Unpack the project (assumes the downloaded file is named ~\app_name\hotel_project.zip
on Linux and c:\app_name\hotel_project.zip
on Windows):
Linux | Windows |
---|---|
cd ~/app_name unzip hotel_project.zip |
First install JDK to use jar tool as zip extractor. cd c:\app_name jar xf hotel_project.zip |
Run the Prepare Template Script¶
To prepare the project for FWD Code Analytics only, run the following script, while in the~/app_name
or c:\app_name
folder:
Linux | Windows |
---|---|
./prepare_template.sh -a |
prepare_template.cmd -a |
Enter your application name (only letters or digits, first character a letter):
This is the name of your application, as it will be known by FWD; it must include only letters or digits, with the first character being a letter, all lowercase, no spaces. If your application name isMy App
, entermyapp
.Edit the regex which matches all your include files (enter for default):
FWD needs to know a regular expression which matches all your include files; this can be of the*.[fhi]
format. If you are running the conversion on an operating system where file names are case-sensitive, make sure to match upper case extensions, too, with a regex like*.[fFhHiI]
. The default value for this entry will be*.[fhi]
.Edit the regex which matches all your program files (enter for default):
Same with include files, FWD needs to know a regular expression which matches all your program files. The default value for this entry will be*.[pPwW]
. If you want to specify an explicit file list to be converted, create a file namedfile-cvt-list.txt
and make a list of the relative filenames of all the programs you wish to analyze. Each name should be relative to the project directory. The build script will know to pickup this file, and will bypass the use of the pattern.Enter the PROPATH from your progress.ini file (enter for default):
At this step, FWD needs to know the PROPATH you are using, from yourprogress.ini
file; by default, this will be set to.;
.Enter the legacy database name(s), separated by a comma:
If you have only one database schema in use, just enter the legacy database name. Otherwise, if your application uses multiple databases, enter all the names separated by a comma, with the name of your default database first. The script will automatically prepare the project to work with all the specified database schemas.
In -a
mode, the script will prepare the project for analytics only; to be able to run full conversion, you will need to run the script again, without the -a
argument.
Overlay Sources¶
All your application source code must be copied into the ./abl/
folder and all your exported database schemas (the .df
files) are copied in the data/
folder of the project directory (~/app_name
or c:\app_name
). More details on the files needed are provided in Gathering Inputs).
Setup a Project From Scratch¶
This is not the preferred approach, but it is useful for understanding and customizing for all possible use cases.
For details, see the Project Setup chapter from the Conversion Handbook.
© 2004-2017 Golden Code Development Corporation. ALL RIGHTS RESERVED.
Next: Internationalization