2017-12-19 13 views
0

多くの掘り出した後、私は最終的にこのスレッド全体に来ました:Does the .res file need to be in source control?私たちはgitにget goからそれを絶対に含めませんでした。今私は、コマンドラインからソースからプロジェクトを構築しようとしています。 Borlandでファイルを開くと、そのファイルを再作成するように求められ、プロジェクトを作成することができます。私は、生成されたすべてのファイルと熊手を削除した場合、私は次の出力を得る(分かりやすくするためにルビーのタスクを爆発).res borlandリソースファイル

$ bpr2mak_exe="#{ENV['BCB']}\\Bin\\bpr2mak.exe" 
$ make_exe="#{ENV['BCB']}\\Bin\\make.exe" 
$ puts `#{bpr2mak_exe} -omakefile MyProject.bpr` 
Loading project file 
Loading template 
Generating Makefile 
......................................... 

& puts `#{make_exe} -fmakefile` 
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland 
Fatal: 'MyProject.res' does not exist - don't know how to make it 

私は、すべてのコマンドラインツール(BRCC32.EXEとGRC32.exeに焦点を当てた)を見て、のどちらもそれらは私が必要とするもののように見えます。私はまた、procmonを使って、resファイルを生成するためにどのプログラムが呼び出されているかを調べました。ですから、Borland/Embarcadoの人々はパイプアップしたいのですか?

$ "${BCB}\bin\BRC32.exe" -? 

Syntax: BRC32 [options ...] filename 
options marked with a '*' are on by default 

-r     compile only. Do not bind resources 
-fofilename   set output res filename 
-fefilename   set output exe filename 
-v     verbose 
-ipath    set include path 
-x     ignore INCLUDE environment variable 
-dname[=string]  define #define 
-32    * build 32-bit Windows compatible res/exe files 
-16     build 16-bit Windows compatible res/exe files 
-Vd.d Mark the .exe file with Windows version provided (4.0 is the default) 
-31 Provided for downward compatibility (build 16-bit res/exe files) 
-w32 Provided for downward compatibility (build 32-bit res/exe files) 
-k     do not create fastload area (16 bit only) 
-t     (ignored, for compatibility) 
-? or -h    display this message 

$ "${BCB}\bin\BRCC32.exe" -? 
Borland Resource Compiler Version 5.40 
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved. 

Syntax: BRCC32 [options ...] filename 
options marked with a '*' are on by default 

@<filename>  Take instructions from command file 
-r     (ignored for compatibility) 
-16     Build 16-bit Windows compatible .res file 
-32     * Build 32-bit Windows compatible .res file 
-fofilename   Set output filename 
-v     Verbose 
-ipath    Set include path 
-dname[=string]  Define #define 
-x     Ignore INCLUDE environment variable 
-m     Enable multi-byte character support 
-cdddd    set default code page to nnnn 
-lxxxx    set default language to xxxx 
-31 Provided for downward compatibility (build 16-bit .res file) 
-w32 Provided for downward compatibility (build 16-bit .res file) 
-? or -h    Display this message 

(ここではそれが助け場合は、コマンドラインのヘルプ画面です)と楽しみのためだけに私はプロジェクトファイル

$ "${BCB}\bin\BRC32.exe" -r MyProject.bpr 

Borland Resource Compiler Version 5.40 
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved. 

Error MyProject.bpr 1 1: Expecting resource name or resource type name 

$ "${BCB}\bin\BRCC32.exe" -r MyProject.bpr 
Borland Resource Compiler Version 5.40 
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved. 

Error MyProject.bpr 1 1: Expecting resource name or resource type name 

答えて

1

IDEではなく、コンパイラに対してそれらを実行しようとした、デフォルト.resファイルを生成しますプロジェクトファイルから抽出されたバージョン情報を使用します。コマンドラインでコンパイルしようとしているものは、.rcスクリプトファイルを必要なリソースデータ定義で作成し、brcc32を使用して.resファイルにコンパイルしてから、ilink32でリンクすることをお勧めします。

しかし、実際には、makeを使用してBorlandプロジェクトをコンパイルしてはなりません。 Borlandのbcc32コンパイラ、またはMSのmsbuildフレームワーク(C++ Builderのバージョンに応じて)を使用して、makeが行うすべてを処理させます。 .bprまたは.cprojファイルを最初に.makファイルに変換せずにコンパイルできます。

+0

私が間違っているのを修正しますが、bpr2mak.exeを使用してmakeファイルを作成するのが好きだった理由は、新しいクラス(ユニット)が追加されるためです。それでもbcc32コンパイラだけを使って処理できますか? –

+1

ユニット参照は '.bpr' /' .cproj'ファイルに保存されています。 bcc32は、実行するたびにファイルを解析するときに、個々のファイルではなくプロジェクト自体をコンパイルしている限り、それらをピックアップします。 –

関連する問題