windres可用於操縱Windows資源,windres並不總是建成二進制實用程式的一部分,因為它只用於Windows目標
基本介紹
- 中文名:windres
- 外文名:無
- windres:可用於操縱Windows資源
- 其他:見正文
使用詳解,其它相關,
使用詳解
windres may be used to manipulate Windows resources.
Warning: windres is not always built as part of the binary utilities, since it is only useful for Windows targets.
windres [options] [input-file] [output-file]
windres reads resources from an input file and copies them into an output file. Either file may be in one of three formats:
windres從輸入檔案中讀取資源,並把它們拷貝到一個輸出檔案。這兩種檔案可能是三種格式之一:
rc
A text format read by the Resource Compiler.
由資源編譯器讀取的文本格式
res
A binary format generated by the Resource Compiler.
由資源編譯器產生的二進制格式
coff
A COFF object or executable.
COFF目標或執行檔。
The exact description of these different formats is available in documentation from Microsoft.
這些不同格式的準確描述可從微軟的文檔。
When windres converts from the rc format to the res format, it is acting like the Windows Resource Compiler. When windres converts from the res format to the coff format, it is acting like the Windows CVTRES program.
當windres從RC格式轉換到res格式,它的作用就像在Windows資源編譯器。當windres從RES格式轉換到COFF格式,它的作用就像的Windows CVTRES計畫。
When windres generates an rc file, the output is similar but not identical to the format expected for the input. When an input rc file refers to an external filename, an output rc file will instead include the file contents.
當windres產生rc檔案,輸出將類似但不完全相同於預期格式的輸入。當輸入rc檔案是指外部的檔案名稱,輸出RC檔案將替代包含該檔案的內容。
If the input or output format is not specified, windres will guess based on the file name, or, for the input file, the file contents. A file with an extension of .rc will be treated as an rc file, a file with an extension of .res will be treated as a res file, and a file with an extension of .o or .exe will be treated as a coff file.
如果輸入或輸出格式沒有具體指定,windres會基於檔案名稱猜,或者,對於輸入檔案,依據該檔案的內容。一個帶有擴展名.rc的檔案將被視為rc檔案,一個帶有擴展名.res檔案將被視為res檔案,一個帶有擴展名.o .exe的檔案將被視為一個coff檔案。
If no output file is specified, windres will print the resources in rc format to standard output.
如果沒有指定輸出檔案,windres將列印RC格式的資源到標準輸出。
The normal use is for you to write an rc file, use windres to convert it to a COFF object file, and then link the COFF file into your application. This will make the resources described in the rc file available to Windows.
正常使用是為你寫的rc檔案,使用windres 將其轉換為COFF目標檔案,其次,連結COFF檔案到您的應用程式。這將使rc檔案中描述的資源給Windows。
-i filename
--input filename
The name of the input file. If this option is not used, then windres will use the first non-option argument as the input file name. If there are no non-option arguments, then windres will read from standard input. windres can not read a COFF file from standard input.
輸入檔案中的名稱。如果沒使用此選項,然後windres將使用第一個非選項參數作為輸入檔案名稱。如果沒有非選項參數,那么windres會從標準輸入讀取。windres無法讀取一個的COFF檔案從標準輸入。
-o filename
--output filename
The name of the output file. If this option is not used, then windres will use the first non-option argument, after any used for the input file name, as the output file name. If there is no non-option argument, then windres will write to standard output. windres can not write a COFF file to standard output. Note, for compatibility with rc the option -fo is also accepted, but its use is not recommended.
輸出檔案的名稱。如果沒使用此選項,任何用於輸入的檔案名稱,作為輸出檔案的名稱。如果沒有非選項參數,windres將寫入到標準輸出。windres不能將一個COFF檔案輸出到標準輸出。注意:與RC的兼容性,選項-fo也是可以接受的,但不建議使用。
-J format
--input-format format
The input format to read. format may be `res', `rc', or `coff'. If no input format is specified, windres will guess, as described above.
讀取的輸入檔案的格式.格式可以是"res","rc","coff".如果沒有具體指定輸入格式,windres會猜,如上面所述。
-O format
--output-format format
The output format to generate. format may be `res', `rc', or `coff'. If no output format is specified, windres will guess, as described above.
用於生成輸出格式。格式可以是"res","rc","coff".如果沒有具體指定輸出格式,windres會猜,如上面所述。
-F target
--target target
Specify the BFD format to use for a COFF file as input or output. This is a BFD target name; you can use the --help option to see a list of supported targets. Normally windres will use the default format, which is the first one listed by the --help option. Target Selection.
COFF檔案作為輸入或輸出使用一個指定的BFD格式.這是一個BFD目標名稱;您可以使用--help選項看到一個支持的目標列表,通常windres會使用默認的格式,用--help選項列出第一個。目標選擇。
--preprocessor program
When windres reads an rc file, it runs it through the C preprocessor first. This option may be used to specify the preprocessor to use, including any leading arguments. The default preprocessor argument is gcc -E -xc-header -DRC_INVOKED.
當windres讀取rc檔案,它執行時,先通過C預處理器。此選項可用於以指定預處理器,包括任何主要參數。默認預處理參數是gcc -E -xc-header -DRC_INVOKED.
--preprocessor-arg option
When windres reads an rc file, it runs it through the C preprocessor first. This option may be used to specify additional text to be passed to preprocessor on its command line. This option can be used multiple times to add multiple options to the preprocessor command line.
當windres讀取rc檔案,它執行時,先通過C預處理器。此選項可被用來指定額外的要傳遞給預處理器命令行文本,這選項可以多次使用添加多個選項給預處理命令行。
-I directory
--include-dir directory
Specify an include directory to use when reading an rc file. windres will pass this to the preprocessor as an -I option. windres will also search thiso directory when looking for files named in the rc file. If the argument passed to this command matches any of the supported formats (as described in the -J option), it will issue a deprecation warning, and behave just like the -J option. New programs should not use this behaviour. If a directory happens to match a format, simple prefix it with `./' to disable the backward compatibility.
明確說明當讀取一個rc檔案時使用的include目錄。windres將傳遞給預處理器一個"-I"選項,windres會搜尋這個目錄當尋找rc檔案中的檔案名稱時。
-D target
--define sym[=val]
Specify a -D option to pass to the preprocessor when reading an rc file.
指定-D選項,當rc檔案閱讀時,傳遞給預處理。
-U target
--undefine sym
Specify a -U option to pass to the preprocessor when reading an rc file.
指定-U選項,當rc檔案閱讀時,傳遞給預處理。
-r
Ignored for compatibility with rc.忽略與RC兼容性。
-v
Enable verbose mode. This tells you what the preprocessor is if you didn't specify one.
啟用詳細模式。這告訴你預處理是什麼如果你沒有指定一個。
-c val
--codepage val
Specify the default codepage to use when reading an rc file. val should be a hexadecimal prefixed by `0x' or decimal codepage code. The valid range is from zero up to 0xffff, but the validity of the codepage is host and configuration dependent.
指定閱讀rc檔案時要使用的默認代碼頁。val應該是一個十六進制數以"0X"開頭或十進制代碼頁的代碼。有效範圍是從零到0xffff ,但代碼頁的有效性是依賴於主機和配置。
-l val
--language val
Specify the default language to use when reading an rc file. val should be a hexadecimal language code. The low eight bits are the language, and the high eight bits are the sublanguage.
指定讀取rc檔案時使用的默認語言。val應該是一個十六進制的語言代碼。低8位是語言,高8位是子語言。
--use-temp-file
Use a temporary file to instead of using popen to read the output of the preprocessor. Use this option if the popen implementation is buggy on the host (eg., certain non-English language versions of Windows 95 and Windows 98 are known to have buggy popen where the output will instead go the console).
使用臨時檔案而不是使用POPEN讀取預處理器的輸出。使用此選項如果的POPEN實現?是在主機上的越野車?,???????
Warning: windres is not always built as part of the binary utilities, since it is only useful for Windows targets.
windres [options] [input-file] [output-file]
windres reads resources from an input file and copies them into an output file. Either file may be in one of three formats:
windres從輸入檔案中讀取資源,並把它們拷貝到一個輸出檔案。這兩種檔案可能是三種格式之一:
rc
A text format read by the Resource Compiler.
由資源編譯器讀取的文本格式
res
A binary format generated by the Resource Compiler.
由資源編譯器產生的二進制格式
coff
A COFF object or executable.
COFF目標或執行檔。
The exact description of these different formats is available in documentation from Microsoft.
這些不同格式的準確描述可從微軟的文檔。
When windres converts from the rc format to the res format, it is acting like the Windows Resource Compiler. When windres converts from the res format to the coff format, it is acting like the Windows CVTRES program.
當windres從RC格式轉換到res格式,它的作用就像在Windows資源編譯器。當windres從RES格式轉換到COFF格式,它的作用就像的Windows CVTRES計畫。
When windres generates an rc file, the output is similar but not identical to the format expected for the input. When an input rc file refers to an external filename, an output rc file will instead include the file contents.
當windres產生rc檔案,輸出將類似但不完全相同於預期格式的輸入。當輸入rc檔案是指外部的檔案名稱,輸出RC檔案將替代包含該檔案的內容。
If the input or output format is not specified, windres will guess based on the file name, or, for the input file, the file contents. A file with an extension of .rc will be treated as an rc file, a file with an extension of .res will be treated as a res file, and a file with an extension of .o or .exe will be treated as a coff file.
如果輸入或輸出格式沒有具體指定,windres會基於檔案名稱猜,或者,對於輸入檔案,依據該檔案的內容。一個帶有擴展名.rc的檔案將被視為rc檔案,一個帶有擴展名.res檔案將被視為res檔案,一個帶有擴展名.o .exe的檔案將被視為一個coff檔案。
If no output file is specified, windres will print the resources in rc format to standard output.
如果沒有指定輸出檔案,windres將列印RC格式的資源到標準輸出。
The normal use is for you to write an rc file, use windres to convert it to a COFF object file, and then link the COFF file into your application. This will make the resources described in the rc file available to Windows.
正常使用是為你寫的rc檔案,使用windres 將其轉換為COFF目標檔案,其次,連結COFF檔案到您的應用程式。這將使rc檔案中描述的資源給Windows。
-i filename
--input filename
The name of the input file. If this option is not used, then windres will use the first non-option argument as the input file name. If there are no non-option arguments, then windres will read from standard input. windres can not read a COFF file from standard input.
輸入檔案中的名稱。如果沒使用此選項,然後windres將使用第一個非選項參數作為輸入檔案名稱。如果沒有非選項參數,那么windres會從標準輸入讀取。windres無法讀取一個的COFF檔案從標準輸入。
-o filename
--output filename
The name of the output file. If this option is not used, then windres will use the first non-option argument, after any used for the input file name, as the output file name. If there is no non-option argument, then windres will write to standard output. windres can not write a COFF file to standard output. Note, for compatibility with rc the option -fo is also accepted, but its use is not recommended.
輸出檔案的名稱。如果沒使用此選項,任何用於輸入的檔案名稱,作為輸出檔案的名稱。如果沒有非選項參數,windres將寫入到標準輸出。windres不能將一個COFF檔案輸出到標準輸出。注意:與RC的兼容性,選項-fo也是可以接受的,但不建議使用。
-J format
--input-format format
The input format to read. format may be `res', `rc', or `coff'. If no input format is specified, windres will guess, as described above.
讀取的輸入檔案的格式.格式可以是"res","rc","coff".如果沒有具體指定輸入格式,windres會猜,如上面所述。
-O format
--output-format format
The output format to generate. format may be `res', `rc', or `coff'. If no output format is specified, windres will guess, as described above.
用於生成輸出格式。格式可以是"res","rc","coff".如果沒有具體指定輸出格式,windres會猜,如上面所述。
-F target
--target target
Specify the BFD format to use for a COFF file as input or output. This is a BFD target name; you can use the --help option to see a list of supported targets. Normally windres will use the default format, which is the first one listed by the --help option. Target Selection.
COFF檔案作為輸入或輸出使用一個指定的BFD格式.這是一個BFD目標名稱;您可以使用--help選項看到一個支持的目標列表,通常windres會使用默認的格式,用--help選項列出第一個。目標選擇。
--preprocessor program
When windres reads an rc file, it runs it through the C preprocessor first. This option may be used to specify the preprocessor to use, including any leading arguments. The default preprocessor argument is gcc -E -xc-header -DRC_INVOKED.
當windres讀取rc檔案,它執行時,先通過C預處理器。此選項可用於以指定預處理器,包括任何主要參數。默認預處理參數是gcc -E -xc-header -DRC_INVOKED.
--preprocessor-arg option
When windres reads an rc file, it runs it through the C preprocessor first. This option may be used to specify additional text to be passed to preprocessor on its command line. This option can be used multiple times to add multiple options to the preprocessor command line.
當windres讀取rc檔案,它執行時,先通過C預處理器。此選項可被用來指定額外的要傳遞給預處理器命令行文本,這選項可以多次使用添加多個選項給預處理命令行。
-I directory
--include-dir directory
Specify an include directory to use when reading an rc file. windres will pass this to the preprocessor as an -I option. windres will also search thiso directory when looking for files named in the rc file. If the argument passed to this command matches any of the supported formats (as described in the -J option), it will issue a deprecation warning, and behave just like the -J option. New programs should not use this behaviour. If a directory happens to match a format, simple prefix it with `./' to disable the backward compatibility.
明確說明當讀取一個rc檔案時使用的include目錄。windres將傳遞給預處理器一個"-I"選項,windres會搜尋這個目錄當尋找rc檔案中的檔案名稱時。
-D target
--define sym[=val]
Specify a -D option to pass to the preprocessor when reading an rc file.
指定-D選項,當rc檔案閱讀時,傳遞給預處理。
-U target
--undefine sym
Specify a -U option to pass to the preprocessor when reading an rc file.
指定-U選項,當rc檔案閱讀時,傳遞給預處理。
-r
Ignored for compatibility with rc.忽略與RC兼容性。
-v
Enable verbose mode. This tells you what the preprocessor is if you didn't specify one.
啟用詳細模式。這告訴你預處理是什麼如果你沒有指定一個。
-c val
--codepage val
Specify the default codepage to use when reading an rc file. val should be a hexadecimal prefixed by `0x' or decimal codepage code. The valid range is from zero up to 0xffff, but the validity of the codepage is host and configuration dependent.
指定閱讀rc檔案時要使用的默認代碼頁。val應該是一個十六進制數以"0X"開頭或十進制代碼頁的代碼。有效範圍是從零到0xffff ,但代碼頁的有效性是依賴於主機和配置。
-l val
--language val
Specify the default language to use when reading an rc file. val should be a hexadecimal language code. The low eight bits are the language, and the high eight bits are the sublanguage.
指定讀取rc檔案時使用的默認語言。val應該是一個十六進制的語言代碼。低8位是語言,高8位是子語言。
--use-temp-file
Use a temporary file to instead of using popen to read the output of the preprocessor. Use this option if the popen implementation is buggy on the host (eg., certain non-English language versions of Windows 95 and Windows 98 are known to have buggy popen where the output will instead go the console).
使用臨時檔案而不是使用POPEN讀取預處理器的輸出。使用此選項如果的POPEN實現?是在主機上的越野車?,???????
其它相關
--no-use-temp-file
Use popen, not a temporary file, to read the output of the preprocessor. This is the default behaviour.
使用POPEN ,不是一個臨時檔案,讀取預處理器的輸出。這是 默認行為。
-h
--help
Prints a usage summary.列印用法總結。
-V
--version
Prints the version number for windres.列印windres版本號
--yydebug
If windres is compiled with YYDEBUG defined as 1, this will turn on parser debugging.
如果windres被編譯YYDEBUG定義為1 ,這將打開分析器調試。
Use popen, not a temporary file, to read the output of the preprocessor. This is the default behaviour.
使用POPEN ,不是一個臨時檔案,讀取預處理器的輸出。這是 默認行為。
-h
--help
Prints a usage summary.列印用法總結。
-V
--version
Prints the version number for windres.列印windres版本號
--yydebug
If windres is compiled with YYDEBUG defined as 1, this will turn on parser debugging.
如果windres被編譯YYDEBUG定義為1 ,這將打開分析器調試。