product information in converted VO application

This forum is meant for questions and discussions about the X# language and tools
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

product information in converted VO application

Post 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
User avatar
SHirsch
Posts: 282
Joined: Tue Jan 30, 2018 8:23 am

product information in converted VO application

Post by SHirsch »

Hi Rene,

if I remember correctly you should not have any native resource in your app to use AssemblyInfo.prg.

Stefan
User avatar
robert
Posts: 4258
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

product information in converted VO application

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

product information in converted VO application

Post 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
FabRT.rar
(15.93 KiB) Downloaded 20 times
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

product information in converted VO application

Post 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
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

product information in converted VO application

Post 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
User avatar
robert
Posts: 4258
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

product information in converted VO application

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

product information in converted VO application

Post 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
User avatar
Chris
Posts: 4583
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

product information in converted VO application

Post 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 :)
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

product information in converted VO application

Post 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.
Post Reply