fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: product information in converted VO application

product information in converted VO application 1 week 13 hours ago #9255

  leighproman's Avatar Topic Author leighproman Offline Posts: 21
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

Please Log in or Create an account to join the conversation.

product information in converted VO application 1 week 13 hours ago #9256

  lumberjack's Avatar lumberjack Offline Posts: 457

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:
#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
George, South Africa

Please Log in or Create an account to join the conversation.

product information in converted VO application 1 week 13 hours ago #9257

  wriedmann's Avatar wriedmann Offline Posts: 1567
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
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

product information in converted VO application 1 week 13 hours ago #9258

  wriedmann's Avatar wriedmann Offline Posts: 1567
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
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

product information in converted VO application 1 week 11 hours ago #9259

  Chris's Avatar Chris Offline Posts: 1163
Hi Leigh,

Are you sure that VERSIONINFO resources do not get ported by VOXporter? They should be..
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

product information in converted VO application 1 week 11 hours ago #9260

  leighproman's Avatar Topic Author leighproman Offline Posts: 21
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

Please Log in or Create an account to join the conversation.

product information in converted VO application 1 week 9 hours ago #9261

  Chris's Avatar Chris Offline Posts: 1163
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.
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Last edit: by Chris.

product information in converted VO application 1 week 8 hours ago #9262

  leighproman's Avatar Topic Author leighproman Offline Posts: 21
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

Please Log in or Create an account to join the conversation.

Last edit: by leighproman.

product information in converted VO application 1 week 8 hours ago #9263

  wriedmann's Avatar wriedmann Offline Posts: 1567
Hi Leigh,

if you compile the ressource correctly into the exe, the version information shows up also in the Windows Explorer:



But I'm using XIDE and I don't know how to add that to a VS project.



Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it
Attachments:

Please Log in or Create an account to join the conversation.

product information in converted VO application 1 week 8 hours ago #9264

  Chris's Avatar Chris Offline Posts: 1163
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.
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

product information in converted VO application 1 week 7 hours ago #9265

  leighproman's Avatar Topic Author leighproman Offline Posts: 21
Redacted version of version.rc attached.
Thanks
Leigh
Attachments:

Please Log in or Create an account to join the conversation.

product information in converted VO application 1 week 6 hours ago #9269

  Chris's Avatar Chris Offline Posts: 1163
Hi Leigh,

Hmm, not sure why, but indeed this doesn't work, until I add this in the beginning of the .rc file:

#define VS_VERSION_INFO 1

This should fix the problem for you, will try to find out why this happens...
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

product information in converted VO application 1 week 5 hours ago #9272

  leighproman's Avatar Topic Author leighproman Offline Posts: 21
Thanks Chris - that's working for me now.
Leigh

Please Log in or Create an account to join the conversation.

product information in converted VO application 1 week 5 hours ago #9273

  Chris's Avatar Chris Offline Posts: 1163
Thanks for the feedback Leigh! Still puzzled why it silently does not work properly without it...
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

product information in converted VO application 1 week 5 hours ago #9276

  robert's Avatar robert Offline Posts: 993
Chris,
The versioninfo resource MUST have resource type 1. In VO the define VS_VERSION_INFO is automatically replaced with 1 because VO finds it in the Win32 API library, even when this library is not included in the libs of the App. (yes that is weird, but that is how the original VO developers designed things).

If your app does not have any native resources (rc files) then the X# compiler creates a version info resource based on the information in the AssemblyVersion, AssemblyFileVersion etc attributes

Robert
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

product information in converted VO application 6 days 20 hours ago #9290

  Chris's Avatar Chris Offline Posts: 1163
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...
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

product information in converted VO application 6 days 15 hours ago #9296

  Karl-Heinz's Avatar Karl-Heinz Offline Posts: 262
Hi Chris,

the resource compiler is a special beast. It doesn´t complain when i change e.g. a created manifest.rc content from :

1 24 Resources\cctl6.man

To e.g.:

GAGA1 GAGA2 Resources\cctl6.man

Of course, this works ;-)

#define GAGA1 1
#define GAGA2 24

GAGA1 GAGA2 Resources\cctl6.man


BTW. It´s no showstopper, but i noticed that a newer XPorter version exports something like:

xyz ( NULL )

to:

xyz ( @@NULL )

which results in the error: "The name 'NULL' does not exist in the current context".

.
regards
Karl-Heinz

Please Log in or Create an account to join the conversation.

product information in converted VO application 6 days 9 hours ago #9307

  Chris's Avatar Chris Offline Posts: 1163
Hi Karl-Heinz,

Thanks, this has been fixed already in the VOXporter for the next build (tomorrow probably).

About the resource compiler, yeah it is really bizarre how it works some times. Btw, try saving a .rc file in unicode format, compile, see the errors it produces and try to figure out what the problem is by the error messages...:)
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

product information in converted VO application 5 days 5 hours ago #9339

  Karl-Heinz's Avatar Karl-Heinz Offline Posts: 262
Hi Chris,

have you tried in the meantime to find out why the XPorter doesn't export the version info ? If not, add a leading char ( e.g. "_" ) to "VS_VERSION_INFO", so that the VO Resource line looks like:

RESOURCE _VS_VERSION_INFO VERSIONINFO

instead of:

RESOURCE VS_VERSION_INFO VERSIONINFO

Now the XPorter creates a resource file, and when i change in the rc file the line

_VS_VERSION_INFO VERSIONINFO

to:

1 VERSIONINFO

or:

#define VS_VERSION_INFO 1
VS_VERSION_INFO VERSIONINFO

the version infos are visible.


regards
Karl-Heinz

Please Log in or Create an account to join the conversation.

product information in converted VO application 5 days 4 hours ago #9340

  Chris's Avatar Chris Offline Posts: 1163
Hi Karl-Heinz,

Yeah, I had totally forgotten about it, but had actually added explicit code to not port this resource, because of problems with some of the defines (not only VS_VERSION_INFO). Will enable it back, not sure if this will make it in this or the next build though.
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

  • Page:
  • 1