Release partial source code for a client

I wrote a program for the company. They need the source code.

The program uses code that I wrote over time for several projects for several clients.

I want to release only the code that is used by this program. Therefore, if the general Utils.pas file contains ten functions, and in this program only two of them are used, I want to release the Utils.pas file with these two functions.

Borland Pascal code written using Delphi.

Does anyone know how I can do this?

Clarification: I am not asking about licensing. I want the client to have only the source code used by their program, and nothing more.

+7
source share
1 answer

Extract your code from utils.pas, in client_xxxx_utils.pas. Charge them with normal speed for the job to do this, rebuild, smoke test, etc. The problem is resolved.

Well, in case it is a difficult task to find out what needs to be cut ... Compile the program and look at the utils.pas node. As a rule, you should have blue dots in the margins, which indicates that you can set breakpoints. The dead code will not have blue dots in the margins, as this code has been eliminated by the linker. Anything without a blue dot is what they don’t need.

For a more automated approach, perhaps the Peganza Pascal Analyzer can identify dead code in one of many reports.

Here are some related questions here on SO with similar answers (some of me!)

Search for unused (so-called "dead") code in Delphi

How to "automatically" remove unused units from a uses clause?

+2
source

All Articles