Skip to content

Commit

Permalink
Add patch file for html file
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkjanfaber committed Nov 3, 2023
1 parent 81da373 commit 19a8c87
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .github/patches/wasm_shell.html.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- wasm_shell.html.orig 2023-11-03 11:33:35.553238323 +0100
+++ wasm_shell.html 2023-11-03 11:33:35.545238311 +0100
@@ -12,14 +12,14 @@
<title>@APPNAME@</title>
<style>
/* Make the html body cover the entire (visual) viewport with no scroll bars. */
- html, body { padding: 0; margin: 0; overflow: hidden; height: 100% }
+ html, body { background-color: #4790d0; padding: 0; margin: 0; overflow: hidden; height: 100% }
#screen { width: 100%; height: 100%; }
</style>
</head>
<body onload="init()">
<figure style="overflow:visible;" id="qtspinner">
<center style="margin-top:1.5em; line-height:150%">
- <img src="qtlogo.svg" width="320" height="200" style="display:block"></img>
+ <img src="victronenergy.svg" width="320" height="200" style="display:block"></img>
<strong>Qt for WebAssembly: @APPNAME@</strong>
<div id="qtstatus"></div>
<noscript>JavaScript is disabled. Please enable JavaScript to use this application.</noscript>
7 changes: 3 additions & 4 deletions .github/workflows/build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
run: |
echo patch Qt
./.github/patches/qt-fixes.sh
dos2unix $QTDIR/plugins/platforms/{qtloader.js,wasm_shell.html}
patch $QTDIR/plugins/platforms/qtloader.js < ./.github/patches/qtloader.js.patch
patch $QTDIR/plugins/platforms/wasm_shell.html.js < ./.github/patches/wasm_shell.html.patch
- name: Install emscripten ${{env.EMSCRIPTEN}}
run: |
echo installing emscripten ${EMSCRIPTEN}
Expand All @@ -74,10 +77,6 @@ jobs:
source "/home/runner/work/gui-v2/gui-v2/emsdk/emsdk_env.sh"
export QTDIR=/opt/hostedtoolcache/Qt/$QT_VERSION/wasm_singlethread
export PATH=$PATH:/opt/hostedtoolcache/Qt/Tools/CMake/bin
dos2unix $QTDIR/plugins/platforms/qtloader.js
patch $QTDIR/plugins/platforms/qtloader.js < ./.github/patches/qtloader.js.patch
sed -i "s/qtlogo.svg/victronenergy.svg/" $QTDIR/plugins/platforms/wasm_shell.html
sed -i "s/\(, body {\)/\1 background-color: #4790d0;/" $QTDIR/plugins/platforms/wasm_shell.html
mkdir build-wasm && cd build-wasm
${QTDIR}/bin/qt-cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..
cmake --build .
Expand Down

0 comments on commit 19a8c87

Please sign in to comment.