// Start of wxWidgets "Hello World" Program
#include<wx/wx.h>classMyApp:publicwxApp{public:boolOnInit()override;};wxIMPLEMENT_APP(MyApp);classMyFrame:publicwxFrame{public:MyFrame();private:voidOnHello(wxCommandEvent&event);voidOnExit(wxCommandEvent&event);voidOnAbout(wxCommandEvent&event);};enum{ID_Hello=1};boolMyApp::OnInit(){MyFrame*frame=newMyFrame();frame->Show(true);returntrue;}MyFrame::MyFrame():wxFrame(nullptr,wxID_ANY,"Hello World"){wxMenu*menuFile=newwxMenu;menuFile->Append(ID_Hello,"&Hello...\tCtrl-H","Help string shown in status bar for this menu item");menuFile->AppendSeparator();menuFile->Append(wxID_EXIT);wxMenu*menuHelp=newwxMenu;menuHelp->Append(wxID_ABOUT);wxMenuBar*menuBar=newwxMenuBar;menuBar->Append(menuFile,"&File");menuBar->Append(menuHelp,"&Help");SetMenuBar(menuBar);CreateStatusBar();SetStatusText("Welcome to wxWidgets!");Bind(wxEVT_MENU,&MyFrame::OnHello,this,ID_Hello);Bind(wxEVT_MENU,&MyFrame::OnAbout,this,wxID_ABOUT);Bind(wxEVT_MENU,&MyFrame::OnExit,this,wxID_EXIT);}voidMyFrame::OnExit(wxCommandEvent&event){Close(true);}voidMyFrame::OnAbout(wxCommandEvent&event){wxMessageBox("This is a wxWidgets Hello World example","About Hello World",wxOK|wxICON_INFORMATION);}voidMyFrame::OnHello(wxCommandEvent&event){wxLogMessage("Hello world from wxWidgets!");}
@echo off
rem Please set the build type to desired one, Debug or ReleasesetBUILD_TYPE=Debug
rem Default for VS2022, using "Visual Studio 15 2017 Win64" if your generator is VS2017setNMAKE_GENERATOR="Visual Studio 16 2019"setSOURCE_DIR=%~dp0/src
setINSTALL_DIR=%~dp0/src_output
setTARGET_DIR=%INSTALL_DIR%/obj
call cmake --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:STRING=%INSTALL_DIR% -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -S%SOURCE_DIR% -B%TARGET_DIR% -G %NMAKE_GENERATOR% -T host=x64 -A x64
call cmake --build %TARGET_DIR% --config %BUILD_TYPE% --target ALL_BUILD -j 6 --
@REM call cmake --open %TARGET_DIR%
@echo off
setBUILD_TYPE=Debug
setPROJECT_NAME=PCBRouter
setINSTALL_DIR=%~dp0/src_output
setWXWIDGETS_DIR=%~dp0\3rdparty\wxWidgets
rem temporarily add wxWidgets LIBS to PATHsetPATH=%WXWIDGETS_DIR%\lib\vc_x64_dll;%PATH%"%INSTALL_DIR%/bin/%BUILD_TYPE%/%PROJECT_NAME%.exe"