Versionsanzeige

Deutschsprachiges X#-Forum – German language forum

Moderator: wriedmann

Post Reply
Kohle
Posts: 18
Joined: Fri Mar 04, 2016 10:35 am

Versionsanzeige

Post by Kohle »

Für die Anzeige der Programmversion mit externen Hilfsmitteln, z.B. im Explorer oder über Dateieigenschaften habe ich bisher unter VO die folgende Routine benutzt:

RESOURCE VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,1,3,3131
PRODUCTVERSION 3,1,3,__VERSION__
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x00L
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "Gartenvereinsmanager"
VALUE "CompanyName", "F.K. Software Bitterfeld"
VALUE "FileDescription", "F.K. Gartenvereinsmanager"
VALUE "FileVersion", "3.1.3.3131"
VALUE "InternalName", "GVM_Win32"
VALUE "LegalCopyright", "Copyright 251 2001 - 2023 F.K. Software"
VALUE "OriginalFilename", "GVM.EXE"
VALUE "ProductName", "F.K. Gartenvereinsmanager"
VALUE "ProductVersion", "3.1c"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

Im zu X# konvertierten Programm wird nun nichts mehr angezeigt. Die Programmversion ist nun 0.0.0.0.
Gibt es eine Möglichkeit, die Anzeige zu reaktivieren?

Viele Grüße

Frank Kohle
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Versionsanzeige

Post by wriedmann »

Hallo Frank,
ist die Versioninfo-Resource nach wie vor da?
10-03-2023_14-42-25.png
10-03-2023_14-42-25.png (15.63 KiB) Viewed 1779 times
Oder gibt es ein AssemblyInfo.prg?
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Kohle
Posts: 18
Joined: Fri Mar 04, 2016 10:35 am

Versionsanzeige

Post by Kohle »

Hallo Wolfgang,
der Code ist bei der Konvertierung von VO offensichtlich verlorengegangen.
Frank
Kohle
Posts: 18
Joined: Fri Mar 04, 2016 10:35 am

Versionsanzeige

Post by Kohle »

Im XIDE-Projekt-Browser ist nichts zu finden. Der Windows-Explorer findet im Projektverzeichnis aber die Datei Standard Menus.VS_VERSION_INFO.rc .

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

Versionsanzeige

Post by wriedmann »

Hallo Frank,
vielleicht möglicherweise sollte man sich mal den XPorter anschauen.
@Chris: what should the XPorter/VO do with the versionInfo resource in the migration process?
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
robert
Posts: 4225
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Versionsanzeige

Post by robert »

Guys,
Please also check the /usenativeversion compiler option:

https://www.xsharp.eu/help/opt-usenativeversion.html

If you want to use the version from the resource then you need to include this compiler option

Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Chris
Posts: 4562
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Versionsanzeige

Post by Chris »

Guys,

Some old VOXporter versions indeed were not exporting the VERSION resource, but this is fixed since many months now.

Frank, please check in the <Resources> node in the Project window, doesn't it contain there an entry for a file Standard Menus.rc? If yes, if you open this, you will see it includes the version resource (actually it contains all resources found in this module in VO, except for those used in menus and windows) in it and all you will need to do is to go to the Application Properties window, Compiler page and as Robert pointed out, check the option "/usenativeversion: Prefer Native version resource"

If this cannot be found in the <Resources>, then for some reason it was removed and you need to add it. Please right-click on the Application in the Project window, select Add Existing->Add Native Resources and pick the file Standard Menus.VS_VERSION_INFO.rc. Also set the /usenativeversion option as described above and now it should work

.
Chris Pyrgas

XSharp Development Team test
chris(at)xsharp.eu
Kohle
Posts: 18
Joined: Fri Mar 04, 2016 10:35 am

Versionsanzeige

Post by Kohle »

Hallo, leider bisher kein Erfolg. Die Datei Standard Menus.VS_VERSION_INFO.rc lässt sich hinzufügen, ist aber anschließend im Projekt nicht wiederzufinden: Beim Versuch, diese Datei anschließend nochmals hinzuzufügen kommt die Meldung, dass sie schon vorhanden ist. Das anschließende Compilieren mit dem Schalter /usenativeversion funktioniert, aber die Versionsnummer ist trotzdem im feritgen Programm nicht enthalten.Frank
Version.jpg
Version.jpg (44.44 KiB) Viewed 1779 times
Version.jpg
Version.jpg (44.44 KiB) Viewed 1779 times
User avatar
wriedmann
Posts: 3644
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Versionsanzeige

Post by wriedmann »

Hallo Frank,
vieleicht probierst Du mal den anderen Weg:
lege im Programm ein AssemblyInfo.prg an und gib dort die Versionsinformationen an.
Einfach in der XIDE "Create new", "Create new file" und "AssemblyInfo" wählen.
Das wäre der richtige Weg für .NET/X#.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Kohle
Posts: 18
Joined: Fri Mar 04, 2016 10:35 am

Versionsanzeige

Post by Kohle »

Hallo,

ich habe jetzt einfach das ganze Projekt aus einer neu erstellten VO-AEF-Datei neu erstellt und mit dem Schalter /usenativeversion kompiliert. Nun funktioniert die Anzeige.
Vielen Dank für die Bemühungen.

Frank
Post Reply