diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 0f345cbbb2..6f0ac1a57c 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -49,7 +49,7 @@ set(COMMON_SRCS richio.cpp selcolor.cpp string.cpp - toolbars.cpp + wineda_toolbar.cpp trigo.cpp worksheet.cpp wxwineda.cpp diff --git a/common/toolbars.cpp b/common/wineda_toolbar.cpp similarity index 90% rename from common/toolbars.cpp rename to common/wineda_toolbar.cpp index d4e1f258d1..a4a6845677 100644 --- a/common/toolbars.cpp +++ b/common/wineda_toolbar.cpp @@ -13,7 +13,7 @@ WinEDA_Toolbar::WinEDA_Toolbar( id_toolbar type, wxWindow * parent, wxWindowID id, bool horizontal ): wxAuiToolBar( parent, id, wxDefaultPosition, wxDefaultSize, - wxAUI_TB_DEFAULT_STYLE | ( ( horizontal ) ? + wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_OVERFLOW | ( ( horizontal ) ? wxAUI_TB_HORZ_LAYOUT : wxAUI_TB_VERTICAL ) ) { diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index e7b5ced47e..f9adde7d2f 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -1,28 +1,25 @@ add_definitions(-DCVPCB) +### +# Includes +### include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${Boost_INCLUDE_DIR} ../3d-viewer ../pcbnew ../polygon ${CMAKE_SOURCE_DIR}/common) -## -# Name of target on OSX is also the title of the application -# on other targets this should be as normal -## -if(APPLE) - set(CVPCB_NAME CvPCB) -else(APPLE) - set(CVPCB_NAME cvpcb) -endif(APPLE) +### +# Sources +### set(CVPCB_SRCS autosel.cpp cfg.cpp class_cvpcb.cpp - class_components_listbox.cpp + class_components_listbox.cpp class_DisplayFootprintsFrame.cpp - class_footprints_listbox.cpp + class_footprints_listbox.cpp cvframe.cpp cvpcb.cpp dialog_cvpcb_config.cpp @@ -42,6 +39,9 @@ set(CVPCB_SRCS tool_cvpcb.cpp writenetlistpcbnew.cpp) +### +# Windows resource file +### if(WIN32) if(MINGW) # CVPCB_RESOURCES variable is set by the macro. @@ -52,7 +52,7 @@ if(WIN32) endif(WIN32) ### -# CvPCB.app resources +# Apple resource files ### if(APPLE) set(CVPCB_RESOURCES cvpcb.icns cvpcb_doc.icns) @@ -64,18 +64,31 @@ if(APPLE) set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb) endif(APPLE) -add_executable(${CVPCB_NAME} WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_RESOURCES}) +### +# Create the cvpcb executable +### +add_executable(cvpcb WIN32 MACOSX_BUNDLE + ${CVPCB_SRCS} + ${CVPCB_RESOURCES}) ### -# CvPCB.app creation +# Set properties for APPLE on cvpcb target ### if(APPLE) - set_target_properties(${CVPCB_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) + set_target_properties(cvpcb PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) endif(APPLE) -target_link_libraries(${CVPCB_NAME} 3d-viewer common pcbcommon polygon bitmaps kbool - ${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES}) - -install(TARGETS ${CVPCB_NAME} +### +# Link executable target cvpcb with correct libraries +### +target_link_libraries(cvpcb 3d-viewer common pcbcommon polygon bitmaps kbool + ${OPENGL_LIBRARIES} + ${wxWidgets_LIBRARIES} + ${GDI_PLUS_LIBRARIES} + ) +### +# Add cvpcb as install target +### +install(TARGETS cvpcb DESTINATION ${KICAD_BIN} COMPONENT binary) diff --git a/cvpcb/Info.plist b/cvpcb/Info.plist index ac97768ccf..0664abf2df 100644 --- a/cvpcb/Info.plist +++ b/cvpcb/Info.plist @@ -10,6 +10,7 @@ CFBundleTypeExtensions net + cmp CFBundleTypeName cvpcb document diff --git a/eeschema/eeschema_doc.icns b/eeschema/eeschema_doc.icns new file mode 100644 index 0000000000..7d2e0ebca6 Binary files /dev/null and b/eeschema/eeschema_doc.icns differ diff --git a/eeschema/file_sch.icns b/eeschema/file_sch.icns deleted file mode 100644 index 84813af236..0000000000 Binary files a/eeschema/file_sch.icns and /dev/null differ diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index f67af7e692..dc4dde033f 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -1,21 +1,17 @@ add_definitions(-DGERBVIEW -DPCBNEW) +### +# Includes +### include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${Boost_INCLUDE_DIR} ../3d-viewer ../cvpcb ../pcbnew ../polygon) -## -# Name of target on OSX is also the title of the application -# on other targets this should be as normal -## -if(APPLE) - set(GERBVIEW_NAME GerbView) -else(APPLE) - set(GERBVIEW_NAME gerbview) -endif(APPLE) - +### +# Sources +### set(GERBVIEW_SRCS block.cpp class_gerbview_layer_widget.cpp @@ -23,7 +19,7 @@ set(GERBVIEW_SRCS dcode.cpp deltrack.cpp dialog_print_using_printer.cpp - dialog_print_using_printer_base.cpp + dialog_print_using_printer_base.cpp dummy_functions.cpp edit.cpp export_to_pcbnew.cpp @@ -48,11 +44,17 @@ set(GERBVIEW_SRCS tool_gerber.cpp tracepcb.cpp ) +### +# We need some extra sources from pcbnew +### set(GERBVIEW_EXTRA_SRCS ../pcbnew/layer_widget.cpp ../pcbnew/printout_controler.cpp ) +### +# Windows resource file +### if(WIN32) if(MINGW) # GERBVIEW_RESOURCES variable is set by the macro. @@ -62,6 +64,9 @@ if(WIN32) endif(MINGW) endif(WIN32) +### +# Apple resource files +### if(APPLE) set(GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns) set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview.icns" @@ -72,15 +77,32 @@ if(APPLE) set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.gerbview) endif(APPLE) -add_executable(${GERBVIEW_NAME} WIN32 MACOSX_BUNDLE ${GERBVIEW_SRCS} ${GERBVIEW_EXTRA_SRCS} ${GERBVIEW_RESOURCES}) +### +# Create the gerbview executable +### +add_executable(gerbview WIN32 MACOSX_BUNDLE + ${GERBVIEW_SRCS} + ${GERBVIEW_EXTRA_SRCS} + ${GERBVIEW_RESOURCES}) +### +# Set properties for APPLE on gerbview target +### if(APPLE) - set_target_properties(${GERBVIEW_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) + set_target_properties(gerbview PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) endif(APPLE) -target_link_libraries(${GERBVIEW_NAME} common pcbcommon 3d-viewer polygon bitmaps kbool - ${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES}) +### +# Link executable target gerbview with correct libraries +### +target_link_libraries(gerbview common pcbcommon 3d-viewer polygon bitmaps kbool + ${OPENGL_LIBRARIES} + ${wxWidgets_LIBRARIES} + ${GDI_PLUS_LIBRARIES}) -install(TARGETS ${GERBVIEW_NAME} +### +# Add gerbview as install target +### +install(TARGETS gerbview DESTINATION ${KICAD_BIN} COMPONENT binary) diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index ca678ec2d3..7a9f237190 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -36,24 +36,22 @@ if(APPLE) set(MACOSX_BUNDLE_NAME kicad) endif(APPLE) -if(APPLE) - add_executable(KiCad MACOSX_BUNDLE ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KICAD_RESOURCES}) -else(APPLE) - add_executable(kicad WIN32 ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KICAD_RESOURCES}) -endif(APPLE) +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) - target_link_libraries(KiCad common bitmaps ${wxWidgets_LIBRARIES}) -install(TARGETS KiCad - DESTINATION ${KICAD_BIN} - COMPONENT binary) + set_target_properties(kicad PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) + target_link_libraries(kicad common bitmaps ${wxWidgets_LIBRARIES}) else(APPLE) target_link_libraries(kicad common bitmaps kbool polygon ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES}) - install(TARGETS kicad +endif(APPLE) + +install(TARGETS kicad DESTINATION ${KICAD_BIN} COMPONENT binary) -endif(APPLE) if(KICAD_MINIZIP) add_subdirectory(minizip) diff --git a/kicad/Info.plist b/kicad/Info.plist index b33a80d824..79e966d508 100644 --- a/kicad/Info.plist +++ b/kicad/Info.plist @@ -7,7 +7,11 @@ CFBundleTypeIconFile kicad_doc.icns - CFBundleTypeName + CFBundleTypeExtensions + + pro + + CFBundleTypeName kicad project files LSHandlerRank Owner diff --git a/packaging/mac-osx/dmg-generator/Makefile b/packaging/mac-osx/dmg-generator/Makefile index 93402a3a94..c214afe6f1 100644 --- a/packaging/mac-osx/dmg-generator/Makefile +++ b/packaging/mac-osx/dmg-generator/Makefile @@ -7,7 +7,7 @@ # Original credits by Adium developers ! # http://www.adium.im ########### -VERSION=20100118 +VERSION=`date +%Y%m%d` ########### # Variables @@ -21,7 +21,10 @@ RELEASE_NAME=kicad-$(VERSION) # Targets ########### all: - + echo "Copying application bundles" + mkdir release + cp -R ../../../*/*.app release + echo "Building kicad-${VERSION}.dmg" rm -rfv build mkdir build @@ -32,6 +35,6 @@ all: mkdir -p $(BUILD_DIR)/.background - ./make-diskimage.sh $(BUILD_DIR)/$(RELEASE_NAME).dmg $(KICAD_DIR) "KiCad $(VERSION)" dmg_kicad.scpt $(ART_DIR) + ./make-diskimage.sh $(BUILD_DIR)/$(RELEASE_NAME).dmg $(KICAD_DIR) "KiCad" dmg_kicad.scpt $(ART_DIR) - @echo Build finished. `md5 $(BUILD_DIR)/$(RELEASE_NAME).dmg` + @echo "Build finished. `md5 $(BUILD_DIR)/$(RELEASE_NAME).dmg`" diff --git a/packaging/mac-osx/dmg-generator/dmg_kicad.scpt b/packaging/mac-osx/dmg-generator/dmg_kicad.scpt index 6d134adfe6..9e72fbe7fa 100644 Binary files a/packaging/mac-osx/dmg-generator/dmg_kicad.scpt and b/packaging/mac-osx/dmg-generator/dmg_kicad.scpt differ diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 10332fb299..58ec67504f 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -1,20 +1,18 @@ add_definitions(-DPCBNEW) +### +# Includes +### include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${Boost_INCLUDE_DIR} ../3d-viewer ../polygon) -## -# Name of target on OSX is also the title of the application -# on other targets this should be as normal -## -if(APPLE) - set(PCBNEW_NAME PCBNew) -else(APPLE) - set(PCBNEW_NAME pcbnew) -endif(APPLE) -# Many of the commented out ones are nested in *.cpp files for dialogs +### +# Sources +# +# NOTE: Many of the commented out ones are nested in *.cpp files for dialogs +### set(PCBNEW_SRCS pcbframe.cpp attribut.cpp @@ -176,10 +174,16 @@ set(PCBNEW_SRCS zones_test_and_combine_areas.cpp ) +### +# We need some extra sources from common +### set(PCBNEW_EXTRA_SRCS ../common/dialog_page_settings.cpp ) +### +# Windows resource file +### if(WIN32) if(MINGW) # PCBNEW_RESOURCES variable is set by the macro. @@ -189,6 +193,9 @@ if(WIN32) endif(MINGW) endif(WIN32) +### +# Set properties for APPLE on pcbnew target +### if(APPLE) set(PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns) set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns" @@ -217,19 +224,34 @@ set_source_files_properties( dialog_freeroute_exchange.cpp OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h ) -add_executable(${PCBNEW_NAME} WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS} - ${PCBNEW_EXTRA_SRCS} - ${PCBNEW_RESOURCES} - ) +### +# Create the pcbnew executable +### +add_executable(pcbnew WIN32 MACOSX_BUNDLE + ${PCBNEW_SRCS} + ${PCBNEW_EXTRA_SRCS} + ${PCBNEW_RESOURCES} + ) +### +# Set properties for APPLE on pcbnew target +### if(APPLE) - set_target_properties(${PCBNEW_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) + set_target_properties(pcbnew PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) endif(APPLE) -target_link_libraries(${PCBNEW_NAME} 3d-viewer common pcbcommon polygon bitmaps kbool - ${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES}) +### +# Link executable target pcbnew with correct libraries +### +target_link_libraries(pcbnew 3d-viewer common pcbcommon polygon bitmaps kbool + ${OPENGL_LIBRARIES} + ${wxWidgets_LIBRARIES} + ${GDI_PLUS_LIBRARIES}) -install(TARGETS ${PCBNEW_NAME} +### +# Add pcbnew as install target +### +install(TARGETS pcbnew DESTINATION ${KICAD_BIN} COMPONENT binary)