Jump to content
Fivewin Brasil

Como atualizar o código da versão em .RES automaticamente? [Resolvido]


sambomb

Recommended Posts

Utilizo xHarbour, BCC e o Pelles C junto do fivewin.

Gostaria de fazer um ajuste no arquivo .RES que contém a versão de forma automática para atualizar com um código auto incremento no bat pré-compilação.

Se fosse arquivo .RC eu conseguiria tratar pois é um arquivo texto formatado apenas, mas o BCC não consegue compilar o arquivo RC.

Link to comment
Share on other sites

Não entendi muito bem sua pergunta, mas para compilar um arquivo .RC para arquivo .RES:



LOCAL cFile := "C:\FWH1306\SAMPLES\Alaska"
LOCAL cDirBCC582 := "C:\BCC582"

cFile := cFile + ".RC"
cFileRes := cFileRes + ".RES"

WinExec( ALLTRIM(cDirBCC582)+"\BIN\BRC32.EXE -r "+cFile, 0 )


abs,

Link to comment
Share on other sites

No BAT

C:\Compiladores\bcc582\Bin\brc32.exe -r C:\Versoes\Farma\RCAPAF.RC

C:\DROG9>C:\Compiladores\bcc582\Bin\brc32.exe -r C:\Versoes\Farma\RCAPAF.RC
Borland Resource Compiler Version 5.40
Copyright © 1990, 1999 Inprise Corporation. All rights reserved.
Error RCAPAF.RC 3 11: Cannot open file: windows.h
Link to comment
Share on other sites

Estou tentando gerar um .BAT para repassar o arquivo .RC para .RES que será compilado posteriormente pelo meu executável

Arquivo .RC

// RESOURCE SCRIPT generated by "Pelles C for Windows, version 7.00".

#include <windows.h>
#include <commctrl.h>
#include <richedit.h>

LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US

VS_VERSION_INFO VERSIONINFO
FILEVERSION 9,15,1,19
PRODUCTVERSION 9,15,1,19
FILEFLAGSMASK 0x3F
FILEFLAGS 0x0
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
{
  BLOCK "StringFileInfo"
  {
    BLOCK "041604B0"
    {
      VALUE "Comments", "Homologado com a versão 01.10 do PAF-ECF\0"
      VALUE "CompanyName", "RCA Sistemas LTDA\0"
      VALUE "FileDescription", "RCAPAF RCA - Programa de gerenciamento de farmácias\0"
      VALUE "FileVersion", "9.15.1.19\0"
      VALUE "InternalName", "RCAPAF.EXE\0"
      VALUE "LegalCopyright", "RCA Sistemas LTDA 2014\0"
      VALUE "LegalTrademarks", "RCA Sistemas\0"
      VALUE "OriginalFilename", "RCAPAF\0"
      VALUE "ProductName", "RCA DROGARIA\0"
      VALUE "ProductVersion", "9.15.1.19\0"
    }
  }
  BLOCK "VarFileInfo"
  {
    VALUE "Translation", 0x416, 0x4B0
  }
}

Já coloquei o caminho no Path do windows:

C:\Compiladores\bcc582;C:\Compiladores\bcc582\include

Não funcionou e copiei a pasta include para dentro da pasta bin do BCC e me retornou:

C:\Compiladores\bcc582\Bin>C:\Compiladores\bcc582\Bin\brc32.exe -r C:\Versoes\Farma\RCAPAF.RC

Borland Resource Compiler Version 5.40
Copyright © 1990, 1999 Inprise Corporation. All rights reserved.
Error prsht.h 1085 1: '#endif' before '#if'
C:\Compiladores\bcc582\Bin>cd C:\SVN\Fivewin\Ramos\2150\Farma
Link to comment
Share on other sites


// RESOURCE SCRIPT generated by "Pelles C for Windows, version 7.00".

// isto e desncessario, nao sei porque ele cria isto.
// #include <windows.h>
// #include <commctrl.h>
// #include <richedit.h>

LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US

VS_VERSION_INFO VERSIONINFO
FILEVERSION 9,15,1,19
PRODUCTVERSION 9,15,1,19
FILEFLAGSMASK 0x3F
FILEFLAGS 0x0
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
{
BLOCK "StringFileInfo"
{
BLOCK "041604B0"
{
VALUE "Comments", "Homologado com a versão 01.10 do PAF-ECF\0"
VALUE "CompanyName", "RCA Sistemas LTDA\0"
VALUE "FileDescription", "RCAPAF RCA - Programa de gerenciamento de farmácias\0"
VALUE "FileVersion", "9.15.1.19\0"
VALUE "InternalName", "RCAPAF.EXE\0"
VALUE "LegalCopyright", "RCA Sistemas LTDA 2014\0"
VALUE "LegalTrademarks", "RCA Sistemas\0"
VALUE "OriginalFilename", "RCAPAF\0"
VALUE "ProductName", "RCA DROGARIA\0"
VALUE "ProductVersion", "9.15.1.19\0"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x416, 0x4B0
}
}


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...