Commit 958c6d91 authored by stijn's avatar stijn Committed by Damien George

windows: Use the MicroPython logo as application icon.

Add a .ico file with common icon image size, created from
vector-logo-2.png, and embed it into the resulting executable.
Signed-off-by: default avatarstijn <stijn@ignitron.net>
parent 03eae488
......@@ -8,6 +8,7 @@
# These are binary so should never be modified by git.
*.a binary
*.ico binary
*.png binary
*.jpg binary
*.dxf binary
......
This diff was suppressed by a .gitattributes entry.
......@@ -102,3 +102,9 @@ test: $(BUILD)/$(PROG) $(TOP)/tests/run-tests.py
test_full: test
$(eval DIRNAME=ports/$(notdir $(CURDIR)))
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(BUILD)/$(PROG) $(PYTHON) ./run-tests.py --via-mpy $(RUN_TESTS_MPY_CROSS_FLAGS) $(RUN_TESTS_SKIP) -d basics float micropython
$(BUILD)/$(PROG): $(BUILD)/micropython.res
$(BUILD)/%.res: %.rc
$(ECHO) "WINDRES $<"
$(Q)$(WINDRES) $< -O coff -o $@
......@@ -135,3 +135,13 @@ For more info, see https://www.winehq.org/docs/wineusr-guide/cui-programs .
If built without line editing and history capabilities
(MICROPY_USE_READLINE=0), the resulting binary can be run using the standard
`wine` tool.
Generating the icon file
------------------------
The windows builds use a .ico file for the executable logo.
To generate such file from a .png file use ImageMagick, as was done for the icons in the logo/ directory:
magick convert vector-logo-2.png -define icon:auto-resize="256,128,96,64,48,32,16" vector-logo-2.ico
Note that for versions prior to 7.0 the command is `convert` instead of `magick convert`.
app ICON "../../logo/vector-logo-2.ico"
......@@ -103,6 +103,9 @@
<ClInclude Include="$(PyBaseDir)ports\windows\*.h" />
<ClInclude Include="$(PyBaseDir)ports\windows\msvc\*.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="micropython.rc" />
</ItemGroup>
<Import Project="msvc/genhdr.targets" />
<Import Project="$(CustomPropsFile)" Condition="exists('$(CustomPropsFile)')" />
<Target Name="GenerateMicroPythonSources" BeforeTargets="BuildGenerateSources" DependsOnTargets="GenerateHeaders;FreezeModules">
......
......@@ -54,6 +54,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
SIZE = $(CROSS_COMPILE)size
STRIP = $(CROSS_COMPILE)strip
AR = $(CROSS_COMPILE)ar
WINDRES = $(CROSS_COMPILE)windres
MAKE_MANIFEST = $(PYTHON) $(TOP)/tools/makemanifest.py
MAKE_FROZEN = $(PYTHON) $(TOP)/tools/make-frozen.py
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment