product information in converted VO application

This forum is meant for questions and discussions about the X# language and tools
leighproman
Posts: 60
Joined: Tue Oct 11, 2016 8:56 pm
Location: UK

product information in converted VO application

Post by leighproman »

How do you add product information (product name, company name etc) to a converted (xported) VO application in VS2017?
In VO28 we have a VERSIONINFO resource but this doesn't get carried over by VOXporter.
Thanks
Leigh
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

product information in converted VO application

Post by lumberjack »

leighproman wrote:How do you add product information (product name, company name etc) to a converted (xported) VO application in VS2017?
In VO28 we have a VERSIONINFO resource but this doesn't get carried over by VOXporter.
Add an AssemblyInfo.prg to your application:

Code: Select all

#using System.Reflection
#using System.Runtime.InteropServices

[assembly: AssemblyTitleAttribute( "" )]
[assembly: AssemblyDescriptionAttribute( "" )]
[assembly: AssemblyConfigurationAttribute( "" )]
[assembly: AssemblyCompanyAttribute( "" )]
[assembly: AssemblyProductAttribute( "" )]
[assembly: AssemblyCopyrightAttribute( "Copyright © " )]
[assembly: AssemblyTrademarkAttribute( "" )]
[assembly: AssemblyCultureAttribute( "" )]

[assembly: AssemblyVersionAttribute( "1.0.*" )]
[assembly: AssemblyFileVersionAttribute( "1.0.*" )]
______________________
Johan Nel
Boshof, South Africa
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

product information in converted VO application

Post by wriedmann »

Hi Leigh,

unfortunately I don't know how to add this information to a Visual Studio project, but of course also a .NET application can contain a VersionInfo ressource (and in fact I'm using that one in all of my X# applications, both converted from VO and natively written in X#).

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

product information in converted VO application

Post by wriedmann »

Hi Johan,

unfortunately the AssemblyInfo.prg does not works like the VersionsInfo ressource, as the Windows Explorer does not displays this information, and the VersionInfo API does not shows these informations either.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

product information in converted VO application

Post by Chris »

Hi Leigh,

Are you sure that VERSIONINFO resources do not get ported by VOXporter? They should be..
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
leighproman
Posts: 60
Joined: Tue Oct 11, 2016 8:56 pm
Location: UK

product information in converted VO application

Post by leighproman »

Where should it end up?
In VO I have RESOURCE VS_VERSION_INFO VERSIONINFO etc in my Start module but no obvious sign of it or its data after VOXport-ing.

Leigh
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

product information in converted VO application

Post by Chris »

Hi Leigh,

Hmmm, you are right, I just tried and it indeed does not work. Very strange, no obvious reason why it shouldn't.

Will try to fix this for the next build (which should be out in a couple days if nothing serious happens), but in the meantime you can also add it yourself, just Add a new item in your project, select the Native Resource template and then copy/paste the contents from the VO resource to the .rc file that gets added, excluding the "RESOURCE" word. That should do the trick.

Edit: actually there's specific code in VOXporter to disallow porting this type of resource! Sorry about that, forgot about it, was done because it is tricky porting some of the accompanying defines necessary. Looking into it now.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
leighproman
Posts: 60
Joined: Tue Oct 11, 2016 8:56 pm
Location: UK

product information in converted VO application

Post by leighproman »

Thanks Chris - that compiles ok but I have the same issue as Wolfgang - Properties of the EXE in Windows Explorer doesn't show the information as it does from the VO compiled version.

Edit - or rather it compiles when I remove the defines, which is presumably why it doesn't work!

Leigh
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

product information in converted VO application

Post by wriedmann »

Hi Leigh,

if you compile the ressource correctly into the exe, the version information shows up also in the Windows Explorer:
VersionInfo.png
VersionInfo.png (26.34 KiB) Viewed 695 times
But I'm using XIDE and I don't know how to add that to a VS project.
alpilog_xide.png
alpilog_xide.png (221.86 KiB) Viewed 695 times
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

product information in converted VO application

Post by Chris »

Wolfgang, it's similar in VS. Leigh, can you please zip and attach your version .rc file so we can have a look? You may want to modify "sensitive" information first.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply