Skip to content

Commit

Permalink
add icon png & ico
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslepoix committed Dec 10, 2024
1 parent c823806 commit 4ce111a
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 2 deletions.
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
stdenv = prev.llvmPackages_13.stdenv;
};

inherit (prev.python310Packages) cairosvg;

csxcad = (prev.csxcad.overrideAttrs (new: old: {
version = "0.6.3";
src = prev.fetchFromGitHub {
Expand Down
36 changes: 34 additions & 2 deletions icon/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@

compile_latex_file( "icon" REGISTER_TO "ICON_FILES" )
add_custom_target( "icon" DEPENDS ${ICON_FILES} )
# As TikZ fadings are buggy, SVG generation requires going through a PDF
# intermediate plus a manual edition step.
compile_latex_file( "icon" REGISTER_TO "ICON_SVG_FILE" )

# Warning : order matters.
#svg_to_png( "openemsh" SIZE 512 REGISTER_TO "ICON_PNG_FILES" )
svg_to_png( "openemsh" SIZE 256 REGISTER_TO "ICON_PNG_FILES" )
svg_to_png( "openemsh" SIZE 128 REGISTER_TO "ICON_PNG_FILES" )
svg_to_png( "openemsh" SIZE 64 REGISTER_TO "ICON_PNG_FILES" )
svg_to_png( "openemsh" SIZE 48 REGISTER_TO "ICON_PNG_FILES" )
svg_to_png( "openemsh" SIZE 32 REGISTER_TO "ICON_PNG_FILES" )
svg_to_png( "openemsh" SIZE 22 REGISTER_TO "ICON_PNG_FILES" )
svg_to_png( "openemsh" SIZE 16 REGISTER_TO "ICON_PNG_FILES" )

png_to_ico( "openemsh" INPUT ${ICON_PNG_FILES} REGISTER_TO "ICON_ICO_FILE" )

add_custom_target( "icon"
DEPENDS
${ICON_SVG_FILE}
${ICON_PNG_FILES}
${ICON_ICO_FILE}
)

add_custom_target( "icon_replace"
DEPENDS
# ${ICON_SVG_FILE}
${ICON_PNG_FILES}
${ICON_ICO_FILE}
COMMAND ${CMAKE_COMMAND} -E copy
${ICON_PNG_FILES}
${ICON_ICO_FILE}
"${CMAKE_CURRENT_SOURCE_DIR}/"
COMMENT "Copying icon png and ico files back to ${CMAKE_CURRENT_SOURCE_DIR}/"
)
Binary file added icon/openemsh.128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/openemsh.16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/openemsh.22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/openemsh.256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/openemsh.32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/openemsh.48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/openemsh.64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon/openemsh.ico
Binary file not shown.

0 comments on commit 4ce111a

Please sign in to comment.