Page 3 of 4
product information in converted VO application
Posted: Tue Jan 07, 2020 1:51 pm
by rjpajaron
Chris wrote:Robert,
What I was puzzled about, is what the resource compiler substitutes "VS_VERSION_INFO" info with, when you do not specify the define. Apparently it substitutes it with nothing, VS_VERSION_INFO is inserted as a string in this case.
Strange thing though is that if you do not specify "VS_VERSION_INFO" at all in the .rc file, but use the value 1 directly, then the string "VS_VERSION_INFO" does still appear embedded in the compiled resource!!! Looks to me like some weird hack MS has done here...
I manually added AssemblyInfo.prg on Project > Properties, by drag and drop because X# do not allow anything to be added in there. I look at FabRT sample, do have AssemblyInfo.prg and do some experimentation, it works. On Windows Explorer, FabRT version information taken from AssemblyInfo is correct.
But, it does not work on my apps. Why? I do not want to use resource file.
Regards,
Rene
product information in converted VO application
Posted: Tue Jan 07, 2020 3:50 pm
by SHirsch
Hi Rene,
if I remember correctly you should not have any native resource in your app to use AssemblyInfo.prg.
Stefan
product information in converted VO application
Posted: Tue Jan 07, 2020 4:09 pm
by robert
Rene,
If your app has one or more native resource files (.rc files) then you also have to add the version info in the form of a version info resource.
W.r.t. the VersionInfo resource: In VO the resource files are "preparsed" and all identifiers that are found as DEFINE are replaced with the value of the define. The _VS_VERSION_INFO is found in the WIn32ApiLibrary
We are looking into a way to help with that for the future but for now you either have to include a #define in the rc file or replace _VS_VERSION_INFO with 1
Robert
product information in converted VO application
Posted: Tue Jan 07, 2020 11:51 pm
by rjpajaron
robert wrote:Rene,
If your app has one or more native resource files (.rc files) then you also have to add the version info in the form of a version info resource.
W.r.t. the VersionInfo resource: In VO the resource files are "preparsed" and all identifiers that are found as DEFINE are replaced with the value of the define. The _VS_VERSION_INFO is found in the WIn32ApiLibrary
We are looking into a way to help with that for the future but for now you either have to include a #define in the rc file or replace _VS_VERSION_INFO with 1
Robert
Hi Robert,
I spent my whole evening last night to solve this problem and I gave up. I cannot use AssemblyInfo.prg in my apps but FabRT (found on Fabtoys) do have it and I experimented on it, making changes here and there, it was reflected back on Windows Explorer.
Things I do not like with resource file now on X# is that I cannot replace string with constant (DEFINE). In my classic VO apps, I have DEFINE stored centrally on one DLL where I change version numbers and VOPP BUILD NUMBER, including branding information. This is the reason I remove all resource file during the porting process because I planned to use the AssemblyInfo.prg where I can manipulate with codes all our branding and versioning system.
For the mean time, I re-created all version.rc prepared by Xporter and it works fine now.
But I want to use AssemblyInfo.prg with FabRT as my model. It work there but it didn't on mine.
--
Rene
product information in converted VO application
Posted: Tue Jan 07, 2020 11:57 pm
by rjpajaron
SHirsch wrote:Hi Rene,
if I remember correctly you should not have any native resource in your app to use AssemblyInfo.prg.
Stefan
Well, I have 6 hrs sleep and refreshed ready to make another run of test.
Last night, I remove all instances of Version.rc in the project folders and still did not work.
I will try again today...
--
Rene
product information in converted VO application
Posted: Wed Jan 08, 2020 12:12 am
by rjpajaron
SHirsch wrote:Hi Rene,
if I remember correctly you should not have any native resource in your app to use AssemblyInfo.prg.
Stefan
and I tried it again.... did not work. Still amazed on how FabRT make this works. I prefer tinkering with AssemblyInfo though. For now, I have 60+ projects to sprinkle with Version.rc - I have to write it from scratch. I remove the one that Xporter had created.....
--
Rene
product information in converted VO application
Posted: Wed Jan 08, 2020 6:26 am
by robert
Rene,
It is not just the version.rc files that prevent Assemblyinfo.prg from adding the version info..
Each VO window and each VO menu also has a RC file.
As long as these UI related RC files are there you will also need to have a version resource to set that into.
Robert
product information in converted VO application
Posted: Wed Jan 08, 2020 6:45 am
by rjpajaron
robert wrote:Rene,
It is not just the version.rc files that prevent Assemblyinfo.prg from adding the version info..
Each VO window and each VO menu also has a RC file.
As long as these UI related RC files are there you will also need to have a version resource to set that into.
Robert
I will try again later today. I am happy now that I am able to open tables and have to track down which ADS files I need to add. One at a time I found out it was ADS remote dll that are needed and X# have built in ADS RDD. Ok, that is good.
Question: I am not yet on making changes on UI but is it safe to remove all *RC files? I will answer that tonight.
--
Rene
product information in converted VO application
Posted: Wed Jan 08, 2020 6:48 am
by Chris
If you do not need your VO DataWindows, Menus etc anymore, you can delete the resources. But if you still want to use them, better keep those resources
product information in converted VO application
Posted: Wed Jan 08, 2020 11:35 am
by rjpajaron
Chris wrote:If you do not need your VO DataWindows, Menus etc anymore, you can delete the resources. But if you still want to use them, better keep those resources
This is weird problems indeed.