feat: add example for RC file

This commit is contained in:
2026-09-14 10:17:53 +08:00
parent 3454d5cfe5
commit 9bd3862328
2 changed files with 75 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
#pragma code_page(65001)
// ---------------------------
// String tables
// ---------------------------
{% for lang in languages %}// {{ lang.name }}
LANGUAGE {{ lang.primary }}, {{ lang.sublanguage }}
STRINGTABLE
BEGIN
{% for i in (1000..1002) %}
{% assign key = i | to_string %}
{% assign s = lang.named[key] %}
{{ s.key }} "{{ s.text | rc_escape }}" // {{ s.comment }}
{% endfor %}
END
{% endfor %}
// ---------------------------
// Version information
// ---------------------------
1 VERSIONINFO
FILEVERSION 1, 0, 0, 0
PRODUCTVERSION 1, 0, 0, 0
FILEFLAGMASK 0x3fL
FILEFLAGS 0x0L
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
BEGIN
BLOCK "StringFileInfo"
BEGIN
{% for lang in languages %}
BLOCK "{{ lang.block_key }}"
BEGIN
VALUE "Comments", "https://github.com/SarasasChipWorkshop/metaglot"
VALUE "CompanyName", "Sarasa's Chip Workshop"
VALUE "FileDescription", "{{ lang.named.file_description | rc_escape }}"
VALUE "FileVersion", "1.0.0.0"
VALUE "InternalName", "example"
VALUE "LegalCopyright", "MIT/Expat License - Copyright (C) 2026 Sarasa's Chip Workshop"
VALUE "OriginalFilename", "example.exe"
VALUE "ProductName", "{{ lang.named.product_name | rc_escape }}"
VALUE "ProductVersion", "1.0.0.0"
END
{% endfor %}
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", {% for lang in languages %}{{ lang.langid }}, 1200{% unless forloop.last %}, {% endunless %}{% endfor %}
END
END
+23
View File
@@ -0,0 +1,23 @@
version = 1
[strings.1000]
msgid = "Pineapple Pictures - Image Viewer"
context = "Explorer" # Used by Explorer to show in panel.
comment = "File description of the executable."
[strings.1001]
msgid = "JPEG Image"
comment = "File type name for: jpg, jpeg, jfif"
[strings.1002]
msgid = "PNG Image"
comment = "File type name for: png"
[strings.file_description]
msgid = "Pineapple Pictures - Image Viewer"
context = "Self" # Used by file itself as its property.
comment = "File description of the executable."
[strings.product_name]
msgid = "Pineapple Pictures"
comment = "Display name of the product."