Exerb Project 4.20
Welcome to "Reference Recipes
Reference Recipes
Contents
1. Overview
2. YAML format
1. Array
2. Hashing
3. Combination
3. Recipes for file blocks
1. General block
2. Path blocked
3. Resource block
4. File blocks
1. Overview
Recipe file (.EXY) is a text file describing the various files needed to generate the executable. YAML (YAML Ain't Markup Language) format is used and the character encoding is UTF-8.
The simplest example of a recipe file is as follows:
general:
startup: hello.rb
file:
hello.rb:
2.YAML format simple introduction
In YAML, and indent using some symbols to represent data structures. The data structure is a broad, there are two types of arrays and hashes.
With the following example to describe the symbol more ,"#=>", Ruby in the data in both the above.
2.1. Array
Array is then written in the form below.
- Value
Described as follows by the representation of the array.
- Array
- String
- 123
# => [ "Array", "String", 123]
Ruby is treated as an object on the Array.
2.2. Hashing
The hash is then written in the form below.
Key: value
Described as follows by the representation of the hash.
Type: Hash
String: ABC
Number: 123
# => ( "Type" => "Hash", "String" => "ABC", "Number" => 123)
Ruby is treated as an object on the Hash. Therefore, the order of the keys will not be saved.
2.3. Combination
Arrays and hashes can be combined, respectively. By indentation indicates the parent-child relationship. Spaces to indent, you can use a tab character, recommends that you use two letter spaces.
Combination of cases among an array is as follows.
--
- 1x1
- 1x2
--
- 2x1
- 2x2
# => [[ "1x1", "1x2"], [ "2x1", "2x2"]]
Hash together a combination of cases is as follows.
Key1:
Type: String
Value: ABC
Key2:
Type: Number
Value: 123
# => ( "Key1" => ( "Type" => "String", "Value" => "ABC"),
"Key2" => ( "Type" => "Number", "Value" => 123))
Combination of hash and array is as follows.
String:
- A
- B
- C
Number:
- 1
- 2
- 3
# => ( "String" => [ "A", "B", "C"], "Number" => [1, 2, 3])
3. Recipe File Blocks
The following recipe file blocks (hash structure) is composed. Order description of each block is optional, we recommend that you write in the following order.
1. General block (required)
2. Path blocked
3. Resource block
4. File block (required)
Please use UTF-8 encoded to include other languages such as Japanese.
Block 3.1.general (Required)
Specify the basic information about the executable file to be generated. This block is required.
general:
startup: foo.rb
output: bar.exe
core: cui
kcode: sjis
startup key when you start the executable, you first run the Ruby script file name. This key is required.
key output specifies the output file name of the executable file to be generated. If omitted, the file name is used recipes. Recipe file extension "exy" If the extension "exe" file name substitution, and otherwise ". Exe" file that uses the name appended. If the output file name is specified in the command options are given priority by the command options.
core key is used to generate the executable file that specifies the core Exerb. Defined name, specify the name or file. If the core is specified in the command options are given priority by the command options.
kcode key, Ruby script to specify the character code. corresponds to the ruby command-K option. If the character code specified in the command options are given priority by the command options. Letter codes, please specify the following one.
Means the value specified
Any none (default)
euc EUC
sjis Shift-JIS
utf8 UTF-8
Block 3.2.path
Ruby script to specify the search path for libraries and other extensions. Absolute path to relative path described in the recipe file or directory exists.
path:
- .. \ Lib \ so
- C: \ ruby \ lib
- C: \ ruby
Block 3.3.resource
Specifies the information to generate the executable file resources.
This block specifies the block and icon resources icon of the executable file, which specifies the version is the version information resource blocks.
Block 3.3.1.icon
Specifies the icon resources. If this block is omitted, the default icon is used that is included in the core. Multiple sizes, you can specify the icon for the number of colors, other than to specify the icon resources Meinaikon not.
resource:
icon:
--
width: 16
height: 16
color: 4
file: file.ico
key width, the number of pixels in the horizontal direction of the icon (W) is specified.
key height, the number of vertical pixels of the icon (height) is specified.
key color, you specify the number of bits of color depth of icons. For example, if 16-bit color 4.
key file, specify the above three files that contain a single icon for the specified key.複数のサイズ、色数が含まれているアイコンファイルを指定することができますが、アイコンリソースとして使用されるのは、上記3つのキーで指定したアイコンのみです。
Block 3.3.2.version
Specifies the version information resource. If this block is omitted, the default will use the information contained in the version of the core.
resource:
version:
file_version_number: 1.2.3.4
product_version_number: 5.6.7.8
comments: comment
company_name: Company
legal_copyright: Copyright Information
legal_trademarks: Trademark Information
file_version: File Version (text)
product_version: product version (string)
product_name: Product
file_description: description of the file
internal_name: Internal name
original_filename: official file
private_build: Puraibetobirudo Information
special_build: Supesharubirudo Information
file_version_number key, product_version_number the keys, file versions, respectively, separated by a dot-product version 4 specifies two numbers. Each figures, can be used from 0 to 65535 range.
Other key specifies the contents of each string. If you use Japanese text is a recipe file to UTF-8 encoding please.
Block 3.4.file (Required)
Specify the files that need to be included in the genereated EXE file. This block is required.
file:
foo.so:
file: foo / foo.so
type: extension-library
The key name to specify a file name. This file name is called the internal file name, require reading the file is used by the method. The internal file name to be compared as a single string, including path separator character, "require" .. / foo / bar.so "" Please be careful and not interpret it correctly. The above method calls require ".. / foo / bar.so" internal file names that are searched.
key file specifies the actual file name. If the same internal file name, or you can search from the search path can be omitted.
key type specifies the type of file. If omitted, the type is determined based on the file extension.
Describes the extension type
. rb script
(Ruby script) Ruby script written text. require can be read at.
. so extension-library
(Library extensions) C library extensions written in languages such as (dynamic). require can be read at.
. dll dynamic-library
(Dynamic) dynamic link library used by the extension. If requested by the extension library is loaded automatically. Can not be loaded explicitly.
. res resource-library
(Library resources) that contains only dynamic resource. Exerb resource data can be read using a runtime module.
. dat data
(Data) binaries, images, data files and databases. Exerb can be read using a runtime module. Can not write.
Runtime module-Class Reference, please refer to.
Copyright (C) 2001-2006 All rights reserved.
No comments:
Post a Comment