diff --git a/3d-viewer/3d_canvas.cpp b/3d-viewer/3d_canvas.cpp index dc3a0bb12d..29bf93ebe9 100644 --- a/3d-viewer/3d_canvas.cpp +++ b/3d-viewer/3d_canvas.cpp @@ -28,7 +28,6 @@ #include "trackball.h" /* Tool and button Bitmaps */ -#define XPM_3D_MAIN #include "bitmaps.h" enum onrclick_id { @@ -63,10 +62,8 @@ EVT_MENU_RANGE( ID_POPUP_3D_VIEW_START, ID_POPUP_3D_VIEW_END, END_EVENT_TABLE() /*************************************************************************/ -Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent, const wxWindowID id, - int* gl_attrib ) : - wxGLCanvas( parent, id, - wxPoint( -1, -1 ), wxSize( -1, -1 ), wxFULL_REPAINT_ON_RESIZE ) +Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent ) : + wxGLCanvas( parent, -1, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ) /*************************************************************************/ { m_init = FALSE; @@ -91,7 +88,6 @@ void Pcb3D_GLCanvas::ClearLists() { if( m_gllist > 0 ) glDeleteLists( m_gllist, 1 ); -// m_init = FALSE; m_gllist = 0; } diff --git a/3d-viewer/3d_frame.cpp b/3d-viewer/3d_frame.cpp index df5fa9a0b4..d520fc6d49 100644 --- a/3d-viewer/3d_frame.cpp +++ b/3d-viewer/3d_frame.cpp @@ -32,12 +32,6 @@ double ZBottom; double ZTop; double DataScale3D; // coeff de conversion unites utilsateut -> unites 3D -int gl_attrib[] = -{ - WX_GL_RGBA, WX_GL_MIN_RED, 8, WX_GL_MIN_GREEN, 8, WX_GL_MIN_BLUE, 8, - WX_GL_DEPTH_SIZE, 16, WX_GL_DOUBLEBUFFER, GL_NONE -}; - BEGIN_EVENT_TABLE( WinEDA3D_DrawFrame, wxFrame ) EVT_TOOL_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE, WinEDA3D_DrawFrame::Process_Zoom ) @@ -84,7 +78,7 @@ WinEDA3D_DrawFrame::WinEDA3D_DrawFrame( WinEDA_BasePcbFrame* parent, // Make a Pcb3D_GLCanvas - m_Canvas = new Pcb3D_GLCanvas( this, -1, gl_attrib ); + m_Canvas = new Pcb3D_GLCanvas( this ); /* init OpenGL once */ m_Canvas->InitGL(); diff --git a/3d-viewer/3d_viewer.h b/3d-viewer/3d_viewer.h index e4cc103a72..5290c781aa 100644 --- a/3d-viewer/3d_viewer.h +++ b/3d-viewer/3d_viewer.h @@ -80,8 +80,7 @@ private: GLuint m_gllist; public: - Pcb3D_GLCanvas( WinEDA3D_DrawFrame *parent, const wxWindowID id = -1, - int* gl_attrib = NULL); + Pcb3D_GLCanvas( WinEDA3D_DrawFrame *parent ); ~Pcb3D_GLCanvas(); void ClearLists(); diff --git a/3d-viewer/makefile.macosx b/3d-viewer/makefile.macosx deleted file mode 100644 index 1c8a2a92d9..0000000000 --- a/3d-viewer/makefile.macosx +++ /dev/null @@ -1,29 +0,0 @@ -## Makefile for 3d-viewer.a - -include ../libs.macosx - -TARGET = 3d-viewer.a - -all: $(TARGET) - -deps: - $(CXX) $(CPPFLAGS) -E -MMD -MG *.cpp >/dev/null - -include makefile.include --include *.d - -CPPFLAGS += -DPCBNEW -I../pcbnew -EDACPPFLAGS = $(CPPFLAGS) - -$(TARGET): $(OBJECTS3D) makefile.macosx makefile.include - rm -f $@ - ar -rv $@ $(OBJECTS3D) - ranlib $@ - - -clean: - rm -f *.o; rm -f *~ - rm -f $(TARGET) - - - diff --git a/common/base_struct.cpp b/common/base_struct.cpp index 60172bcb1c..020f6abd16 100644 --- a/common/base_struct.cpp +++ b/common/base_struct.cpp @@ -29,7 +29,7 @@ EDA_BaseStruct::EDA_BaseStruct( EDA_BaseStruct* parent, KICAD_T idType ) { InitVars(); m_StructType = idType; - m_Parent = parent; /* Chainage hierarchique sur struct racine */ + m_Parent = parent; /* Chainage hierarchique sur struct racine */ } @@ -85,7 +85,7 @@ SEARCH_RESULT EDA_BaseStruct::Visit( INSPECTOR* inspector, const void* testData, { KICAD_T stype; -#if 0 && defined (DEBUG) +#if 0 && defined(DEBUG) std::cout << GetClass().mb_str() << ' '; #endif @@ -105,7 +105,7 @@ SEARCH_RESULT EDA_BaseStruct::Visit( INSPECTOR* inspector, const void* testData, } -#if defined (DEBUG) +#if defined(DEBUG) // A function that should have been in wxWidgets std::ostream& operator<<( std::ostream& out, const wxSize& size ) @@ -173,9 +173,9 @@ EDA_TextStruct::EDA_TextStruct( const wxString& text ) m_Mirror = false; // display mirror if true m_HJustify = GR_TEXT_HJUSTIFY_LEFT; m_VJustify = GR_TEXT_VJUSTIFY_CENTER; /* Justifications Horiz et Vert du texte */ - m_Width = 0; /* thickness */ - m_Italic = false; /* true = italic shape */ - m_Text = text; + m_Width = 0; /* thickness */ + m_Italic = false; /* true = italic shape */ + m_Text = text; } @@ -196,7 +196,7 @@ int EDA_TextStruct::Len_Size() if( nbchar == 0 ) return 0; - len = (( (10 * m_Size.x ) / 9 ) + m_Width) * nbchar; + len = ( ( (10 * m_Size.x ) / 9 ) + m_Width ) * nbchar; return len; } @@ -211,10 +211,10 @@ bool EDA_TextStruct::HitTest( const wxPoint& posref ) * false else. */ { - int dx, dy; + int dx, dy; wxPoint location; - dx = (int) (( Pitch() * GetLength() ) / 2); + dx = (int) ( ( Pitch() * GetLength() ) / 2 ); dy = m_Size.y / 2; /* Is the ref point inside the text area ? */ @@ -246,15 +246,16 @@ bool EDA_TextStruct::HitTest( EDA_Rect& refArea ) /*******************************/ -int EDA_TextStruct::Pitch(int aMinTickness) +int EDA_TextStruct::Pitch( int aMinTickness ) /*******************************/ + /** * Function Pitch * @return distance between 2 characters * @param aMinTickness = min segments tickness */ { - return ((m_Size.x * 10)/9) + MAX( m_Width, aMinTickness); + return ( (m_Size.x * 10) / 9 ) + MAX( m_Width, aMinTickness ); } @@ -264,6 +265,7 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, GRFillMode aDisplayMode, EDA_Colors aAnchor_color ) /***************************************************************/ + /** Function Draw * @param aPanel = the current DrawPanel * @param aDC = the current Device Context @@ -275,67 +277,75 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, */ { - wxPoint pos = m_Pos; - wxArrayString* list = wxStringSplit( m_Text, '\n'); + wxPoint pos = m_Pos; + wxArrayString* list = wxStringSplit( m_Text, '\n' ); - for( int i=0;iCount();i++) + for( unsigned i = 0; iCount(); i++ ) { - wxString txt = list->Item(i); - wxSize size=DrawOneLine(aPanel,aDC,aOffset,aColor,aDrawMode,aDisplayMode,aAnchor_color,txt,pos); - pos.y+=1.5*(size.y); + wxString txt = list->Item( i ); + wxSize size = DrawOneLine( aPanel, + aDC, + aOffset, + aColor, + aDrawMode, + aDisplayMode, + aAnchor_color, + txt, + pos ); + pos.y += 1.5 * (size.y); } - delete (list); - -} + delete (list); +} wxSize EDA_TextStruct::DrawOneLine( WinEDA_DrawPanel* aPanel, wxDC* aDC, - const wxPoint& aOffset, EDA_Colors aColor, - int aDrawMode, - GRFillMode aDisplayMode, EDA_Colors aAnchor_color, - wxString txt, wxPoint pos ) + const wxPoint& aOffset, EDA_Colors aColor, + int aDrawMode, + GRFillMode aDisplayMode, EDA_Colors aAnchor_color, + wxString txt, wxPoint pos ) { - int width = m_Width; - if( aDisplayMode == FILAIRE ) - width = 0; + int width = m_Width; - if( aDrawMode != -1 ) - GRSetDrawMode( aDC, aDrawMode ); + if( aDisplayMode == FILAIRE ) + width = 0; - /* Draw text anchor, if allowed */ - if( aAnchor_color != UNSPECIFIED_COLOR ) - { - int anchor_size = aPanel->GetScreen()->Unscale( 2 ); - aAnchor_color = (EDA_Colors) (aAnchor_color & MASKCOLOR); + if( aDrawMode != -1 ) + GRSetDrawMode( aDC, aDrawMode ); - int cX = pos.x + aOffset.x; - int cY = pos.y + aOffset.y; + /* Draw text anchor, if allowed */ + if( aAnchor_color != UNSPECIFIED_COLOR ) + { + int anchor_size = aPanel->GetScreen()->Unscale( 2 ); + aAnchor_color = (EDA_Colors) (aAnchor_color & MASKCOLOR); - GRLine( &aPanel->m_ClipBox, aDC, cX - anchor_size, cY, - cX + anchor_size, cY, 0, aAnchor_color ); + int cX = pos.x + aOffset.x; + int cY = pos.y + aOffset.y; - GRLine( &aPanel->m_ClipBox, aDC, cX, cY - anchor_size, - cX, cY + anchor_size, 0, aAnchor_color ); - } + GRLine( &aPanel->m_ClipBox, aDC, cX - anchor_size, cY, + cX + anchor_size, cY, 0, aAnchor_color ); - if( aDisplayMode == SKETCH ) - width = -width; - - wxSize size = m_Size; - - if ( m_Mirror ) - size.x = -size.x; + GRLine( &aPanel->m_ClipBox, aDC, cX, cY - anchor_size, + cX, cY + anchor_size, 0, aAnchor_color ); + } - - - DrawGraphicText( aPanel, aDC, - aOffset + pos, aColor, txt, - m_Orient, size, - m_HJustify, m_VJustify, width, m_Italic ); - return size; + if( aDisplayMode == SKETCH ) + width = -width; + + wxSize size = m_Size; + + if( m_Mirror ) + size.x = -size.x; + + + DrawGraphicText( aPanel, aDC, + aOffset + pos, aColor, txt, + m_Orient, size, + m_HJustify, m_VJustify, width, m_Italic ); + return size; } + /******************/ /* Class EDA_Rect */ /******************/ @@ -369,7 +379,7 @@ bool EDA_Rect::Inside( const wxPoint& point ) { int rel_posx = point.x - m_Pos.x; int rel_posy = point.y - m_Pos.y; - wxSize size = m_Size; + wxSize size = m_Size; if( size.x < 0 ) { @@ -395,10 +405,10 @@ bool EDA_Rect::Intersects( const EDA_Rect aRect ) const // this logic taken from wxWidgets' geometry.cpp file: bool rc; - int left = MAX( m_Pos.x, aRect.m_Pos.x ); - int right = MIN( m_Pos.x + m_Size.x, aRect.m_Pos.x + aRect.m_Size.x ); - int top = MAX( m_Pos.y, aRect.m_Pos.y ); - int bottom = MIN( m_Pos.y + m_Size.y, aRect.m_Pos.y + aRect.m_Size.y ); + int left = MAX( m_Pos.x, aRect.m_Pos.x ); + int right = MIN( m_Pos.x + m_Size.x, aRect.m_Pos.x + aRect.m_Size.x ); + int top = MAX( m_Pos.y, aRect.m_Pos.y ); + int bottom = MIN( m_Pos.y + m_Size.y, aRect.m_Pos.y + aRect.m_Size.y ); if( left < right && top < bottom ) rc = true; @@ -499,7 +509,7 @@ void EDA_Rect::Merge( const EDA_Rect& aRect ) Normalize(); // ensure width and height >= 0 EDA_Rect rect = aRect; rect.Normalize(); // ensure width and height >= 0 - wxPoint end = GetEnd(); + wxPoint end = GetEnd(); wxPoint rect_end = rect.GetEnd(); // Change origin and size in order to contain the given rect diff --git a/common/makefile.macosx b/common/makefile.macosx deleted file mode 100644 index bd1defa3b2..0000000000 --- a/common/makefile.macosx +++ /dev/null @@ -1,30 +0,0 @@ -## Makefile for common.a - -include ../libs.macosx - -TARGET = common.a pcbcommon.a - -all: $(TARGET) - -deps: - $(CXX) $(CPPFLAGS) -E -MMD -MG *.cpp >/dev/null - -include makefile.include --include *.d - -CPPFLAGS += $(EXTRACPPFLAGS) -EDACPPFLAGS = $(CPPFLAGS) - -common.a: $(COMMON_OBJECTS) makefile.macosx makefile.include - rm -f $@ - ar -rv $@ $(COMMON_OBJECTS) - ranlib $@ - -pcbcommon.a: $(COMMON_PCB_OBJECTS) makefile.macosx makefile.include - rm -f $@ - ar -rv $@ $(COMMON_PCB_OBJECTS) - ranlib $@ - -clean: - rm -f *.o; rm -f *~ - rm -f $(TARGET) diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index a777164354..88748206eb 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -38,9 +38,11 @@ if(WIN32) 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) @@ -48,6 +50,10 @@ endif(APPLE) add_executable(cvpcb WIN32 MACOSX_BUNDLE ${CVPCB_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 diff --git a/cvpcb/makefile.macosx b/cvpcb/makefile.macosx deleted file mode 100644 index 4c6932eb91..0000000000 --- a/cvpcb/makefile.macosx +++ /dev/null @@ -1,41 +0,0 @@ -## Makefile for kicad - -include ../libs.macosx - -TARGET = cvpcb - -all: $(TARGET).app - -deps: - $(CXX) $(CPPFLAGS) -E -MMD -MG *.cpp >/dev/null - -include makefile.include --include *.d - -CPPFLAGS += $(EXTRACPPFLAGS) -EDACPPFLAGS = $(CPPFLAGS) - -$(TARGET): $(OBJECTS) $(TARGET).r makefile.macosx makefile.include $(EXTRALIBS) ../libs.macosx $(LIBVIEWER3D) - $(LD) $(OBJECTS) $(LDFLAGS) $(LIBVIEWER3D) $(LIBS3D) -o $(TARGET) - $(RESCOMP) -o $(TARGET) Carbon.r $(TARGET).r - $(SETFILE) -a C $(TARGET) - - -$(TARGET).app: $(TARGET) - rm -rf $(TARGET).app - mkdir -p $(TARGET).app - mkdir -p $(TARGET).app/Contents - mkdir -p $(TARGET).app/Contents/MacOS - mkdir -p $(TARGET).app/Contents/Resources - cp $(TARGET).icns $(TARGET).app/Contents/Resources - cp Info.plist $(TARGET).app/Contents - echo -n "APPL????" > $(TARGET).app/Contents/PkgInfo - cp $(TARGET) $(TARGET).app/Contents/MacOS/$(TARGET) - -install: $(TARGET).app - cp -Rf $(TARGET).app $(KICAD_BIN) - -clean: - rm -f *.o; rm -f *~ - rm -rf $(TARGET).app - rm -f $(TARGET) diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 7d5bb4ef29..e050fd9b90 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -128,9 +128,11 @@ if(WIN32) 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 @@ endif(APPLE) 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 diff --git a/eeschema/class_text-label.cpp b/eeschema/class_text-label.cpp index e794221192..4af657256e 100644 --- a/eeschema/class_text-label.cpp +++ b/eeschema/class_text-label.cpp @@ -199,6 +199,7 @@ void SCH_TEXT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, switch( m_Orient ) { + default: case 0: /* Horiz Normal Orientation (left justified) */ orientation = TEXT_ORIENT_HORIZ; Hjustify = GR_TEXT_HJUSTIFY_LEFT; @@ -228,7 +229,7 @@ void SCH_TEXT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, break; } - for( int i=0;iCount();i++) + for( unsigned i=0;iCount();i++) { wxString txt = list->Item(i); diff --git a/eeschema/makefile.macosx b/eeschema/makefile.macosx deleted file mode 100644 index e5d4c10d2c..0000000000 --- a/eeschema/makefile.macosx +++ /dev/null @@ -1,48 +0,0 @@ -## Makefile for eeschema - -include ../libs.macosx - -TARGET = eeschema - -all: $(TARGET).app netlist_form_pads-pcb - -deps: - $(CXX) $(CPPFLAGS) -E -MMD -MG *.cpp >/dev/null - -include makefile.include --include *.d - -CPPFLAGS += $(EXTRACPPFLAGS) -EDACPPFLAGS = $(CPPFLAGS) - -$(TARGET): $(OBJECTS) $(TARGET).r makefile.macosx makefile.include $(EXTRALIBS) ../libs.macosx - $(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $(TARGET) - $(RESCOMP) -o $(TARGET) Carbon.r $(TARGET).r - $(SETFILE) -a C $(TARGET) - - -$(TARGET).app: $(TARGET) - rm -rf $(TARGET).app - mkdir -p $(TARGET).app - mkdir -p $(TARGET).app/Contents - mkdir -p $(TARGET).app/Contents/MacOS - mkdir -p $(TARGET).app/Contents/Resources - cp $(TARGET).icns $(TARGET).app/Contents/Resources - cp file_sch.icns $(TARGET).app/Contents/Resources - cp Info.plist $(TARGET).app/Contents - echo -n "APPL????" > $(TARGET).app/Contents/PkgInfo - cp $(TARGET) $(TARGET).app/Contents/MacOS/$(TARGET) - -netlist_form_pads-pcb: plugins/netlist_form_pads-pcb.cpp - g++ -D__UNIX__ $(CXXFLAGS) -Wall plugins/netlist_form_pads-pcb.cpp -o netlist_form_pads-pcb - - -install: $(TARGET).app - cp -Rf $(TARGET).app $(KICAD_BIN) - cp -f netlist_form_pads-pcb $(KICAD_BIN) - -clean: - rm -f *.o; rm -f *~ - rm -rf $(TARGET).app - rm -f $(TARGET) - rm -f netlist_form_pads-pcb \ No newline at end of file diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index 9175abd8d8..f284bef984 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -54,9 +54,11 @@ if(WIN32) 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 @@ endif(APPLE) 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 diff --git a/gerbview/makefile.macosx b/gerbview/makefile.macosx deleted file mode 100644 index dabb1fb1a4..0000000000 --- a/gerbview/makefile.macosx +++ /dev/null @@ -1,40 +0,0 @@ -## Makefile for gerbview - -include ../libs.macosx - -TARGET = gerbview - -all: $(TARGET).app - -deps: - $(CXX) $(CPPFLAGS) -E -MMD -MG *.cpp >/dev/null - -include makefile.include --include *.d - -CPPFLAGS += $(EXTRACPPFLAGS) -EDACPPFLAGS = $(CPPFLAGS) - -$(TARGET): $(OBJECTS) $(TARGET).r makefile.macosx makefile.include $(EXTRALIBS) ../libs.macosx - $(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $(TARGET) - $(RESCOMP) -o $(TARGET) Carbon.r $(TARGET).r - $(SETFILE) -a C $(TARGET) - -$(TARGET).app: $(TARGET) - rm -rf $(TARGET).app - mkdir -p $(TARGET).app - mkdir -p $(TARGET).app/Contents - mkdir -p $(TARGET).app/Contents/MacOS - mkdir -p $(TARGET).app/Contents/Resources - cp $(TARGET).icns $(TARGET).app/Contents/Resources - cp Info.plist $(TARGET).app/Contents - echo -n "APPL????" > $(TARGET).app/Contents/PkgInfo - cp $(TARGET) $(TARGET).app/Contents/MacOS/$(TARGET) - -install: $(TARGET).app - cp -Rf $(TARGET).app $(KICAD_BIN) - -clean: - rm -f *.o; rm -f *~ - rm -rf $(TARGET).app - rm -f $(TARGET) diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 96a32ed1bc..a35e2c45d1 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -25,9 +25,11 @@ if(WIN32) 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 @@ 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) +endif(APPLE) + target_link_libraries(kicad common bitmaps ${wxWidgets_LIBRARIES}) install(TARGETS kicad diff --git a/kicad/makefile.macosx b/kicad/makefile.macosx deleted file mode 100644 index 655d031544..0000000000 --- a/kicad/makefile.macosx +++ /dev/null @@ -1,42 +0,0 @@ -## Makefile for kicad - -include ../libs.macosx - -TARGET = kicad - -all: $(TARGET).app - -deps: - $(CXX) $(CPPFLAGS) -E -MMD -MG *.cpp >/dev/null - -include makefile.include --include *.d - -CPPFLAGS += $(EXTRACPPFLAGS) -EDACPPFLAGS = $(CPPFLAGS) - -$(TARGET): $(OBJECTS) $(TARGET).r makefile.macosx makefile.include $(EXTRALIBS) ../libs.macosx - $(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $(TARGET) - $(RESCOMP) -o $(TARGET) Carbon.r $(TARGET).r - $(SETFILE) -a C $(TARGET) - - -$(TARGET).app: $(TARGET) - rm -rf $(TARGET).app - mkdir -p $(TARGET).app - mkdir -p $(TARGET).app/Contents - mkdir -p $(TARGET).app/Contents/MacOS - mkdir -p $(TARGET).app/Contents/Resources - cp $(TARGET).icns $(TARGET).app/Contents/Resources - cp file_pro.icns $(TARGET).app/Contents/Resources - cp Info.plist $(TARGET).app/Contents - echo -n "APPL????" > $(TARGET).app/Contents/PkgInfo - cp $(TARGET) $(TARGET).app/Contents/MacOS/$(TARGET) - -install: $(TARGET).app - cp -Rf $(TARGET).app $(KICAD_BIN) - -clean: - rm -f *.o; rm -f *~ - rm -rf $(TARGET).app - rm -f $(TARGET) diff --git a/makefile.macosx b/makefile.macosx deleted file mode 100644 index e5e1a8136e..0000000000 --- a/makefile.macosx +++ /dev/null @@ -1,19 +0,0 @@ -KICAD_SUBDIRS = common 3d-viewer polygon eeschema pcbnew cvpcb kicad gerbview -KICAD_SUBDIRS_BIN = eeschema pcbnew cvpcb kicad gerbview -# How to invoke make: -MAKE = make -f makefile.macosx -MAKE_INSTALL = make -f makefile.macosx install -MAKE_CLEAN = make -f makefile.macosx clean - - -all: - @for d in $(KICAD_SUBDIRS); do (cd $$d && $(MAKE)); done - -deps: - @for d in $(KICAD_SUBDIRS); do (cd $$d && $(MAKE) -k deps); done - -install: - @for d in $(KICAD_SUBDIRS_BIN); do (cd $$d && $(MAKE_INSTALL)); done - -clean: - @for d in $(KICAD_SUBDIRS); do (cd $$d && $(MAKE_CLEAN)); done diff --git a/osx-package/__MACOSX/._osx-package.pmdoc b/osx-package/__MACOSX/._osx-package.pmdoc deleted file mode 100644 index 0ddac7cfd4..0000000000 Binary files a/osx-package/__MACOSX/._osx-package.pmdoc and /dev/null differ diff --git a/osx-package/osx-package.pmdoc/01cvpcb-contents.xml b/osx-package/osx-package.pmdoc/01cvpcb-contents.xml deleted file mode 100644 index bc1e5a791f..0000000000 --- a/osx-package/osx-package.pmdoc/01cvpcb-contents.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/osx-package/osx-package.pmdoc/01cvpcb.xml b/osx-package/osx-package.pmdoc/01cvpcb.xml deleted file mode 100644 index c5472c36d9..0000000000 --- a/osx-package/osx-package.pmdoc/01cvpcb.xml +++ /dev/null @@ -1 +0,0 @@ -net.sourceforge.kicad.cvpcb1cvpcb/cvpcb.app/Applications/KicadparentinstallFrom.pathinstallTo.isAbsoluteTyperelocatableinstallFrom.isRelativeTypeincludeRootinstallTo.pathinstallToidentifier/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$ \ No newline at end of file diff --git a/osx-package/osx-package.pmdoc/02eeschema-contents.xml b/osx-package/osx-package.pmdoc/02eeschema-contents.xml deleted file mode 100644 index bc1e5a791f..0000000000 --- a/osx-package/osx-package.pmdoc/02eeschema-contents.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/osx-package/osx-package.pmdoc/02eeschema.xml b/osx-package/osx-package.pmdoc/02eeschema.xml deleted file mode 100644 index f0ae023f02..0000000000 --- a/osx-package/osx-package.pmdoc/02eeschema.xml +++ /dev/null @@ -1 +0,0 @@ -net.sourceforge.kicad.eeschema1eeschema/eeschema.app/Applications/KicadparentinstallFrom.pathinstallTo.isAbsoluteTypeinstallFrom.isAbsoluteTyperelocatableinstallFrom.isRelativeTypeincludeRootinstallTo.pathinstallToidentifier/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$ \ No newline at end of file diff --git a/osx-package/osx-package.pmdoc/03pcbnew-contents.xml b/osx-package/osx-package.pmdoc/03pcbnew-contents.xml deleted file mode 100644 index bc1e5a791f..0000000000 --- a/osx-package/osx-package.pmdoc/03pcbnew-contents.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/osx-package/osx-package.pmdoc/03pcbnew.xml b/osx-package/osx-package.pmdoc/03pcbnew.xml deleted file mode 100644 index 52fff6d2b0..0000000000 --- a/osx-package/osx-package.pmdoc/03pcbnew.xml +++ /dev/null @@ -1 +0,0 @@ -net.sourceforge.kicad.pcbnew1pcbnew/pcbnew.app/Applications/KicadparentidentifierinstallTo.isAbsoluteTypeincludeRootinstallFrom.pathinstallToinstallTo.path/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$ \ No newline at end of file diff --git a/osx-package/osx-package.pmdoc/04kicad-contents.xml b/osx-package/osx-package.pmdoc/04kicad-contents.xml deleted file mode 100644 index bc1e5a791f..0000000000 --- a/osx-package/osx-package.pmdoc/04kicad-contents.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/osx-package/osx-package.pmdoc/04kicad.xml b/osx-package/osx-package.pmdoc/04kicad.xml deleted file mode 100644 index 7207f722ef..0000000000 --- a/osx-package/osx-package.pmdoc/04kicad.xml +++ /dev/null @@ -1 +0,0 @@ -net.sourceforge.kicad.kicad1kicad/kicad.app/Applications/KicadparentidentifierinstallTo.isAbsoluteTypeincludeRootinstallFrom.pathinstallToinstallTo.path/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$ \ No newline at end of file diff --git a/osx-package/osx-package.pmdoc/05gerbview-contents.xml b/osx-package/osx-package.pmdoc/05gerbview-contents.xml deleted file mode 100644 index bc1e5a791f..0000000000 --- a/osx-package/osx-package.pmdoc/05gerbview-contents.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/osx-package/osx-package.pmdoc/05gerbview.xml b/osx-package/osx-package.pmdoc/05gerbview.xml deleted file mode 100644 index 9ddbfcdbf7..0000000000 --- a/osx-package/osx-package.pmdoc/05gerbview.xml +++ /dev/null @@ -1 +0,0 @@ -net.sourceforge.kicad.gerbview1gerbview/gerbview.app/Applications/KicadparentinstallToinstallTo.isAbsoluteTypeversionincludeRootinstallTo.pathidentifierinstallFrom.path/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$ \ No newline at end of file diff --git a/osx-package/osx-package.pmdoc/06demos-contents.xml b/osx-package/osx-package.pmdoc/06demos-contents.xml deleted file mode 100644 index 1d4dbf8390..0000000000 --- a/osx-package/osx-package.pmdoc/06demos-contents.xml +++ /dev/null @@ -1 +0,0 @@ -modemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemode \ No newline at end of file diff --git a/osx-package/osx-package.pmdoc/06demos.xml b/osx-package/osx-package.pmdoc/06demos.xml deleted file mode 100644 index 1a3386307c..0000000000 --- a/osx-package/osx-package.pmdoc/06demos.xml +++ /dev/null @@ -1 +0,0 @@ -net.sourceforge.kicad.demos1demos/Applications/KicadparentinstallTorequireAuthorizationinstallTo.isAbsoluteTypeinstallTo.isRelativeTypeincludeRootinstallTo.pathidentifierinstallFrom.path06demos-contents.xml/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$/CMake/cmake/Makefile \ No newline at end of file diff --git a/osx-package/osx-package.pmdoc/index.xml b/osx-package/osx-package.pmdoc/index.xml deleted file mode 100644 index 5fbb7fa7b8..0000000000 --- a/osx-package/osx-package.pmdoc/index.xml +++ /dev/null @@ -1 +0,0 @@ -Kicad/Users/marco/Development/kicad/kicad_d/Kicad.mpkgnet.sourceforge.kicadAUTHORS.txt01cvpcb.xml02eeschema.xml03pcbnew.xml04kicad.xml05gerbview.xml06demos.xmlproperties.anywhereDomainproperties.title \ No newline at end of file diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index e2890385a0..ae50091ed3 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -162,16 +162,23 @@ if(WIN32) 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 diff --git a/pcbnew/makefile.macosx b/pcbnew/makefile.macosx deleted file mode 100644 index 472a636ada..0000000000 --- a/pcbnew/makefile.macosx +++ /dev/null @@ -1,40 +0,0 @@ -## Makefile for pcbnew - -include ../libs.macosx - -TARGET = pcbnew - -all: $(TARGET).app - -deps: - $(CXX) $(CPPFLAGS) -E -MMD -MG *.cpp >/dev/null - -include makefile.include --include *.d - -CPPFLAGS += $(EXTRACPPFLAGS) -EDACPPFLAGS = $(CPPFLAGS) - -$(TARGET): $(OBJECTS) $(TARGET).r makefile.macosx makefile.include $(LIBVIEWER3D) $(EXTRALIBS) ../libs.macosx - $(LD) $(LDFLAGS) $(OBJECTS) $(LIBVIEWER3D) $(LIBS3D) -o $(TARGET) - $(RESCOMP) -o $(TARGET) Carbon.r $(TARGET).r - $(SETFILE) -a C $(TARGET) - -$(TARGET).app: $(TARGET) - rm -rf $(TARGET).app - mkdir -p $(TARGET).app - mkdir -p $(TARGET).app/Contents - mkdir -p $(TARGET).app/Contents/MacOS - mkdir -p $(TARGET).app/Contents/Resources - cp $(TARGET).icns $(TARGET).app/Contents/Resources - cp Info.plist $(TARGET).app/Contents - echo -n "APPL????" > $(TARGET).app/Contents/PkgInfo - cp $(TARGET) $(TARGET).app/Contents/MacOS/$(TARGET) - -install: $(TARGET).app - cp -Rf $(TARGET).app $(KICAD_BIN) - -clean: - rm -f *.o; rm -f *~ - rm -rf $(TARGET).app - rm -f $(TARGET)