Add menu images for Windows, update Windows readme

This commit is contained in:
Tim Warren 2015-04-28 16:14:04 -04:00
parent 6c17981afe
commit 4d81c04151
4 changed files with 47 additions and 2 deletions

View File

@ -46,6 +46,15 @@ Build the app:
See the guide for building on Windows: [Windows-Build](./Windows-Build.md)
## Make commands
Please note that make commands are chainable. For a typical programming loop, `make clean dev run` is very useful.
* all - Make a release binary in the build folder
* clean - Remove intermediate build files
* dev - Make a development binary in the build folder
* run - Run the current binary in the build folder
* release - Make a release binary, with the appropriate resources compiled in. Makes an app bundle on OS X, and adds the icon to the program on Windows.

View File

@ -5,9 +5,23 @@ In order to keep a consistent build system, Tyro is build with MinGW and Msys. T
## Build Environment Setup:
1. Download MinGW installer
2. Install MinGW & MSyS
2. Install MinGW & MSyS (at least the following packages)
* mingw-developer-toolkit
* mingw32-base
* mingw32-gcc-g++
* msys-base
3. Add `{MinGW Path}\bin` and `{MinGW Path}\msys\1.0\bin` to the system Path environment variable
4. Get the latest wxWidgets 3.0 installer for Windows, and install
5. Open the Msys prompt at `{MinGW Path}\msys\1.0\msys.bat`. You'll probably want a shortcut to this, as it is what will be used for compiling everything from here on.
6. Install Git
## Build SFTP Dependencies
## Build SFTP Dependencies
1. Run `git clone https://github.com/timw4mail/Tyro-depends.git` in the folder of your choice.
2. Run `sh ./buildssh2.sh` to build the dependencies.
## Build Tyro
In the source folder, run `make dev run` to build the develop version and run it immediately

View File

@ -5,6 +5,7 @@
#include "wx_common.h"
#include <wx/app.h>
#include <wx/config.h>
#include <wx/debug.h>
class TyroApp : public wxApp
@ -16,6 +17,8 @@ public:
private:
};
wxConfigBase *Config;
//**************************************************************
#include "widgets/MainFrame.h"
@ -32,6 +35,7 @@ bool TyroApp::OnInit()
this->SetAppName(APP_NAME);
this->SetVendorName(APP_VENDOR);
Config = wxConfigBase::Get();
MainFrame* frame = new MainFrame(0L, APP_NAME);
SetTopWindow(frame);
@ -50,5 +54,8 @@ bool TyroApp::OnInit()
*/
int TyroApp::OnExit()
{
// Deallocate config object
delete wxConfigBase::Set((wxConfigBase *) NULL);
return close(true);
}

View File

@ -157,6 +157,21 @@ void MainFrame::SetupMenu()
viewMenu->AppendCheckItem(myID_VIEW_WHITESPACE, "Show Invisible Characters\tCtrl+Shift+I", "Toggle visibility of white space characters");
helpMenu->Append(wxID_ABOUT, "&About...\tF1", "Show info about this application");
// Setup Menu Images
#ifndef __WXMAC__
fileMenu->FindChildItem(wxID_NEW)->SetBitmap(wxArtProvider::GetBitmap(wxART_NEW, wxART_MENU));
fileMenu->FindChildItem(wxID_OPEN)->SetBitmap(wxArtProvider::GetBitmap(wxART_FILE_OPEN, wxART_MENU));
fileMenu->FindChildItem(wxID_SAVE)->SetBitmap(wxArtProvider::GetBitmap(wxART_FILE_SAVE, wxART_MENU));
fileMenu->FindChildItem(wxID_SAVEAS)->SetBitmap(wxArtProvider::GetBitmap(wxART_FILE_SAVE_AS, wxART_MENU));
fileMenu->FindChildItem(wxID_EXIT)->SetBitmap(wxArtProvider::GetBitmap(wxART_QUIT, wxART_MENU));
editMenu->FindChildItem(wxID_UNDO)->SetBitmap(wxArtProvider::GetBitmap(wxART_UNDO, wxART_MENU));
editMenu->FindChildItem(wxID_REDO)->SetBitmap(wxArtProvider::GetBitmap(wxART_REDO, wxART_MENU));
editMenu->FindChildItem(wxID_CUT)->SetBitmap(wxArtProvider::GetBitmap(wxART_CUT, wxART_MENU));
editMenu->FindChildItem(wxID_COPY)->SetBitmap(wxArtProvider::GetBitmap(wxART_COPY, wxART_MENU));
editMenu->FindChildItem(wxID_PASTE)->SetBitmap(wxArtProvider::GetBitmap(wxART_PASTE, wxART_MENU));
#endif
// Add the menus to the menubar
this->mbar->Append(fileMenu, "&File");