From 179bb920b8d152e61890700a9de24f3638bc20be Mon Sep 17 00:00:00 2001 From: Marco Serantoni Date: Sun, 26 Jan 2014 14:09:36 +0100 Subject: [PATCH] =?UTF-8?q?[MacOSX]=C2=A0adding=20multiprocess=20building?= =?UTF-8?q?=20and=20initial=20support=20for=20KICAD=5FBUILD=5FDYNAMIC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 29 +++++++++-- CMakeModules/download_boost.cmake | 2 +- CMakeModules/download_cairo.cmake | 11 +++-- CMakeModules/download_glew.cmake | 6 +-- CMakeModules/download_libpng.cmake | 12 +++-- CMakeModules/download_pixman.cmake | 18 +++++-- CMakeModules/download_pkgconfig.cmake | 23 +++++++-- CMakeModules/download_wxwidgets.cmake | 27 +++++----- patches/wxwidgets-3.0.0_macosx.patch | 71 +++++++++++++++++++++++---- 9 files changed, 153 insertions(+), 46 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 567b59d300..d72d54d6de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,7 +178,6 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing" ) if( APPLE ) - set( KICAD_BUILD_STATIC ON) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__ASSERTMACROS__ -mmacosx-version-min=10.5" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__ASSERTMACROS__ -mmacosx-version-min=10.5" ) @@ -300,10 +299,18 @@ if ( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) message(FATAL_ERROR "You can't build STATIC and DYNAMIC together") endif() - if( KICAD_BUILD_DYNAMIC ) - message(FATAL_ERROR "KICAD_BUILD_DYNAMIC Not implemented yet") + if( KICAD_BUILD_STATIC ) + message(STATUS "KICAD_BUILD_STATIC set") endif() + if( KICAD_BUILD_DYNAMIC ) + message(STATUS "KICAD_BUILD_DYNAMIC set") + # TODO - Library packaging/relocation + endif() + + add_custom_target( lib-dependencies + DEPENDS boost cairo glew libpng pixman pkgconfig + ) include( download_libpng ) @@ -311,6 +318,7 @@ if ( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) message(FATAL_ERROR "KICAD_BUILD_* and SCRIPTING Not Implemented Yet!") else() include( download_wxwidgets ) + add_dependencies( lib-dependencies libwx ) endif( KICAD_SCRIPTING_WXPYTHON ) include( download_pkgconfig ) @@ -505,6 +513,21 @@ add_dependencies( pl_editor boost ) add_dependencies( pnsrouter boost ) +if ( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) +add_dependencies( pcbnew lib-dependencies ) +add_dependencies( eeschema lib-dependencies ) +add_dependencies( cvpcb lib-dependencies ) +add_dependencies( gal lib-dependencies ) +add_dependencies( common lib-dependencies ) +add_dependencies( pcbcommon lib-dependencies ) +add_dependencies( 3d-viewer lib-dependencies ) +add_dependencies( pcad2kicadpcb lib-dependencies ) +add_dependencies( polygon lib-dependencies ) +add_dependencies( pl_editor lib-dependencies ) +add_dependencies( pnsrouter lib-dependencies ) +endif() + + ############# # Resources # ############# diff --git a/CMakeModules/download_boost.cmake b/CMakeModules/download_boost.cmake index f4bfab1c09..a18016724c 100644 --- a/CMakeModules/download_boost.cmake +++ b/CMakeModules/download_boost.cmake @@ -92,7 +92,7 @@ string( REPLACE "unit_test_framework" "test" boost_libs_list "${BOOST_LIBS_BUILT # Default Toolset set( BOOST_TOOLSET "toolset=gcc" ) -if( KICAD_BUILD_STATIC ) +if( KICAD_BUILD_STATIC OR APPLE ) set( BOOST_LINKTYPE "link=static" ) else() unset( BOOST_LINKTYPE ) diff --git a/CMakeModules/download_cairo.cmake b/CMakeModules/download_cairo.cmake index 4936371298..b2b2eaea53 100644 --- a/CMakeModules/download_cairo.cmake +++ b/CMakeModules/download_cairo.cmake @@ -37,6 +37,11 @@ find_package( BZip2 REQUIRED ) set( PREFIX ${DOWNLOAD_DIR}/cairo ) +if ( KICAD_BUILD_STATIC ) + set( CAIRO_BUILDTYPE --disable-shared ) +endif( KICAD_BUILD_STATIC ) + + if (APPLE) set( CAIRO_CFLAGS "CFLAGS=" ) @@ -77,7 +82,7 @@ ExternalProject_Add( cairo #SOURCE_DIR "${PREFIX}" #PATCH_COMMAND "" - CONFIGURE_COMMAND ./configure --prefix=${CAIRO_ROOT} --enable-static --disable-shared + CONFIGURE_COMMAND ./configure --prefix=${CAIRO_ROOT} --enable-static ${CAIRO_BUILDTYPE} PKG_CONFIG=${PROJECT_SOURCE_DIR}/pkgconfig_root/bin/pkg-config PKG_CONFIG_PATH=${PROJECT_SOURCE_DIR}/pixman_root/lib/pkgconfig:${PROJECT_SOURCE_DIR}/libpng_root/lib/pkgconfig --enable-png=yes --enable-svg=yes @@ -88,8 +93,8 @@ ExternalProject_Add( cairo #BINARY_DIR "${PREFIX}" - BUILD_COMMAND make + BUILD_COMMAND $(MAKE) INSTALL_DIR "${CAIRO_ROOT}" - INSTALL_COMMAND make install + INSTALL_COMMAND $(MAKE) install ) diff --git a/CMakeModules/download_glew.cmake b/CMakeModules/download_glew.cmake index 6e02a5b79e..47277fa270 100644 --- a/CMakeModules/download_glew.cmake +++ b/CMakeModules/download_glew.cmake @@ -65,8 +65,8 @@ ExternalProject_Add( glew #BINARY_DIR "${PREFIX}" - BUILD_COMMAND make ${GLEW_CFLAGS} ${GLEW_LDFLAGS} ${GLEW_STRIP} + BUILD_COMMAND $(MAKE) ${GLEW_CFLAGS} ${GLEW_LDFLAGS} ${GLEW_STRIP} - INSTALL_DIR "${GLEW_ROOT}" - INSTALL_COMMAND make GLEW_DEST="${GLEW_ROOT}" install && ranlib "${GLEW_ROOT}/lib/libGLEW.a" + INSTALL_DIR "${GLEW_ROOT}" + INSTALL_COMMAND $(MAKE) GLEW_DEST="${GLEW_ROOT}" install && ranlib "${GLEW_ROOT}/lib/libGLEW.a" ) diff --git a/CMakeModules/download_libpng.cmake b/CMakeModules/download_libpng.cmake index 043d1d259d..c878770cd6 100644 --- a/CMakeModules/download_libpng.cmake +++ b/CMakeModules/download_libpng.cmake @@ -43,6 +43,12 @@ if (APPLE) endif( CMAKE_OSX_ARCHITECTURES ) endif(APPLE) +if (KICAD_BUILD_STATIC) + set(LIBPNG_OPTS --enable-static --disable-shared) +else() + set(LIBPNG_OPTS --enable-static --enable-shared) +endif(KICAD_BUILD_STATIC) + # = ${PREFIX}/src/glew # There is a Bazaar 'boost scratch repo' in /boost and after committing pristine # download, the patch is applied. This lets you regenerate a new patch at any time @@ -59,11 +65,11 @@ ExternalProject_Add( libpng BUILD_IN_SOURCE 1 #PATCH_COMMAND "true" - CONFIGURE_COMMAND ./configure --prefix=${LIBPNG_ROOT} --enable-static --disable-shared ${LIBPNG_CFLAGS} --disable-dependency-tracking + CONFIGURE_COMMAND ./configure --prefix=${LIBPNG_ROOT} ${LIBPNG_OPTS} ${LIBPNG_CFLAGS} --disable-dependency-tracking #BINARY_DIR "${PREFIX}" - BUILD_COMMAND make + BUILD_COMMAND $(MAKE) INSTALL_DIR "${LIBPNG_ROOT}" - INSTALL_COMMAND make install + INSTALL_COMMAND $(MAKE) install ) diff --git a/CMakeModules/download_pixman.cmake b/CMakeModules/download_pixman.cmake index 57dfb47526..846fa76775 100644 --- a/CMakeModules/download_pixman.cmake +++ b/CMakeModules/download_pixman.cmake @@ -37,14 +37,22 @@ find_package( BZip2 REQUIRED ) set( PREFIX ${DOWNLOAD_DIR}/pixman ) +set(PIXMAN_CPPFLAGS "CFLAGS=") + if (APPLE) if( CMAKE_OSX_ARCHITECTURES ) - set(PIXMAN_CPPFLAGS "CFLAGS=-arch ${CMAKE_OSX_ARCHITECTURES} -fno-common -mmacosx-version-min=10.5") + set(PIXMAN_CPPFLAGS "${PIXMAN_CPPFLAGS} -arch ${CMAKE_OSX_ARCHITECTURES} -fno-common -mmacosx-version-min=10.5") else() - set(PIXMAN_CPPFLAGS "CFLAGS=-fno-common -mmacosx-version-min=10.5") + set(PIXMAN_CPPFLAGS "${PIXMAN_CPPFLAGS} -fno-common -mmacosx-version-min=10.5") endif( CMAKE_OSX_ARCHITECTURES ) endif(APPLE) +if (KICAD_BUILD_STATIC) + set(PIXMAN_OPTS --enable-static=yes --enable-shared=no) +else() + set(PIXMAN_OPTS --enable-static=yes --enable-shared=yes) +endif(KICAD_BUILD_STATIC) + # = ${PREFIX}/src/glew # There is a Bazaar 'boost scratch repo' in /boost and after committing pristine # download, the patch is applied. This lets you regenerate a new patch at any time @@ -61,11 +69,11 @@ ExternalProject_Add( pixman BUILD_IN_SOURCE 1 #PATCH_COMMAND "true" - CONFIGURE_COMMAND ./configure --prefix=${PIXMAN_ROOT} --enable-static=yes --enable-shared=no ${PIXMAN_CPPFLAGS} --disable-dependency-tracking + CONFIGURE_COMMAND ./configure --prefix=${PIXMAN_ROOT} ${PIXMAN_OPTS} ${PIXMAN_CPPFLAGS} --disable-dependency-tracking #BINARY_DIR "${PREFIX}" - BUILD_COMMAND make + BUILD_COMMAND $(MAKE) INSTALL_DIR "${PIXMAN_ROOT}" - INSTALL_COMMAND make install + INSTALL_COMMAND $(MAKE) install ) diff --git a/CMakeModules/download_pkgconfig.cmake b/CMakeModules/download_pkgconfig.cmake index 251a499e90..25b35671ee 100644 --- a/CMakeModules/download_pkgconfig.cmake +++ b/CMakeModules/download_pkgconfig.cmake @@ -37,6 +37,12 @@ find_package( BZip2 REQUIRED ) set( PREFIX ${DOWNLOAD_DIR}/pkgconfig ) +if ( KICAD_BUILD_STATIC ) + set( PKGCONFIG_BUILDTYPE --enable-shared=no --enable-static=yes ) +else() + set( PKGCONFIG_BUILDTYPE --enable-shared=yes --enable-static=yes ) +endif( KICAD_BUILD_STATIC ) + # = ${PREFIX}/src/glew # There is a Bazaar 'boost scratch repo' in /boost and after committing pristine # download, the patch is applied. This lets you regenerate a new patch at any time @@ -53,11 +59,22 @@ ExternalProject_Add( pkgconfig BUILD_IN_SOURCE 1 #PATCH_COMMAND "true" - CONFIGURE_COMMAND ./configure --prefix=${PKGCONFIG_ROOT} --with-internal-glib --enable-shared=no --enable-static=yes --disable-silent-rules + CONFIGURE_COMMAND ./configure --prefix=${PKGCONFIG_ROOT} --with-internal-glib ${PKGCONFIG_BUILDTYPE} --disable-silent-rules #BINARY_DIR "${PREFIX}" - BUILD_COMMAND make + BUILD_COMMAND $(MAKE) INSTALL_DIR "${PKGCONFIG_ROOT}" - INSTALL_COMMAND make install + INSTALL_COMMAND $(MAKE) install ) + +# +# At second execution make install will fail .. +# + +ExternalProject_Add_Step( pkgconfig pkgconfig_erase_dir + COMMAND rm -fr ${PKGCONFIG_ROOT} + COMMENT "*** Erasing pkgconfig directory" + DEPENDEES build + ) + diff --git a/CMakeModules/download_wxwidgets.cmake b/CMakeModules/download_wxwidgets.cmake index c9c944e4f4..1c19bd16b4 100644 --- a/CMakeModules/download_wxwidgets.cmake +++ b/CMakeModules/download_wxwidgets.cmake @@ -62,24 +62,26 @@ ExternalProject_Add( libwx BUILD_IN_SOURCE 1 - # wxOverlay PATCH for OSX + # wxOverlay PATCH for OSX - http://trac.wxwidgets.org/ticket/12894 PATCH_COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/wxwidgets-3.0.0_macosx.patch" CONFIGURE_COMMAND ./configure --prefix=${LIBWX_ROOT} -with-opengl --enable-aui --enable-debug_info -with-expat=builtin --with-regex=builtin --enable-utf8 ${LIBWX_ARCHITECTURES} ${LIBWX_BUILDTYPE} - #BINARY_DIR "${PREFIX}" + #BINARY_DIR "${PREFIX}" - BUILD_COMMAND make + BUILD_COMMAND $(MAKE) VERBOSE=1 INSTALL_DIR "${LIBWX_ROOT}" - INSTALL_COMMAND make install + INSTALL_COMMAND make install ) +#SET directories set(wxWidgets_BIN_DIR ${LIBWX_ROOT}/bin) set(wxWidgets_CONFIG_EXECUTABLE ${LIBWX_ROOT}/bin/wx-config) set(wxWidgets_INCLUDE_DIRS ${LIBWX_ROOT}/include) set(wxWidgets_LIBRARY_DIRS ${LIBWX_ROOT}/lib) + ExternalProject_Add_Step( libwx bzr_commit_libwx COMMAND bzr ci -q -m pristine COMMENT "committing pristine libwx files to 'libwx scratch repo'" @@ -101,20 +103,13 @@ ExternalProject_Add_Step( libwx bzr_init_libwx DEPENDEES download ) +###### +# Now is time to search what we have built +###### + ExternalProject_Add_Step( libwx libwx_recursive_message COMMAND cmake . - COMMENT "*** RERUN CMAKE ***" + COMMENT "*** RERUN CMAKE - wxWidgets built, now reissue a cmake to build Kicad" DEPENDEES install ) -#ExternalProject_Add_Step( libwx libwx_recursive_cmake -# COMMAND cmake . -# COMMENT "recurse cmake" -# DEPENDEES libwx_recursive_message -# ) -# -#ExternalProject_Add_Step( libwx libwx_recursive_make -# COMMAND make -# COMMENT "recurse make" -# DEPENDEES libwx_recursive_cmake -# ) diff --git a/patches/wxwidgets-3.0.0_macosx.patch b/patches/wxwidgets-3.0.0_macosx.patch index fdab57f4bf..b11eb8519c 100644 --- a/patches/wxwidgets-3.0.0_macosx.patch +++ b/patches/wxwidgets-3.0.0_macosx.patch @@ -1,6 +1,6 @@ === modified file 'Makefile.in' ---- Makefile.in 2014-01-22 20:34:29 +0000 -+++ Makefile.in 2014-01-22 20:38:15 +0000 +--- Makefile.in 2014-01-26 11:10:36 +0000 ++++ Makefile.in 2014-01-26 11:15:53 +0000 @@ -14601,7 +14601,7 @@ monodll_carbon_frame.o \ monodll_carbon_mdi.o \ @@ -19,6 +19,24 @@ monolib_carbon_popupwin.o \ monolib_carbon_renderer.o \ monolib_carbon_settings.o \ +@@ -14895,7 +14895,7 @@ + coredll_carbon_frame.o \ + coredll_carbon_mdi.o \ + coredll_carbon_metafile.o \ +- coredll_carbon_overlay.o \ ++ coredll_osx_cocoa_overlay.o \ + coredll_carbon_popupwin.o \ + coredll_carbon_renderer.o \ + coredll_carbon_settings.o \ +@@ -15027,7 +15027,7 @@ + corelib_carbon_frame.o \ + corelib_carbon_mdi.o \ + corelib_carbon_metafile.o \ +- corelib_carbon_overlay.o \ ++ corelib_osx_cocoa_overlay.o \ + corelib_carbon_popupwin.o \ + corelib_carbon_renderer.o \ + corelib_carbon_settings.o \ @@ -17774,6 +17774,9 @@ monodll_osx_cocoa_notebook.o: $(srcdir)/src/osx/cocoa/notebook.mm $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/notebook.mm @@ -39,10 +57,45 @@ monolib_osx_cocoa_radiobut.o: $(srcdir)/src/osx/cocoa/radiobut.mm $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/radiobut.mm +@@ -33584,8 +33590,8 @@ + @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@coredll_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(COREDLL_ODEP) + @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp + +-@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@coredll_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(COREDLL_ODEP) +-@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp ++@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@coredll_osx_cocoa_overlay.o: $(srcdir)/src/osx/cocoa/overlay.mm $(COREDLL_ODEP) ++@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/cocoa/overlay.mm + + @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@coredll_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(COREDLL_ODEP) + @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp +@@ -37961,8 +37967,8 @@ + @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@corelib_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(CORELIB_ODEP) + @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp + +-@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@corelib_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(CORELIB_ODEP) +-@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp ++@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@corelib_osx_cocoa_overlay.o: $(srcdir)/src/osx/cocoa/overlay.mm $(CORELIB_ODEP) ++@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/cocoa/overlay.mm + + @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@corelib_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(CORELIB_ODEP) + @COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp + +=== modified file 'include/wx/overlay.h' +--- include/wx/overlay.h 2014-01-26 11:10:36 +0000 ++++ include/wx/overlay.h 2014-01-26 11:10:44 +0000 +@@ -13,7 +13,7 @@ + + #include "wx/defs.h" + +-#if defined(__WXMAC__) && wxOSX_USE_CARBON ++#if defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON + #define wxHAS_NATIVE_OVERLAY 1 + #elif defined(__WXDFB__) + #define wxHAS_NATIVE_OVERLAY 1 === modified file 'include/wx/private/overlay.h' ---- include/wx/private/overlay.h 2014-01-22 20:34:29 +0000 -+++ include/wx/private/overlay.h 2014-01-22 20:39:13 +0000 +--- include/wx/private/overlay.h 2014-01-26 11:10:36 +0000 ++++ include/wx/private/overlay.h 2014-01-26 11:10:44 +0000 @@ -16,7 +16,11 @@ #ifdef wxHAS_NATIVE_OVERLAY @@ -57,9 +110,9 @@ #else === modified file 'src/osx/cocoa/overlay.mm' ---- src/osx/cocoa/overlay.mm 2014-01-22 20:34:29 +0000 -+++ src/osx/cocoa/overlay.mm 2014-01-22 20:40:40 +0000 -@@ -34,6 +35,7 @@ +--- src/osx/cocoa/overlay.mm 2014-01-26 11:10:36 +0000 ++++ src/osx/cocoa/overlay.mm 2014-01-26 11:10:44 +0000 +@@ -34,6 +34,7 @@ #include "wx/private/overlay.h" #ifdef wxHAS_NATIVE_OVERLAY @@ -67,7 +120,7 @@ // ============================================================================ // implementation -@@ -58,48 +60,6 @@ +@@ -58,48 +59,6 @@ void wxOverlayImpl::CreateOverlayWindow() { @@ -116,7 +169,7 @@ } void wxOverlayImpl::Init( wxDC* dc, int x , int y , int width , int height ) -@@ -107,84 +67,50 @@ +@@ -107,84 +66,50 @@ wxASSERT_MSG( !IsOk() , _("You cannot Init an overlay twice") ); m_window = dc->GetWindow();