Info code for .rc file

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
Claudio Ricardo
Posts: 367
Joined: Tue Oct 27, 2020 3:38 am
DBs Used: DBF, MySQL, MariaDB
Location: Bs. As. - Argentina

Info code for .rc file

Post by Claudio Ricardo »

Hi... some teacher knows .rc file code in order to .exe file show info (i use HMG 3.4.4) ?
screen: Notepad++ Vs. my app :cry: Thanks in advance !
Screenshot_20210710_060803.png
Screenshot_20210710_060803.png (17.42 KiB) Viewed 740 times
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
User avatar
Anand
Posts: 595
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF

Re: Info code for .rc file

Post by Anand »

I use below text in .rc file, (I use HmgMiniGUI, though it may work in HMG 3.4.4)

// Executable version information.
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904b0"
BEGIN
VALUE "ProductName", "Demo_App"
VALUE "ProductVersion", "1.010.0.0"
VALUE "FileDescription", "Demo Statement"
VALUE "InternalName", "Demo_App"
VALUE "OriginalFilename", "Demo_App.exe"
VALUE "FileVersion", "1.010.0.0"
VALUE "CompanyName", "CompSoft"
VALUE "LegalCopyright", "©2019-2020 CompSoft "
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809, 1200
END
END
Regards,

Anand

Image
User avatar
Claudio Ricardo
Posts: 367
Joined: Tue Oct 27, 2020 3:38 am
DBs Used: DBF, MySQL, MariaDB
Location: Bs. As. - Argentina

Re: Info code for .rc file

Post by Claudio Ricardo »

Thanks Anand... I get this error when compiling with your code: WINDRES: _temp.rc:140: syntax error
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
User avatar
Anand
Posts: 595
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF

Re: Info code for .rc file

Post by Anand »

Oh I forgot, below include at top required

#include "resource.h"
Regards,

Anand

Image
User avatar
Claudio Ricardo
Posts: 367
Joined: Tue Oct 27, 2020 3:38 am
DBs Used: DBF, MySQL, MariaDB
Location: Bs. As. - Argentina

Re: Info code for .rc file

Post by Claudio Ricardo »

Thank you very much for your prompt reply Anand, but it keeps giving me an... fatal error: resource.h: No such file or directory
I look but HMG no have resource.h lib :cry:
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
User avatar
AUGE_OHR
Posts: 2062
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: Info code for .rc file

Post by AUGE_OHR »

hi,

try this

Code: Select all

1 VERSIONINFO
FILEVERSION 1,5,1,0
PRODUCTVERSION 1,0,0,0
FILEOS 0x4
FILETYPE 0x1
{
 BLOCK "StringFileInfo"
 {
  BLOCK "040904b0"
  {
   VALUE "FileDescription", "harbour File Manager 64 Bit\000"
   VALUE "FileVersion", "1.2.3.4"
   VALUE "InternalName", "HBFM\000"
   VALUE "LegalCopyright", "Copyright © 1983-2021 Yiu-Software\000"
   VALUE "LegalTrademarks", "Harbour"
   VALUE "OriginalFilename", "HBFM.EXE"
   VALUE "CompanyName", "Yiu-Software"
   VALUE "ProductName", "HBFM\000"
   VALUE "ProductVersion", "1.0.0.0"
   VALUE "Comments", "Created by Auge & Ohr\000"
  }
}

BLOCK "VarFileInfo"
{
 VALUE "Translation", 0x0409, 1252
 }
}

A1MAIN          ICON RES\NCC.ico
the line

Code: Select all

 VALUE "Translation", 0x0409, 1252
does contain Codepage so you need to change it to what you need
have fun
Jimmy
User avatar
Claudio Ricardo
Posts: 367
Joined: Tue Oct 27, 2020 3:38 am
DBs Used: DBF, MySQL, MariaDB
Location: Bs. As. - Argentina

Re: Info code for .rc file

Post by Claudio Ricardo »

WOW works better impossible! I am very grateful to all of you and the forum for your quick and invaluable help! :D
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
Post Reply