← Back to team overview

kicad-developers team mailing list archive

MacOSX - (Proposal) Adding Document Icons and OS Associations

 

I've yesterday added the file osx_fileassociation.zip containing document icons and files required to associate files.
Zip file should be decompressed in the sources root and committed.
The following changes are required to CMake files to build the correct bundles.

Note that cmake 2.6.2 at least is required associate files.

Thank you,
Marco

Index: cvpcb/CMakeLists.txt
===================================================================
--- cvpcb/CMakeLists.txt	(revision 1716)
+++ cvpcb/CMakeLists.txt	(working copy)
@@ -49,9 +49,11 @@
endif(WIN32)
 
if(APPLE)
- set(CVPCB_RESOURCES cvpcb.icns)
+ set(CVPCB_RESOURCES cvpcb.icns cvpcb_doc.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
+ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/cvpcb_doc.icns"
+ PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE cvpcb.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb)
set(MACOSX_BUNDLE_NAME cvpcb)
@@ -59,6 +61,10 @@
 
add_executable(cvpcb WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_EXTRA_SRCS}${CVPCB_RESOURCES})
 
+if(APPLE)
+ set_target_properties(cvpcb PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
+endif(APPLE)
+
target_link_libraries(cvpcb 3d-viewer common pcbcommon polygon bitmaps kbool ${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES})
 
install(TARGETS cvpcb
Index: eeschema/CMakeLists.txt
===================================================================
--- eeschema/CMakeLists.txt	(revision 1716)
+++ eeschema/CMakeLists.txt	(working copy)
@@ -128,9 +128,11 @@
endif(WIN32)
 
if(APPLE)
- set(EESCHEMA_RESOURCES eeschema.icns)
+ 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(MACOSX_BUNDLE_ICON_FILE eeschema.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.eeschema)
set(MACOSX_BUNDLE_NAME eeschema)
@@ -138,6 +140,10 @@
 
add_executable(eeschema WIN32 MACOSX_BUNDLE ${EESCHEMA_SRCS} ${EESCHEMA_EXTRA_SRCS} ${EESCHEMA_RESOURCES})
 
+if(APPLE)
+ set_target_properties(eeschema PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
+endif(APPLE)
+
target_link_libraries(eeschema common bitmaps ${wxWidgets_LIBRARIES})
 
install(TARGETS eeschema
Index: gerbview/CMakeLists.txt
===================================================================
--- gerbview/CMakeLists.txt	(revision 1716)
+++ gerbview/CMakeLists.txt	(working copy)
@@ -54,9 +54,11 @@
endif(WIN32)
 
if(APPLE)
- set(GERBVIEW_RESOURCES gerbview.icns)
+ set(GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
+ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview_doc.icns"
+ PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE gerbview.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.gerbview)
set(MACOSX_BUNDLE_NAME gerbview)
@@ -64,6 +66,10 @@
 
add_executable(gerbview WIN32 MACOSX_BUNDLE ${GERBVIEW_SRCS} ${GERBVIEW_EXTRA_SRCS} ${GERBVIEW_RESOURCES})
 
+if(APPLE)
+ set_target_properties(gerbview PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
+endif(APPLE)
+
target_link_libraries(gerbview 3d-viewer common pcbcommon polygon bitmaps kbool ${wxWidgets_LIBRARIES})
 
install(TARGETS gerbview
Index: kicad/CMakeLists.txt
===================================================================
--- kicad/CMakeLists.txt	(revision 1716)
+++ kicad/CMakeLists.txt	(working copy)
@@ -25,9 +25,11 @@
endif(WIN32)
 
if(APPLE)
- set(KICAD_RESOURCES kicad.icns)
+ set(KICAD_RESOURCES kicad.icns kicad_doc.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/kicad.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
+ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/kicad_doc.icns"
+ PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE kicad.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.kicad)
set(MACOSX_BUNDLE_NAME kicad)
@@ -35,6 +37,10 @@
 
add_executable(kicad WIN32 MACOSX_BUNDLE ${KICAD_SRCS} ${KICAD_EXTRA_SRCS}${KICAD_RESOURCES})
 
+if(APPLE)
+ set_target_properties(kicad PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
+endif(APPLE)
+
target_link_libraries(kicad common bitmaps ${wxWidgets_LIBRARIES})
 
install(TARGETS kicad
Index: pcbnew/CMakeLists.txt
===================================================================
--- pcbnew/CMakeLists.txt	(revision 1716)
+++ pcbnew/CMakeLists.txt	(working copy)
@@ -160,16 +160,23 @@ 
endif(WIN32)
 
if(APPLE)
- set(PCBNEW_RESOURCES pcbnew.icns)
+ 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(MACOSX_BUNDLE_ICON_FILE pcbnew.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pcbnew)
set(MACOSX_BUNDLE_NAME pcbnew)
+ set(MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
endif(APPLE)
 
add_executable(pcbnew WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS} ${PCBNEW_EXTRA_SRCS} ${PCBNEW_RESOURCES})
 
+if(APPLE)
+ set_target_properties(pcbnew PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
+endif(APPLE)
+
target_link_libraries(pcbnew 3d-viewer common pcbcommon polygon bitmaps kbool ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES})
 
install(TARGETS pcbnew