diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt
index 40204eebfd..9ce90ab5bf 100644
--- a/eeschema/CMakeLists.txt
+++ b/eeschema/CMakeLists.txt
@@ -489,12 +489,13 @@ set_source_files_properties( dialogs/dialog_user_defined_signals.cpp
if( APPLE )
# setup bundle
- set( EESCHEMA_RESOURCES eeschema.icns eeschema_doc.icns )
- set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/eeschema.icns" PROPERTIES
- MACOSX_PACKAGE_LOCATION Resources
- )
- set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/eeschema_doc.icns" PROPERTIES
- MACOSX_PACKAGE_LOCATION Resources
+ set( EESCHEMA_RESOURCES eeschema.icns eeschema_doc.icns libedit.icns libedit_doc.icns )
+ set_source_files_properties(
+ "${CMAKE_CURRENT_SOURCE_DIR}/eeschema.icns"
+ "${CMAKE_CURRENT_SOURCE_DIR}/eeschema_doc.icns"
+ "${CMAKE_CURRENT_SOURCE_DIR}/libedit.icns"
+ "${CMAKE_CURRENT_SOURCE_DIR}/libedit_doc.icns"
+ PROPERTIES MACOSX_PACKAGE_LOCATION Resources
)
set( MACOSX_BUNDLE_ICON_FILE eeschema.icns )
set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad.kicad )
diff --git a/eeschema/libedit.icns b/eeschema/libedit.icns
new file mode 100644
index 0000000000..bc5612b80c
Binary files /dev/null and b/eeschema/libedit.icns differ
diff --git a/eeschema/libedit_doc.icns b/eeschema/libedit_doc.icns
new file mode 100644
index 0000000000..bc5612b80c
Binary files /dev/null and b/eeschema/libedit_doc.icns differ
diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt
index 6df834504a..ad2b7cb449 100644
--- a/pcbnew/CMakeLists.txt
+++ b/pcbnew/CMakeLists.txt
@@ -578,12 +578,13 @@ set_source_files_properties( dialogs/panel_setup_rules.cpp
if( APPLE )
# setup bundle
- set( PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns )
- set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns" PROPERTIES
- MACOSX_PACKAGE_LOCATION Resources
- )
- set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew_doc.icns" PROPERTIES
- MACOSX_PACKAGE_LOCATION Resources
+ set( PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns fpedit.icns fpedit_doc.icns )
+ set_source_files_properties(
+ "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns"
+ "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew_doc.icns"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fpedit.icns"
+ "${CMAKE_CURRENT_SOURCE_DIR}/fpedit_doc.icns"
+ PROPERTIES MACOSX_PACKAGE_LOCATION Resources
)
set( MACOSX_BUNDLE_ICON_FILE pcbnew.icns )
set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad.kicad )
diff --git a/pcbnew/fpedit.icns b/pcbnew/fpedit.icns
new file mode 100644
index 0000000000..0d641cefb9
Binary files /dev/null and b/pcbnew/fpedit.icns differ
diff --git a/pcbnew/fpedit_doc.icns b/pcbnew/fpedit_doc.icns
new file mode 100644
index 0000000000..0d641cefb9
Binary files /dev/null and b/pcbnew/fpedit_doc.icns differ
diff --git a/resources/macos/plist/eeschema.Info.plist.in b/resources/macos/plist/eeschema.Info.plist.in
index 7d8fc6e554..30e51fb24c 100644
--- a/resources/macos/plist/eeschema.Info.plist.in
+++ b/resources/macos/plist/eeschema.Info.plist.in
@@ -15,13 +15,23 @@
CFBundleTypeName KiCad schematic document
LSHandlerRank Owner
+
+ CFBundleTypeRole None
+ CFBundleTypeExtensions
+
+ kicad_sym
+
+ CFBundleTypeIconFile libedit_doc.icns
+ CFBundleTypeName KiCad symbol library
+ LSHandlerRank None
+
CFBundleDevelopmentRegion English
CFBundleExecutable eeschema
CFBundleGetInfoString
CFBundleIconFile eeschema.icns
CFBundleIdentifier org.kicad.eeschema
- CFBundleInfoDictionaryVersion 6.0
+ CFBundleInfoDictionaryVersion 7.0
CFBundleLongVersionString @KICAD_VERSION_FULL@
CFBundleName Schematic Editor
CFBundlePackageType APPL
diff --git a/resources/macos/plist/kicad.Info.plist.in b/resources/macos/plist/kicad.Info.plist.in
index 645cf04118..acedb26e3e 100644
--- a/resources/macos/plist/kicad.Info.plist.in
+++ b/resources/macos/plist/kicad.Info.plist.in
@@ -11,16 +11,25 @@
pro
kicad_pro
- CFBundleTypeName kicad project files
+ CFBundleTypeName KiCad project file
LSHandlerRank Owner
+
+ CFBundleTypeRole None
+ CFBundleTypeExtensions
+
+ kicad_mod
+
+ CFBundleTypeName KiCad project local settings
+ LSHandlerRank None
+
CFBundleDevelopmentRegion English
CFBundleExecutable kicad
CFBundleGetInfoString
CFBundleIconFile kicad.icns
CFBundleIdentifier org.kicad.kicad
- CFBundleInfoDictionaryVersion 6.0
+ CFBundleInfoDictionaryVersion 7.0
CFBundleLongVersionString @KICAD_VERSION_FULL@
CFBundleName KiCad
CFBundlePackageType APPL
diff --git a/resources/macos/plist/pcbnew.Info.plist.in b/resources/macos/plist/pcbnew.Info.plist.in
index 3253b8769a..82fa696c38 100644
--- a/resources/macos/plist/pcbnew.Info.plist.in
+++ b/resources/macos/plist/pcbnew.Info.plist.in
@@ -13,16 +13,35 @@
brd
- CFBundleTypeName pcbnew board
+ CFBundleTypeName KiCad PCB document
LSHandlerRank Owner
+
+ CFBundleTypeRole None
+ CFBundleTypeExtensions
+
+ kicad_mod
+
+ CFBundleTypeIconFile fpedit_doc.icns
+ CFBundleTypeName KiCad footprint
+ LSHandlerRank None
+
+
+ CFBundleTypeRole None
+ CFBundleTypeExtensions
+
+ kicad_dru
+
+ CFBundleTypeName KiCad custom design rules
+ LSHandlerRank None
+
CFBundleExecutable pcbnew
CFBundleGetInfoString
CFBundleIconFile pcbnew.icns
CFBundleIdentifier org.kicad.pcbnew
- CFBundleInfoDictionaryVersion 6.0
+ CFBundleInfoDictionaryVersion 7.0
CFBundleLongVersionString @KICAD_VERSION_FULL@
CFBundleName PCB Editor
CFBundlePackageType APPL
diff --git a/tools/build/mk_macos_icons.py b/tools/build/mk_macos_icons.py
old mode 100644
new mode 100755
index d4363f791c..c900c6f95e
--- a/tools/build/mk_macos_icons.py
+++ b/tools/build/mk_macos_icons.py
@@ -1,36 +1,38 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# This script regenerates the .icns files for MacOS application packaging.
# You need to be running on MacOS to use it (for iconutil)
-# You also need imagemagick + rsvg installed, with something like:
-# brew install imagemagick --with-librsvg
+# You also need rsvg-convert installed, with something like:
+# brew install librsvg
import os
from shutil import copy, rmtree
from subprocess import call
-ICON_SOURCES = "../../resources/bitmaps_png/sources/"
+ICON_SOURCES = "../../resources/bitmaps_png/sources/light/"
+# (sourcename, (dest1, dest2, ...), output_dir)
ICONS = [
- ("bitmap2component", ("bitmap2component",), "../../bitmap2component"),
- ("cvpcb", ("cvpcb", "cvpcb_doc"), "../../cvpcb"),
- ("eeschema", ("eeschema", "eeschema_doc"), "../../eeschema"),
- ("libedit", ("eeschema", "eeschema_doc"), "../../eeschema"),
- ("gerbview", ("gerbview", "gerbview_doc"), "../../gerbview"),
- ("kicad", ("kicad", "kicad_doc"), "../../kicad"),
- ("pagelayout_editor", ("pl_editor", "pl_editor_doc"), "../../pagelayout_editor"),
- ("pcbcalculator", ("pcb_calculator",), "../../pcb_calculator"),
- ("pcbnew", ("pcbnew", "pcbnew_doc"), "../../pcbnew")
+ # ("bitmap2component", ("bitmap2component",), "../../bitmap2component"),
+ # ("cvpcb", ("cvpcb", "cvpcb_doc"), "../../cvpcb"),
+ # ("eeschema", ("eeschema", "eeschema_doc"), "../../eeschema"),
+ ("libedit", ("libedit", "libedit_doc"), "../../eeschema"),
+ # ("gerbview", ("gerbview", "gerbview_doc"), "../../gerbview"),
+ # ("kicad", ("kicad", "kicad_doc"), "../../kicad"),
+ # ("pagelayout_editor", ("pagelayout_editor", "pagelayout_editor_doc"), "../../pagelayout_editor"),
+ # ("pcbcalculator", ("pcb_calculator",), "../../pcb_calculator"),
+ # ("pcbnew", ("pcbnew", "pcbnew_doc"), "../../pcbnew"),
+ ("modedit", ("fpedit", "fpedit_doc"), "../../pcbnew")
]
SIZES = [
- ("!16x16", ("16x16",)),
- ("!32x32", ("16x16@2x", "32x32")),
- ("!64x64", ("32x32@2x",)),
- ("!128x128", ("128x128",)),
- ("!256x256", ("128x128@2x", "256x256")),
- ("!512x512", ("256x256@2x", "512x512")),
- ("!1024x1024", ("512x512@2x",))
+ ("16", ("16x16",)),
+ ("32", ("16x16@2x", "32x32")),
+ ("64", ("32x32@2x",)),
+ ("128", ("128x128",)),
+ ("256", ("128x128@2x", "256x256")),
+ ("512", ("256x256@2x", "512x512")),
+ ("1024", ("512x512@2x",))
]
if __name__ == '__main__':
@@ -39,13 +41,16 @@ if __name__ == '__main__':
src = ICON_SOURCES + "icon_" + src + ".svg"
iconset = dest[0] + ".iconset"
+
os.mkdir(iconset)
for size, outputs in SIZES:
dest_path = os.path.join(iconset, "icon_" + outputs[0] + ".png")
- print size, src, dest_path
- call(["convert", "-background", "none", "-density", "5000",
- "-resize", size, src, dest_path])
+ convert_size = "!{}x{}".format(size, size)
+ print(size, convert_size, src, dest_path)
+ call(["rsvg-convert", "--background-color=transparent", "--dpi-x=5000", "--dpi-y=5000",
+ "--width={}".format(size), "--height={}".format(size), "--output={}".format(dest_path),
+ src])
for duplicate in outputs[1:]:
dupe_path = os.path.join(iconset, "icon_" + duplicate + ".png")
copy(dest_path, dupe_path)