Skip to content

Commit 3a52b77

Browse files
committed
fix(release): valid AppImage placeholder icon, editor-test DLLs beside the exe on Windows
1 parent 0181bed commit 3a52b77

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,20 @@ jobs:
9292
Icon=roadmaker-editor
9393
Categories=Development;
9494
EOF
95-
# Minimal placeholder icon (single transparent pixel) until branding.
96-
printf '\x89PNG\r\n\x1a\n' > /dev/null
97-
python3 -c "import base64,pathlib; pathlib.Path('roadmaker-editor.png').write_bytes(base64.b64decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=='))"
95+
# Placeholder icon until branding — linuxdeploy requires a standard
96+
# resolution (a 1x1 pixel is rejected), so generate a solid 256x256.
97+
python3 - <<'PYEOF'
98+
import struct, zlib, pathlib
99+
def chunk(tag, data):
100+
return struct.pack(">I", len(data)) + tag + data + struct.pack(">I", zlib.crc32(tag + data))
101+
size = 256
102+
row = b"\x00" + b"\x2e\x64\x8e\xff" * size # filter byte + solid RGBA rows
103+
png = (b"\x89PNG\r\n\x1a\n"
104+
+ chunk(b"IHDR", struct.pack(">IIBBBBB", size, size, 8, 6, 0, 0, 0))
105+
+ chunk(b"IDAT", zlib.compress(row * size))
106+
+ chunk(b"IEND", b""))
107+
pathlib.Path("roadmaker-editor.png").write_bytes(png)
108+
PYEOF
98109
export QMAKE=${{ github.workspace }}/.qt/6.8.3/gcc_64/bin/qmake
99110
# linuxdeploy resolves the installed binary's dependencies with ldd,
100111
# which needs the provisioned Qt libs on the search path.

‎editor/tests/CMakeLists.txt‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,16 @@ target_link_libraries(roadmaker_editor_tests PRIVATE
2929

3030
rm_apply_warnings(roadmaker_editor_tests)
3131

32+
if(WIN32)
33+
# gtest_discover_tests runs the exe at build time and Windows has no rpath:
34+
# the runtime DLLs (Qt, plus the kernel when RM_BUILD_SHARED) must sit next
35+
# to the test executable.
36+
add_custom_command(TARGET roadmaker_editor_tests POST_BUILD
37+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
38+
$<TARGET_RUNTIME_DLLS:roadmaker_editor_tests>
39+
$<TARGET_FILE_DIR:roadmaker_editor_tests>
40+
COMMAND_EXPAND_LISTS)
41+
endif()
42+
3243
gtest_discover_tests(roadmaker_editor_tests
3344
PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")

0 commit comments

Comments
 (0)