Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added extra file info to built executable #507

Open
wants to merge 4 commits into
base: port
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile.port
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ $(B_DIR)/%.o: %.cpp $(JSON_HEADERS)
@mkdir -p $(dir $@)
$(CXX) -c $(CXXFLAGS) $(OPT_LVL) -o $@ $<

dist/windows/%.rc:
tools/mkresource.sh $(VERSION_HASH) $(VERSION_BRANCH) $(ROMID) $(BIN_NAME)

$(B_DIR)/%.res: dist/windows/%.rc
windres $< -O coff -o $@

Expand Down
1 change: 0 additions & 1 deletion dist/windows/icon.rc

This file was deleted.

27 changes: 27 additions & 0 deletions tools/mkresource.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
tee dist/windows/icon.rc <<EOF
100 ICON "./icon.ico"
1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "Perfect Dark decompilation project"
VALUE "FileDescription", "The unofficial Win32 port of Perfect Dark $3 $2 $1"
VALUE "FileVersion", "$1"
VALUE "InternalName", "perfectDark-Win32-$3-$2-$1"
VALUE "LegalCopyright", "(C) 2022 Ryan Dwyer, (C) 2023 fgsfdsfgs"
VALUE "OriginalFilename", "$4"
VALUE "ProductName", "Perfect Dark Win32"
VALUE "ProductVersion", "$3-$2-$1"
END
END

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
EOF