From 3dfe61de4823f78ccade383529706bdcdf9bc097 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 24 Apr 2018 08:07:32 -0500 Subject: [PATCH 01/14] experiment to stub out C++ only GUI --- src/CMakeLists.txt | 58 ++++++++++++++++------------ src/GUI/GUI.cpp | 22 +++++++++++ src/GUI/GUI.hpp | 10 +++++ src/GUI/MainFrame.cpp | 90 +++++++++++++++++++++++++++++++++++++++++++ src/GUI/MainFrame.hpp | 31 +++++++++++++++ src/slic3r.cpp | 6 +++ 6 files changed, 193 insertions(+), 24 deletions(-) create mode 100644 src/GUI/GUI.cpp create mode 100644 src/GUI/GUI.hpp create mode 100644 src/GUI/MainFrame.cpp create mode 100644 src/GUI/MainFrame.hpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fb34b5ae8..0bdf4397a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8) +cmake_minimum_required (VERSION 3.10) project (slic3r) # only on newer GCCs: -ftemplate-backtrace-limit=0 @@ -17,14 +17,17 @@ IF(CMAKE_HOST_APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE") set(CMAKE_EXE_LINKER_FLAGS "-framework IOKit -framework CoreFoundation -lc++") ELSE(CMAKE_HOST_APPLE) - set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++") +# set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -L.") ENDIF(CMAKE_HOST_APPLE) -set(Boost_USE_STATIC_LIBS ON) -set(Boost_USE_STATIC_RUNTIME ON) -set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + +set(Boost_USE_STATIC_LIBS OFF) +set(Boost_USE_STATIC_RUNTIME OFF) +find_package(Threads REQUIRED) + find_package(Boost COMPONENTS system thread filesystem) set(LIBDIR ${CMAKE_CURRENT_SOURCE_DIR}/../xs/src/) +set(GUI_LIBDIR ${CMAKE_CURRENT_SOURCE_DIR}/GUI/) include_directories(${LIBDIR}) include_directories(${LIBDIR}/libslic3r) @@ -53,6 +56,7 @@ add_library(libslic3r STATIC ${LIBDIR}/libslic3r/Fill/FillHoneycomb.cpp ${LIBDIR}/libslic3r/Fill/FillPlanePath.cpp ${LIBDIR}/libslic3r/Fill/FillRectilinear.cpp + ${LIBDIR}/libslic3r/Fill/FillGyroid.cpp ${LIBDIR}/libslic3r/Flow.cpp ${LIBDIR}/libslic3r/GCode.cpp ${LIBDIR}/libslic3r/GCode/CoolingBuffer.cpp @@ -122,29 +126,29 @@ add_library(poly2tri STATIC ) add_executable(slic3r slic3r.cpp) -set_target_properties(slic3r PROPERTIES LINK_SEARCH_START_STATIC 1) -set_target_properties(slic3r PROPERTIES LINK_SEARCH_END_STATIC 1) +#set_target_properties(slic3r PROPERTIES LINK_SEARCH_START_STATIC 1) +#set_target_properties(slic3r PROPERTIES LINK_SEARCH_END_STATIC 1) -add_executable(extrude-tin utils/extrude-tin.cpp) -set_target_properties(extrude-tin PROPERTIES LINK_SEARCH_START_STATIC 1) -set_target_properties(extrude-tin PROPERTIES LINK_SEARCH_END_STATIC 1) +#add_executable(extrude-tin utils/extrude-tin.cpp) +#set_target_properties(extrude-tin PROPERTIES LINK_SEARCH_START_STATIC 1) +#set_target_properties(extrude-tin PROPERTIES LINK_SEARCH_END_STATIC 1) -set(wxWidgets_USE_STATIC) -SET(wxWidgets_USE_LIBS) +set(Boost_USE_STATIC_LIBS OFF) +set(Boost_USE_STATIC_RUNTIME OFF) -set(Boost_USE_STATIC_LIBS ON) -set(Boost_USE_STATIC_RUNTIME ON) -set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") find_library(bsystem_l boost_system) -add_library(bsystem STATIC IMPORTED) +add_library(bsystem SHARED IMPORTED) set_target_properties(bsystem PROPERTIES IMPORTED_LOCATION ${bsystem_l}) find_library(bthread_l boost_thread) -add_library(bthread STATIC IMPORTED) +add_library(bthread SHARED IMPORTED) set_target_properties(bthread PROPERTIES IMPORTED_LOCATION ${bthread_l}) include_directories(${Boost_INCLUDE_DIRS}) -#find_package(wxWidgets) -#disable wx for the time being - we're not building any of the gui yet +set(wxWidgets_USE_STATIC OFF) +set(wxWidgets_USE_UNICODE ON) + +find_package(wxWidgets COMPONENTS base aui core) + IF(CMAKE_HOST_UNIX) #set(Boost_LIBRARIES bsystem bthread bfilesystem) ENDIF(CMAKE_HOST_UNIX) @@ -154,9 +158,15 @@ target_link_libraries (slic3r libslic3r admesh BSpline clipper expat polypartiti IF(wxWidgets_FOUND) MESSAGE("wx found!") INCLUDE("${wxWidgets_USE_FILE}") - add_library(slic3r_gui STATIC ${LIBDIR}/slic3r/GUI/3DScene.cpp ${LIBDIR}/slic3r/GUI/GUI.cpp) + include_directories(${GUI_LIBDIR}) + include_directories(${wxWidgets_INCLUDE}) + + add_library(slic3r_gui STATIC + ${GUI_LIBDIR}/MainFrame.cpp + ${GUI_LIBDIR}/GUI.cpp + ) #only build GUI lib if building with wx - target_link_libraries (slic3r slic3r-gui ${wxWidgets_LIBRARIES}) + target_link_libraries (slic3r slic3r_gui ${wxWidgets_LIBRARIES}) ELSE(wxWidgets_FOUND) # For convenience. When we cannot continue, inform the user MESSAGE("wx not found!") @@ -169,8 +179,8 @@ IF (WIN32) ${LIBDIR}/boost/nowide/iostream.cpp ) - target_link_libraries(slic3r boost-nowide) - target_link_libraries(extrude-tin boost-nowide) + target_link_libraries(slic3r STATIC boost-nowide) +# target_link_libraries(extrude-tin boost-nowide) ENDIF(WIN32) -target_link_libraries (extrude-tin libslic3r admesh BSpline clipper expat polypartition poly2tri ${Boost_LIBRARIES}) +#target_link_libraries (extrude-tin libslic3r admesh BSpline clipper expat polypartition poly2tri ${Boost_LIBRARIES}) diff --git a/src/GUI/GUI.cpp b/src/GUI/GUI.cpp new file mode 100644 index 000000000..3c669754f --- /dev/null +++ b/src/GUI/GUI.cpp @@ -0,0 +1,22 @@ +#include +#ifndef WX_PRECOMP + #include +#endif + +#include "MainFrame.hpp" +#include "GUI.hpp" +//using namespace Slic3r; + + +enum +{ + ID_Hello = 1 +}; +bool Slic3rGUI::OnInit() +{ + MainFrame *frame = new MainFrame( "Slic3r", wxDefaultPosition, wxDefaultSize); + + frame->Show( true ); + return true; +} + diff --git a/src/GUI/GUI.hpp b/src/GUI/GUI.hpp new file mode 100644 index 000000000..d287c9a9b --- /dev/null +++ b/src/GUI/GUI.hpp @@ -0,0 +1,10 @@ +#ifndef GUI_HPP +#define GUI_HPP +#include "MainFrame.hpp" +class Slic3rGUI: public wxApp +{ +public: + virtual bool OnInit(); +}; + +#endif // GUI_HPP diff --git a/src/GUI/MainFrame.cpp b/src/GUI/MainFrame.cpp new file mode 100644 index 000000000..d21d2767e --- /dev/null +++ b/src/GUI/MainFrame.cpp @@ -0,0 +1,90 @@ +#include "MainFrame.hpp" + +wxBEGIN_EVENT_TABLE(MainFrame, wxFrame) +wxEND_EVENT_TABLE() + +MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size) + : wxFrame(NULL, wxID_ANY, title, pos, size), loaded(false), + tabpanel(NULL) +{ + // Set icon to either the .ico if windows or png for everything else. + + this->init_tabpanel(); + this->init_menubar(); + + wxToolTip::SetAutoPop(TOOLTIP_TIMER); + + // STUB: Initialize status bar with text. + /* # initialize status bar + $self->{statusbar} = Slic3r::GUI::ProgressStatusBar->new($self, -1); + $self->{statusbar}->SetStatusText("Version $Slic3r::VERSION - Remember to check for updates at http://slic3r.org/"); + $self->SetStatusBar($self->{statusbar}); */ + + this->loaded = 1; + + // Initialize layout + { + wxSizer* sizer = new wxBoxSizer(wxVERTICAL); + sizer->Add(this->tabpanel, 1, wxEXPAND); + sizer->SetSizeHints(this); + this->Fit(); + this->SetMinSize(wxSize(760, 490)); + this->SetSize(this->GetMinSize()); + wxTheApp->SetTopWindow(this); + this->Show(); + this->Layout(); + } + +} + +/// Private initialization function for the main frame tab panel. +void MainFrame::init_tabpanel() +{ + this->tabpanel = new wxAuiNotebook(this, -1, wxDefaultPosition, wxDefaultSize, wxAUI_NB_TOP); + auto panel = this->tabpanel; + + panel->Bind(wxEVT_AUINOTEBOOK_PAGE_CHANGED, ([=](wxAuiNotebookEvent& e) + { + auto panel = this->tabpanel->GetPage(this->tabpanel->GetSelection()); + if panel->can('OnActivate') panel->OnActivate(); + }), panel->GetId()); + +// this->plater = Slic3r::GUI::Plater(panel, _("Plater")); +// this->controller = Slic3r::GUI::Controller(panel, _("Controller")); + +/* +sub _init_tabpanel { + my ($self) = @_; + + $self->{tabpanel} = my $panel = Wx::AuiNotebook->new($self, -1, wxDefaultPosition, wxDefaultSize, wxAUI_NB_TOP); + EVT_AUINOTEBOOK_PAGE_CHANGED($self, $self->{tabpanel}, sub { + my $panel = $self->{tabpanel}->GetPage($self->{tabpanel}->GetSelection); + $panel->OnActivate if $panel->can('OnActivate'); + if ($self->{tabpanel}->GetSelection > 1) { + $self->{tabpanel}->SetWindowStyle($self->{tabpanel}->GetWindowStyleFlag | wxAUI_NB_CLOSE_ON_ACTIVE_TAB); + } elsif(($Slic3r::GUI::Settings->{_}{show_host} == 0) && ($self->{tabpanel}->GetSelection == 1)){ + $self->{tabpanel}->SetWindowStyle($self->{tabpanel}->GetWindowStyleFlag | wxAUI_NB_CLOSE_ON_ACTIVE_TAB); + } else { + $self->{tabpanel}->SetWindowStyle($self->{tabpanel}->GetWindowStyleFlag & ~wxAUI_NB_CLOSE_ON_ACTIVE_TAB); + } + }); + EVT_AUINOTEBOOK_PAGE_CLOSE($self, $self->{tabpanel}, sub { + my $panel = $self->{tabpanel}->GetPage($self->{tabpanel}->GetSelection); + if ($panel->isa('Slic3r::GUI::PresetEditor')) { + delete $self->{preset_editor_tabs}{$panel->name}; + } + wxTheApp->CallAfter(sub { + $self->{tabpanel}->SetSelection(0); + }); + }); + + $panel->AddPage($self->{plater} = Slic3r::GUI::Plater->new($panel), "Plater"); + $panel->AddPage($self->{controller} = Slic3r::GUI::Controller->new($panel), "Controller") + if ($Slic3r::GUI::Settings->{_}{show_host}); +*/ + +} + +void MainFrame::init_menubar() +{ +} diff --git a/src/GUI/MainFrame.hpp b/src/GUI/MainFrame.hpp new file mode 100644 index 000000000..a1b32feb8 --- /dev/null +++ b/src/GUI/MainFrame.hpp @@ -0,0 +1,31 @@ + +#ifndef MAINFRAME_HPP +#define MAINFRAME_HPP +#include +#ifndef WX_PRECOMP + #include +#endif +#include +#include + +constexpr unsigned int TOOLTIP_TIMER = 32767; + +class MainFrame: public wxFrame +{ +public: + MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size); +private: + wxDECLARE_EVENT_TABLE(); + + void init_menubar(); //< Routine to intialize all top-level menu items. + void init_tabpanel(); //< Routine to initialize all of the tabs. + + bool loaded; //< Main frame itself has finished loading. + // STUB: preset editor tabs storage + // STUB: Statusbar reference + + wxAuiNotebook* tabpanel; + +}; + +#endif // MAINFRAME_HPP diff --git a/src/slic3r.cpp b/src/slic3r.cpp index bf2fb2be7..558d3f810 100644 --- a/src/slic3r.cpp +++ b/src/slic3r.cpp @@ -13,6 +13,7 @@ #include #include #include +#include "GUI/GUI.hpp" using namespace Slic3r; @@ -39,6 +40,11 @@ main(int argc, char **argv) cli_config.apply(config, true); DynamicPrintConfig print_config; + + Slic3rGUI *gui = new Slic3rGUI; + + Slic3rGUI::SetInstance(gui); + wxEntry(argc, argv); // load config files supplied via --load for (const std::string &file : cli_config.load.values) { From a06755c3dd27d345faf308ba79aed53d039ff77b Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 24 Apr 2018 16:05:47 -0500 Subject: [PATCH 02/14] Exercise build environment. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 864d76b3c..4f2b0580b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,7 @@ branches: only: - master - xsgui + - cppgui cache: apt: true directories: From b04d58ecef7d6afe3cd6947b846ca6eb96708277 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 24 Apr 2018 17:21:18 -0500 Subject: [PATCH 03/14] Stubbing out more of the UI. --- src/GUI/Controller.hpp | 15 +++++++++++++++ src/GUI/GUI.cpp | 7 ++++--- src/GUI/GUI.hpp | 7 ++++++- src/GUI/MainFrame.cpp | 24 ++++++++++++++++++++---- src/GUI/MainFrame.hpp | 15 +++++++++++++++ src/GUI/Plater.hpp | 17 +++++++++++++++++ src/GUI/Settings.hpp | 15 +++++++++++++++ src/slic3r.cpp | 6 ++++-- 8 files changed, 96 insertions(+), 10 deletions(-) create mode 100644 src/GUI/Controller.hpp create mode 100644 src/GUI/Plater.hpp create mode 100644 src/GUI/Settings.hpp diff --git a/src/GUI/Controller.hpp b/src/GUI/Controller.hpp new file mode 100644 index 000000000..ef3650886 --- /dev/null +++ b/src/GUI/Controller.hpp @@ -0,0 +1,15 @@ +#ifndef CONTROLLER_UI_HPP +#define CONTROLLER_UI_HPP + +namespace Slic3r { namespace GUI { + +class Controller : public wxPanel { +public: + Controller(wxWindow* parent, const wxString& title) : + wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, title) + { } +}; + +}} // Namespace Slic3r::GUI + +#endif // CONTROLLER_UI_HPP diff --git a/src/GUI/GUI.cpp b/src/GUI/GUI.cpp index 3c669754f..7c249b3b0 100644 --- a/src/GUI/GUI.cpp +++ b/src/GUI/GUI.cpp @@ -5,18 +5,19 @@ #include "MainFrame.hpp" #include "GUI.hpp" -//using namespace Slic3r; +namespace Slic3r { namespace GUI { enum { ID_Hello = 1 }; -bool Slic3rGUI::OnInit() +bool App::OnInit() { - MainFrame *frame = new MainFrame( "Slic3r", wxDefaultPosition, wxDefaultSize); + MainFrame *frame = new MainFrame( "Slic3r", wxDefaultPosition, wxDefaultSize, this->gui_config); frame->Show( true ); return true; } +}} // namespace Slic3r::GUI diff --git a/src/GUI/GUI.hpp b/src/GUI/GUI.hpp index d287c9a9b..1339d1d34 100644 --- a/src/GUI/GUI.hpp +++ b/src/GUI/GUI.hpp @@ -1,10 +1,15 @@ #ifndef GUI_HPP #define GUI_HPP #include "MainFrame.hpp" -class Slic3rGUI: public wxApp + +namespace Slic3r { namespace GUI { +class App: public wxApp { + std::shared_ptr gui_config; // GUI-specific configuration options public: virtual bool OnInit(); + App(std::shared_ptr config) : wxApp(), gui_config(config) {} }; +}} // namespace Slic3r::GUI #endif // GUI_HPP diff --git a/src/GUI/MainFrame.cpp b/src/GUI/MainFrame.cpp index d21d2767e..c3684c27b 100644 --- a/src/GUI/MainFrame.cpp +++ b/src/GUI/MainFrame.cpp @@ -1,11 +1,17 @@ #include "MainFrame.hpp" +#include "Plater.hpp" +#include "Controller.hpp" + +namespace Slic3r { namespace GUI { wxBEGIN_EVENT_TABLE(MainFrame, wxFrame) wxEND_EVENT_TABLE() MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size) + : MainFrame(title, pos, size, nullptr) {} +MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size, std::shared_ptr config) : wxFrame(NULL, wxID_ANY, title, pos, size), loaded(false), - tabpanel(NULL) + tabpanel(nullptr), controller(nullptr), plater(nullptr), gui_config(config) { // Set icon to either the .ico if windows or png for everything else. @@ -46,11 +52,19 @@ void MainFrame::init_tabpanel() panel->Bind(wxEVT_AUINOTEBOOK_PAGE_CHANGED, ([=](wxAuiNotebookEvent& e) { auto panel = this->tabpanel->GetPage(this->tabpanel->GetSelection()); - if panel->can('OnActivate') panel->OnActivate(); + auto tabpanel = this->tabpanel; + // todo: trigger processing for activation(?) + if (tabpanel->GetSelection() > 1) { + tabpanel->SetWindowStyle(tabpanel->GetWindowStyleFlag() | wxAUI_NB_CLOSE_ON_ACTIVE_TAB); + } else if (this->gui_config->show_host == false && tabpanel->GetSelection() == 1) { + tabpanel->SetWindowStyle(tabpanel->GetWindowStyleFlag() | wxAUI_NB_CLOSE_ON_ACTIVE_TAB); + } else { + tabpanel->SetWindowStyle(tabpanel->GetWindowStyleFlag() | ~wxAUI_NB_CLOSE_ON_ACTIVE_TAB); + } }), panel->GetId()); -// this->plater = Slic3r::GUI::Plater(panel, _("Plater")); -// this->controller = Slic3r::GUI::Controller(panel, _("Controller")); + this->plater = new Slic3r::GUI::Plater(panel, _("Plater")); + this->controller = new Slic3r::GUI::Controller(panel, _("Controller")); /* sub _init_tabpanel { @@ -88,3 +102,5 @@ sub _init_tabpanel { void MainFrame::init_menubar() { } + +}} // Namespace Slic3r::GUI diff --git a/src/GUI/MainFrame.hpp b/src/GUI/MainFrame.hpp index a1b32feb8..8631ac78a 100644 --- a/src/GUI/MainFrame.hpp +++ b/src/GUI/MainFrame.hpp @@ -8,12 +8,21 @@ #include #include +#include + +#include "Controller.hpp" +#include "Plater.hpp" +#include "Settings.hpp" + +namespace Slic3r { namespace GUI { + constexpr unsigned int TOOLTIP_TIMER = 32767; class MainFrame: public wxFrame { public: MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size); + MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size, std::shared_ptr gui_config); private: wxDECLARE_EVENT_TABLE(); @@ -25,7 +34,13 @@ private: // STUB: Statusbar reference wxAuiNotebook* tabpanel; + Controller* controller; + Plater* plater; + + + std::shared_ptr gui_config; }; +}} // Namespace Slic3r::GUI #endif // MAINFRAME_HPP diff --git a/src/GUI/Plater.hpp b/src/GUI/Plater.hpp new file mode 100644 index 000000000..bf7aa917a --- /dev/null +++ b/src/GUI/Plater.hpp @@ -0,0 +1,17 @@ +#ifndef PLATER_HPP +#define PLATER_HPP + +namespace Slic3r { namespace GUI { + +class Plater : public wxPanel +{ +public: + Plater(wxWindow* parent, const wxString& title) : + wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, title) + { } + +}; + +} } // Namespace Slic3r::GUI + +#endif // PLATER_HPP diff --git a/src/GUI/Settings.hpp b/src/GUI/Settings.hpp new file mode 100644 index 000000000..07e219406 --- /dev/null +++ b/src/GUI/Settings.hpp @@ -0,0 +1,15 @@ +#ifndef SETTINGS_HPP +#define SETTINGS_HPP +namespace Slic3r { namespace GUI { + +/// Stub class to hold onto GUI-specific settings options. +/// TODO: Incorporate a copy of Slic3r::Config +class Settings { + public: + bool show_host; + Settings(): show_host(false) {} //< Show host/controller tab +}; + +}} //namespace Slic3r::GUI + +#endif // SETTINGS_HPP diff --git a/src/slic3r.cpp b/src/slic3r.cpp index 558d3f810..9dc862400 100644 --- a/src/slic3r.cpp +++ b/src/slic3r.cpp @@ -41,9 +41,11 @@ main(int argc, char **argv) DynamicPrintConfig print_config; - Slic3rGUI *gui = new Slic3rGUI; + std::shared_ptr gui_config = std::make_shared(); - Slic3rGUI::SetInstance(gui); + GUI::App *gui = new GUI::App(gui_config); + + GUI::App::SetInstance(gui); wxEntry(argc, argv); // load config files supplied via --load From 17daf0d908e3993b14bc34fee412191046b7d692 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 24 Apr 2018 17:32:40 -0500 Subject: [PATCH 04/14] Try to get travis to build cppgui instead. --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4f2b0580b..a0f8c92c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,8 @@ install: script: - bash package/linux/travis-setup.sh - perlbrew switch slic3r-perl -- perl ./Build.PL +- cmake src/ +- make -j4 after_success: - eval $(perl -Mlocal::lib=$TRAVIS_BUILD_DIR/local-lib) - LD_LIBRARY_PATH=$WXDIR/lib package/linux/make_archive.sh linux-x64 @@ -37,6 +38,10 @@ addons: - libgtk2.0-0 - libgtk2.0-dev - freeglut3 + - cmake + - wx3.0-headers + - libwxgtk3.0-dev + - wx-common ssh_known_hosts: dl.slic3r.org notifications: irc: From 19bc2eabdcc5c4bee704a0073f5d5e40b68171a6 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 24 Apr 2018 20:17:04 -0500 Subject: [PATCH 05/14] Tab panel initializes. --- src/GUI/MainFrame.cpp | 78 +++++++++++++++++++++------------------- src/GUI/MainFrame.hpp | 4 +++ src/GUI/PresetEditor.hpp | 11 ++++++ src/slic3r.cpp | 2 ++ 4 files changed, 58 insertions(+), 37 deletions(-) create mode 100644 src/GUI/PresetEditor.hpp diff --git a/src/GUI/MainFrame.cpp b/src/GUI/MainFrame.cpp index c3684c27b..8c2575cf8 100644 --- a/src/GUI/MainFrame.cpp +++ b/src/GUI/MainFrame.cpp @@ -1,6 +1,4 @@ #include "MainFrame.hpp" -#include "Plater.hpp" -#include "Controller.hpp" namespace Slic3r { namespace GUI { @@ -11,7 +9,7 @@ MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& si : MainFrame(title, pos, size, nullptr) {} MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& size, std::shared_ptr config) : wxFrame(NULL, wxID_ANY, title, pos, size), loaded(false), - tabpanel(nullptr), controller(nullptr), plater(nullptr), gui_config(config) + tabpanel(nullptr), controller(nullptr), plater(nullptr), gui_config(config), preset_editor_tabs(std::map()) { // Set icon to either the .ico if windows or png for everything else. @@ -40,7 +38,34 @@ MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& si this->Show(); this->Layout(); } - +/* + # declare events + EVT_CLOSE($self, sub { + my (undef, $event) = @_; + + if ($event->CanVeto) { + if (!$self->{plater}->prompt_unsaved_changes) { + $event->Veto; + return; + } + + if ($self->{controller} && $self->{controller}->printing) { + my $confirm = Wx::MessageDialog->new($self, "You are currently printing. Do you want to stop printing and continue anyway?", + 'Unfinished Print', wxICON_QUESTION | wxYES_NO | wxNO_DEFAULT); + if ($confirm->ShowModal == wxID_NO) { + $event->Veto; + return; + } + } + } + + # save window size + wxTheApp->save_window_pos($self, "main_frame"); + + # propagate event + $event->Skip; + }); +*/ } /// Private initialization function for the main frame tab panel. @@ -51,9 +76,8 @@ void MainFrame::init_tabpanel() panel->Bind(wxEVT_AUINOTEBOOK_PAGE_CHANGED, ([=](wxAuiNotebookEvent& e) { - auto panel = this->tabpanel->GetPage(this->tabpanel->GetSelection()); auto tabpanel = this->tabpanel; - // todo: trigger processing for activation(?) + // TODO: trigger processing for activation event if (tabpanel->GetSelection() > 1) { tabpanel->SetWindowStyle(tabpanel->GetWindowStyleFlag() | wxAUI_NB_CLOSE_ON_ACTIVE_TAB); } else if (this->gui_config->show_host == false && tabpanel->GetSelection() == 1) { @@ -63,40 +87,20 @@ void MainFrame::init_tabpanel() } }), panel->GetId()); + panel->Bind(wxEVT_AUINOTEBOOK_PAGE_CLOSE, ([=](wxAuiNotebookEvent& e) + { + if (typeid(panel) == typeid(Slic3r::GUI::PresetEditor)) { + wxDELETE(this->preset_editor_tabs[panel->GetId()]); + } + wxTheApp->CallAfter([=] { this->tabpanel->SetSelection(0); }); + }), panel->GetId()); + this->plater = new Slic3r::GUI::Plater(panel, _("Plater")); this->controller = new Slic3r::GUI::Controller(panel, _("Controller")); - -/* -sub _init_tabpanel { - my ($self) = @_; - - $self->{tabpanel} = my $panel = Wx::AuiNotebook->new($self, -1, wxDefaultPosition, wxDefaultSize, wxAUI_NB_TOP); - EVT_AUINOTEBOOK_PAGE_CHANGED($self, $self->{tabpanel}, sub { - my $panel = $self->{tabpanel}->GetPage($self->{tabpanel}->GetSelection); - $panel->OnActivate if $panel->can('OnActivate'); - if ($self->{tabpanel}->GetSelection > 1) { - $self->{tabpanel}->SetWindowStyle($self->{tabpanel}->GetWindowStyleFlag | wxAUI_NB_CLOSE_ON_ACTIVE_TAB); - } elsif(($Slic3r::GUI::Settings->{_}{show_host} == 0) && ($self->{tabpanel}->GetSelection == 1)){ - $self->{tabpanel}->SetWindowStyle($self->{tabpanel}->GetWindowStyleFlag | wxAUI_NB_CLOSE_ON_ACTIVE_TAB); - } else { - $self->{tabpanel}->SetWindowStyle($self->{tabpanel}->GetWindowStyleFlag & ~wxAUI_NB_CLOSE_ON_ACTIVE_TAB); - } - }); - EVT_AUINOTEBOOK_PAGE_CLOSE($self, $self->{tabpanel}, sub { - my $panel = $self->{tabpanel}->GetPage($self->{tabpanel}->GetSelection); - if ($panel->isa('Slic3r::GUI::PresetEditor')) { - delete $self->{preset_editor_tabs}{$panel->name}; - } - wxTheApp->CallAfter(sub { - $self->{tabpanel}->SetSelection(0); - }); - }); - - $panel->AddPage($self->{plater} = Slic3r::GUI::Plater->new($panel), "Plater"); - $panel->AddPage($self->{controller} = Slic3r::GUI::Controller->new($panel), "Controller") - if ($Slic3r::GUI::Settings->{_}{show_host}); -*/ + panel->AddPage(this->plater, this->plater->GetName()); + if (this->gui_config->show_host) panel->AddPage(this->controller, this->controller->GetName()); + } void MainFrame::init_menubar() diff --git a/src/GUI/MainFrame.hpp b/src/GUI/MainFrame.hpp index 8631ac78a..76a2146eb 100644 --- a/src/GUI/MainFrame.hpp +++ b/src/GUI/MainFrame.hpp @@ -9,9 +9,12 @@ #include #include +#include + #include "Controller.hpp" #include "Plater.hpp" +#include "PresetEditor.hpp" #include "Settings.hpp" namespace Slic3r { namespace GUI { @@ -39,6 +42,7 @@ private: std::shared_ptr gui_config; + std::map preset_editor_tabs; }; diff --git a/src/GUI/PresetEditor.hpp b/src/GUI/PresetEditor.hpp new file mode 100644 index 000000000..8d6359eab --- /dev/null +++ b/src/GUI/PresetEditor.hpp @@ -0,0 +1,11 @@ +#ifndef PRESETEDITOR_HPP +#define PRESETEDITOR_HPP + +namespace Slic3r { namespace GUI { + +class PresetEditor : public wxPanel { + +}; + +}} // namespace Slic3r::GUI +#endif // PRESETEDITOR_HPP diff --git a/src/slic3r.cpp b/src/slic3r.cpp index 9dc862400..82a04a1f1 100644 --- a/src/slic3r.cpp +++ b/src/slic3r.cpp @@ -44,6 +44,8 @@ main(int argc, char **argv) std::shared_ptr gui_config = std::make_shared(); GUI::App *gui = new GUI::App(gui_config); + + gui_config->show_host = true; GUI::App::SetInstance(gui); wxEntry(argc, argv); From 1d4b369e733689c871a0e4f5b509c642151f8ef3 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 24 Apr 2018 20:19:31 -0500 Subject: [PATCH 06/14] Relaxed cmake version. --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0bdf4397a..30ba81484 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.9) project (slic3r) # only on newer GCCs: -ftemplate-backtrace-limit=0 From 7d9079ef62c8c1a347039d3e4a4ab28bb4a888fd Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 24 Apr 2018 20:27:24 -0500 Subject: [PATCH 07/14] set cc to gcc not g++ --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e04403854..dae9f3102 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ install: - export BOOST_DIR=$HOME/boost_1_63_0 - export SLIC3R_STATIC=1 - export CXX=g++-4.9 -- export CC=g++-4.9 +- export CC=gcc-4.9 - source $HOME/perl5/perlbrew/etc/bashrc script: - bash package/linux/travis-setup.sh From 221432d2eadea311d8f4cc22cf17a455308ce28e Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 24 Apr 2018 22:46:26 -0500 Subject: [PATCH 08/14] stub out more menus --- src/GUI/GUI.cpp | 3 +++ src/GUI/GUI.hpp | 15 +++++++++++- src/GUI/MainFrame.cpp | 55 +++++++++++++++++++++++++++++++++++++++++++ src/GUI/MainFrame.hpp | 12 ++++++++++ 4 files changed, 84 insertions(+), 1 deletion(-) diff --git a/src/GUI/GUI.cpp b/src/GUI/GUI.cpp index 7c249b3b0..b2a1e280b 100644 --- a/src/GUI/GUI.cpp +++ b/src/GUI/GUI.cpp @@ -17,6 +17,9 @@ bool App::OnInit() MainFrame *frame = new MainFrame( "Slic3r", wxDefaultPosition, wxDefaultSize, this->gui_config); frame->Show( true ); + + this->SetAppName("Slic3r"); + return true; } diff --git a/src/GUI/GUI.hpp b/src/GUI/GUI.hpp index 1339d1d34..d4ee0461b 100644 --- a/src/GUI/GUI.hpp +++ b/src/GUI/GUI.hpp @@ -3,12 +3,25 @@ #include "MainFrame.hpp" namespace Slic3r { namespace GUI { + +enum class PresetID { + PRINT = 0, + FILAMENT = 1, + PRINTER = 2 +}; + class App: public wxApp { - std::shared_ptr gui_config; // GUI-specific configuration options public: virtual bool OnInit(); App(std::shared_ptr config) : wxApp(), gui_config(config) {} + + void check_version(bool manual) { /* stub */} + +private: + std::shared_ptr gui_config; // GUI-specific configuration options + Notifier* notifier; + }; }} // namespace Slic3r::GUI diff --git a/src/GUI/MainFrame.cpp b/src/GUI/MainFrame.cpp index 8c2575cf8..56afce0dd 100644 --- a/src/GUI/MainFrame.cpp +++ b/src/GUI/MainFrame.cpp @@ -1,4 +1,6 @@ #include "MainFrame.hpp" +#include +#include namespace Slic3r { namespace GUI { @@ -105,6 +107,59 @@ void MainFrame::init_tabpanel() void MainFrame::init_menubar() { + + wxMenu* menuFile = new wxMenu(); + { + } + + wxMenu* menuPlater = new wxMenu(); + { + } + wxMenu* menuObject = new wxMenu(); + { + } + wxMenu* menuSettings = new wxMenu(); + { + } + wxMenu* menuView = new wxMenu(); + { + } + wxMenu* menuWindow = new wxMenu(); + { + } + wxMenu* menuHelp = new wxMenu(); + { + // TODO: Reimplement config wizard + //menuHelp->AppendSeparator(); + append_menu_item(menuHelp, _("Slic3r &Website"), _("Open the Slic3r website in your browser"), [=](wxCommandEvent& e) + { + wxLaunchDefaultBrowser("http://www.slic3r.org"); + }); + append_menu_item(menuHelp, _("Check for &Updates..."), _("Check for new Slic3r versions"), [=](wxCommandEvent& e) + { +// parent->check_version(true); + }); + append_menu_item(menuHelp, _("Slic3r &Manual"), _("Open the Slic3r manual in your browser"), [=](wxCommandEvent& e) + { + wxLaunchDefaultBrowser("http://manual.slic3r.org/"); + }); + append_menu_item(menuHelp, _("&About Slic3r"), _("Show about dialog"), [=](wxCommandEvent& e) + { + }, wxID_ABOUT); + + } + + wxMenuBar* menubar = new wxMenuBar(); + menubar->Append(menuFile, _("&File")); + menubar->Append(menuPlater, _("&Plater")); + menubar->Append(menuObject, _("&Object")); + menubar->Append(menuSettings, _("&Settings")); + menubar->Append(menuView, _("&View")); + menubar->Append(menuWindow, _("&Window")); + menubar->Append(menuHelp, _("&Help")); + + this->SetMenuBar(menubar); + } }} // Namespace Slic3r::GUI diff --git a/src/GUI/MainFrame.hpp b/src/GUI/MainFrame.hpp index 76a2146eb..e4014a27c 100644 --- a/src/GUI/MainFrame.hpp +++ b/src/GUI/MainFrame.hpp @@ -16,9 +16,21 @@ #include "Plater.hpp" #include "PresetEditor.hpp" #include "Settings.hpp" +#include "GUI.hpp" namespace Slic3r { namespace GUI { +template +void append_menu_item(wxMenu* menu, const wxString& name,const wxString& help, T lambda, int id = wxID_ANY, const wxBitmap& icon = wxBitmap(), const wxString& accel = "") { + wxMenuItem* tmp = menu->Append(wxID_ANY, name, help); + wxAcceleratorEntry* a = new wxAcceleratorEntry(); + if (a->FromString(accel)) + tmp->SetAccel(a); // set the accelerator if and only if the accelerator is fine + tmp->SetHelp(help); + + menu->Bind(wxEVT_MENU, lambda, tmp->GetId(), tmp->GetId()); +} + constexpr unsigned int TOOLTIP_TIMER = 32767; class MainFrame: public wxFrame From 7211acc32df098b24365ea8b44b40c5287010865 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 24 Apr 2018 23:00:53 -0500 Subject: [PATCH 09/14] stubbed Notifier class and misc helper function --- src/CMakeLists.txt | 1 + src/GUI/GUI.hpp | 1 + src/GUI/MainFrame.cpp | 3 ++- src/GUI/Notifier.hpp | 15 +++++++++++++++ src/GUI/misc_ui.cpp | 15 +++++++++++++++ src/GUI/misc_ui.hpp | 15 +++++++++++++++ 6 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 src/GUI/Notifier.hpp create mode 100644 src/GUI/misc_ui.cpp create mode 100644 src/GUI/misc_ui.hpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 30ba81484..bd8f28ffb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -164,6 +164,7 @@ IF(wxWidgets_FOUND) add_library(slic3r_gui STATIC ${GUI_LIBDIR}/MainFrame.cpp ${GUI_LIBDIR}/GUI.cpp + ${GUI_LIBDIR}/misc_ui.cpp ) #only build GUI lib if building with wx target_link_libraries (slic3r slic3r_gui ${wxWidgets_LIBRARIES}) diff --git a/src/GUI/GUI.hpp b/src/GUI/GUI.hpp index d4ee0461b..c693e847b 100644 --- a/src/GUI/GUI.hpp +++ b/src/GUI/GUI.hpp @@ -1,6 +1,7 @@ #ifndef GUI_HPP #define GUI_HPP #include "MainFrame.hpp" +#include "Notifier.hpp" namespace Slic3r { namespace GUI { diff --git a/src/GUI/MainFrame.cpp b/src/GUI/MainFrame.cpp index 56afce0dd..547c0757b 100644 --- a/src/GUI/MainFrame.cpp +++ b/src/GUI/MainFrame.cpp @@ -1,4 +1,5 @@ #include "MainFrame.hpp" +#include "misc_ui.hpp" #include #include @@ -137,7 +138,7 @@ void MainFrame::init_menubar() }); append_menu_item(menuHelp, _("Check for &Updates..."), _("Check for new Slic3r versions"), [=](wxCommandEvent& e) { -// parent->check_version(true); + check_version(true); }); append_menu_item(menuHelp, _("Slic3r &Manual"), _("Open the Slic3r manual in your browser"), [=](wxCommandEvent& e) { diff --git a/src/GUI/Notifier.hpp b/src/GUI/Notifier.hpp new file mode 100644 index 000000000..f7a9c0d92 --- /dev/null +++ b/src/GUI/Notifier.hpp @@ -0,0 +1,15 @@ +#ifndef NOTIFIER_HPP +#define NOTIFIER_HPP + +namespace Slic3r { namespace GUI { + +/// Class to perform window manager notifications using Growl and/or DBus XWindow + +class Notifier { +public: + Notifier() { } +}; + +}} // Namespace Slic3r::GUI + +#endif // NOTIFIER_HPP diff --git a/src/GUI/misc_ui.cpp b/src/GUI/misc_ui.cpp new file mode 100644 index 000000000..b509cf097 --- /dev/null +++ b/src/GUI/misc_ui.cpp @@ -0,0 +1,15 @@ +#include "misc_ui.hpp" +namespace Slic3r { namespace GUI { + + +#ifdef SLIC3R_DEV +void check_version(bool manual) { +} +#else +void check_version(bool manual) { +} + +#endif + +}} // namespace Slic3r::GUI + diff --git a/src/GUI/misc_ui.hpp b/src/GUI/misc_ui.hpp new file mode 100644 index 000000000..83ef2646c --- /dev/null +++ b/src/GUI/misc_ui.hpp @@ -0,0 +1,15 @@ +#ifndef MISC_UI_HPP +#define MISC_UI_HPP + +/// Common static (that is, free-standing) functions, not part of an object hierarchy. + +namespace Slic3r { namespace GUI { + +/// Performs a check via the Internet for a new version of Slic3r. +/// If this version of Slic3r was compiled with SLIC3R_DEV, check the development +/// space instead of release. +void check_version(bool manual = false); + +}} // namespace Slic3r::GUI + +#endif // MISC_UI_HPP From 137716b8a36c2c46fd8dd06dc5aa010f81a57623 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 24 Apr 2018 23:52:13 -0500 Subject: [PATCH 10/14] added misc utility functions for the UI, including functions to get user home (for slic3r directory) and path to var. --- src/GUI/GUI.hpp | 5 ++++- src/GUI/MainFrame.cpp | 5 +++++ src/GUI/misc_ui.cpp | 15 +++++++++++++++ src/GUI/misc_ui.hpp | 31 ++++++++++++++++++++++++++++++- 4 files changed, 54 insertions(+), 2 deletions(-) diff --git a/src/GUI/GUI.hpp b/src/GUI/GUI.hpp index c693e847b..e6c89b90f 100644 --- a/src/GUI/GUI.hpp +++ b/src/GUI/GUI.hpp @@ -2,14 +2,17 @@ #define GUI_HPP #include "MainFrame.hpp" #include "Notifier.hpp" +#include namespace Slic3r { namespace GUI { +// Friendly indices for the preset lists. enum class PresetID { PRINT = 0, FILAMENT = 1, PRINTER = 2 }; +using preset_list = std::vector; class App: public wxApp { @@ -22,7 +25,7 @@ public: private: std::shared_ptr gui_config; // GUI-specific configuration options Notifier* notifier; - + std::vector presets { preset_list(), preset_list(), preset_list() }; }; }} // namespace Slic3r::GUI diff --git a/src/GUI/MainFrame.cpp b/src/GUI/MainFrame.cpp index 547c0757b..f006423b1 100644 --- a/src/GUI/MainFrame.cpp +++ b/src/GUI/MainFrame.cpp @@ -15,6 +15,11 @@ MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& si tabpanel(nullptr), controller(nullptr), plater(nullptr), gui_config(config), preset_editor_tabs(std::map()) { // Set icon to either the .ico if windows or png for everything else. + if (the_os == OS::Windows) + this->SetIcon(wxIcon(var("Slic3r.ico"), wxBITMAP_TYPE_ICO)); + else + this->SetIcon(wxIcon(var("Slic3r_128px.png"), wxBITMAP_TYPE_PNG)); + this->init_tabpanel(); this->init_menubar(); diff --git a/src/GUI/misc_ui.cpp b/src/GUI/misc_ui.cpp index b509cf097..278f6e4d7 100644 --- a/src/GUI/misc_ui.cpp +++ b/src/GUI/misc_ui.cpp @@ -11,5 +11,20 @@ void check_version(bool manual) { #endif +const wxString var(const wxString& in) { + wxFileName f(wxStandardPaths::Get().GetExecutablePath()); + wxString appPath(f.GetPath()); + + // replace center string with path to VAR in actual distribution later + return appPath + "/../var/" + in; +} + +/// Returns the path to Slic3r's default user data directory. +const wxString home(const wxString& in) { + if (the_os == OS::Windows) + return wxGetHomeDir() + "/" + in + "/"; + return wxGetHomeDir() + "/." + in + "/"; +} + }} // namespace Slic3r::GUI diff --git a/src/GUI/misc_ui.hpp b/src/GUI/misc_ui.hpp index 83ef2646c..cc92e5a03 100644 --- a/src/GUI/misc_ui.hpp +++ b/src/GUI/misc_ui.hpp @@ -1,15 +1,44 @@ #ifndef MISC_UI_HPP #define MISC_UI_HPP +#include +#ifndef WX_PRECOMP + #include +#endif + +#include +#include + /// Common static (that is, free-standing) functions, not part of an object hierarchy. namespace Slic3r { namespace GUI { +enum class OS { Linux, Mac, Windows } ; +// constants to reduce the proliferation of macros in the rest of the code +#ifdef __WIN32 +constexpr OS the_os = OS::Windows; +#elif __APPLE__ +constexpr OS the_os = OS::Mac; +#elif __linux__ +constexpr OS the_os = OS::Linux; +#endif + +#ifdef SLIC3R_DEV +constexpr bool isDev = true; +#else +constexpr bool isDev = false; +#endif + /// Performs a check via the Internet for a new version of Slic3r. -/// If this version of Slic3r was compiled with SLIC3R_DEV, check the development +/// If this version of Slic3r was compiled with -DSLIC3R_DEV, check the development /// space instead of release. void check_version(bool manual = false); +const wxString var(const wxString& in); + +/// Always returns path to home directory. +const wxString home(const wxString& in = "Slic3r"); + }} // namespace Slic3r::GUI #endif // MISC_UI_HPP From 0682c75541d2b484dd3cfcbc4c9640e3bab192cc Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 24 Apr 2018 23:56:09 -0500 Subject: [PATCH 11/14] point cmake to boost_root --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dae9f3102..7c46228f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,10 @@ install: script: - bash package/linux/travis-setup.sh - perlbrew switch slic3r-perl -- cmake src/ +- cmake -DBOOST_ROOT=$BOOST_DIR src/ +- cd src - make -j4 +- cd .. after_success: - eval $(perl -Mlocal::lib=$TRAVIS_BUILD_DIR/local-lib) - LD_LIBRARY_PATH=$WXDIR/lib package/linux/make_archive.sh linux-x64 From 9eefa5708934a439cd46c2bffa1c5c7a65fb701c Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Wed, 25 Apr 2018 00:10:15 -0500 Subject: [PATCH 12/14] Less magic --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7c46228f4..54876ed57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,9 +11,7 @@ script: - bash package/linux/travis-setup.sh - perlbrew switch slic3r-perl - cmake -DBOOST_ROOT=$BOOST_DIR src/ -- cd src - make -j4 -- cd .. after_success: - eval $(perl -Mlocal::lib=$TRAVIS_BUILD_DIR/local-lib) - LD_LIBRARY_PATH=$WXDIR/lib package/linux/make_archive.sh linux-x64 From cb5456f528a6de03e6382138a15ee32a0899e2a9 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Wed, 25 Apr 2018 00:20:02 -0500 Subject: [PATCH 13/14] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 54876ed57..738368ffc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ script: - bash package/linux/travis-setup.sh - perlbrew switch slic3r-perl - cmake -DBOOST_ROOT=$BOOST_DIR src/ -- make -j4 +- make after_success: - eval $(perl -Mlocal::lib=$TRAVIS_BUILD_DIR/local-lib) - LD_LIBRARY_PATH=$WXDIR/lib package/linux/make_archive.sh linux-x64 From a677002886ee7dea234381c43ef277ca6b61d86e Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Wed, 25 Apr 2018 00:30:47 -0500 Subject: [PATCH 14/14] Update GUI.hpp --- src/GUI/GUI.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GUI/GUI.hpp b/src/GUI/GUI.hpp index e6c89b90f..82d6de746 100644 --- a/src/GUI/GUI.hpp +++ b/src/GUI/GUI.hpp @@ -3,6 +3,7 @@ #include "MainFrame.hpp" #include "Notifier.hpp" #include +#include namespace Slic3r { namespace GUI {