I have similar issue. Problem is, I'd like to use the same unit in different projects, and the values of the variable are different between projects. In this case, I cannot define it in the initialization section of the unit. So, I'm thinking setting it at the project file, which starts with
program MyProject1;
uses ......
begin
Application.Initialize;
Application.CreateForm (TForm1, form1);
MyGlobalVariable := 'Your name'; // A Variable defined in TForm1, or unit1, etc.
Application.Run;
end.
But I'm not sure whether this is a good idea. Up to now there is no problem. But still waiting for better idea or advise.
Or what about defining variable below the program, which is available to all units within the project? (maybe in addition to conditional compiler directives?)