Question Compile a Program in different environment

I am trying to build a utility to compile programs in different environments. When the user selects an environment and Press compile button run the below code
CONNECT database -H dbserver -S 29000.
Compile c:\temp\program.p save into e:\cmp\ .
DISCONNECT database.
My doubt is How can I invoke the respective INI file just before the comilation (NOT Propath alone) and after the compile back to the old INI which was already there. Is it possible? Both INI file (old and new) paths I can input to this utility program. Progress Versions are the same in all environments. Are there any factors other than PROPATH that will influence the compilation? If not then I need only the refresh PROPATH is required.
Last edited:

Rob Fitzpatrick Sponsor
Can you expand on what you mean by "different environments"? How are they different exactly? Some possibilities:
  • DLC
  • propath
  • font lists
  • colour definitions
  • window system (gui vs. tty)
  • assemblies
  • Windows metrics (display resolution, taskbar size, scrollbar size, theme)
These things can affect the r-code that is produced in a Windows compile. You may have to have your compile utility launch a new client process to run your compile, rather than having the utility to it directly. But it is hard to say as I am not clear on what you are trying to accomplish.

Also, it strikes me as a little odd that a user would be running a compile interactively. I would expect that if you decided to change an existing compile process, you would move to an automated build pipeline that produces the needed deployment artifacts.
Hi Rob,
Thanks a lot.

From the list you mention, the Main difference is propath only. This utility is mainly for developers ONLY. We have Progress & SQL environments (SQL Shema holder). So when a developer checks out 1 program, we need to compile it in 4 environments (2 different versions of the application ) - this will repeat for Progress and SQL..... Progress versions are the same.
To avoid this, a single window screen in which the program paths to compile, Environment to compile, DB connection Parameters, and Path to save will be available and can be used as inputs. The challenge is to read Propath from INI (Not the loaded one) and then compile it. Set the old propath.... after the compile.


Rob Fitzpatrick Sponsor
The challenge is to read Propath from INI (Not the loaded one) and then compile it. Set the old propath.... after the compile.
If you are only reading the propath from the .ini file then you don't need that file at all. The client doing the compile can instead set the propath programmatically. If you want to read a reference propath from a file, it would be easier to use a text file with an input stream rather than an .ini file.