Miscellaneous twiddling

This commit is contained in:
Tim Warren 2015-04-22 10:09:43 -04:00
parent cc644270e4
commit 1532613c08
5 changed files with 68 additions and 78 deletions

View File

@ -1,7 +1,7 @@
#Try using clang, if it's installed
ifneq ($(shell command -v clang),)
ifneq (command -v clang,)
CC = clang
CXX = clang++ -std=c++98
CXX = clang++
endif
CXX += -Iinclude
@ -31,8 +31,11 @@ TESTS = $(patsubst %.cpp,%,$(TEST_SRC))
OS ?= $(shell uname -s)
ifeq ($(OS),Darwin)
CXX += -mmacosx-version-min=10.5
CXX += -std=c++98 -mmacosx-version-min=10.5
else
CXX += -std=c++11
endif
ifeq ($(OS),Windows_NT)
LDLIBS += -L/lib
endif
@ -64,26 +67,30 @@ $(PROGRAM):
run:
./build/Tyro
release:
run-grind:
valgrind ./build/Tryo
# Make optimized and striped executable
release: all
strip -SXx $(PROGRAM)
ifeq ($(OS),Darwin)
make Tyro.app
endif
ifeq ($(OS),Windows_NT)
make exe
endif
ifeq ($(OS),Linux)
make all
endif
# strip -sxX $(PROGRAM)
# Windows resource linking
msw_resource:
$(WX_RES) resources/platform/msw/resource.rc -O coff -o resource.res
exe: LDLIBS += resource.res
exe: msw_resource all
# OS X application bundle
Tyro.app: all resources/platform/osx/Info.plist
strip -SXx $(PROGRAM)
SetFile -t APPL $(TARGET)
-mkdir Tyro.app
-mkdir Tyro.app/Contents

View File

@ -7,8 +7,22 @@
* License:
**************************************************************/
#include "common.h"
#include "TyroApp.h"
#include "wx_common.h"
#include <wx/app.h>
#include <wx/debug.h>
class TyroApp : public wxApp
{
friend class MainFrame;
public:
virtual bool OnInit();
virtual int OnExit();
private:
};
//**************************************************************
#include "widgets/MainFrame.h"
IMPLEMENT_APP(TyroApp);
@ -18,7 +32,7 @@ bool TyroApp::OnInit()
this->SetAppName(APP_NAME);
this->SetVendorName(APP_VENDOR);
MainFrame* frame = new MainFrame(0L, "Tyro");
MainFrame* frame = new MainFrame(0L, APP_NAME);
SetTopWindow(frame);

View File

@ -1,27 +0,0 @@
/***************************************************************
* Name: TyroApp.h
* Purpose: Defines Application Class
* Author: Timothy J Warren (tim@timshomepage.net)
* Created: 2015-03-30
* Copyright: Timothy J Warren (https://timshomepage.net)
* License:
**************************************************************/
#ifndef TYROAPP_H
#define TYROAPP_H
#include "wx_common.h"
#include <wx/app.h>
#include <wx/debug.h>
class TyroApp : public wxApp
{
friend class MainFrame;
public:
virtual bool OnInit();
virtual int OnExit();
private:
};
#endif // TYROAPP_H

View File

@ -27,45 +27,42 @@ const wxString TYRO_OPEN_ERROR_CAPTION = "Open Failed";
typedef map<string, int> StringConstMap;
const wxString TYRO_FILE_OPEN_WILDCARDS =
_T("All files (*.*)|*.*|")
_T("Bash (*.sh, *.bsh) |*.sh;*.bsh|")
_T("Batch (*.bat, *.cmd, *.nt)|*.bat;*.cmd,*.nt|")
_T("C/C++ (*.c,*.cpp,*.h)| *.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma;*.cp |")
_T("CSS (*.css)|*.css|")
_T("Fortran (*.f9*, *.f, *.for)|*.f9*;*.f,*.for|")
_T("HTML/XHTML (*.html, *.htm)|*.htm*|")
_T("Java (*.java)|*.java|")
_T("JavaScript(*.js)|*.js|")
_T("Makefile |Makefile;makefile.*;MAKEFILE;configure.*;*.mak|")
_T("Pascal (*.pas, *.inc, *.pp)|*.pas;*.inc;*.pp|")
_T("Perl (*.pl, *.cgi)|*.pl;*.pm;*.cgi;*.pod|")
_T("PHP (*.php)|*.php|")
_T("Ruby (*.rb)|*.rb|")
_T("SQL (*.sql)|*.sql|")
_T("TCL (*.tcl)|*.tcl|")
_T("Text (*.txt)|*.txt");
"All files (*.*)|*|"
"Bash (*.sh, *.bsh) |*.sh;*.bsh|"
"Batch (*.bat, *.cmd, *.nt)|*.bat;*.cmd,*.nt|"
"C/C++ (*.c,*.cpp,*.h)| *.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma;*.cp |"
"CSS (*.css)|*.css|"
"Fortran (*.f9*, *.f, *.for)|*.f9*;*.f,*.for|"
"HTML/XHTML (*.html, *.htm)|*.htm*|"
"Java (*.java)|*.java|"
"JavaScript(*.js)|*.js|"
"Makefile |Makefile;makefile.*;MAKEFILE;configure.*;*.mak|"
"Pascal (*.pas, *.inc, *.pp)|*.pas;*.inc;*.pp|"
"Perl (*.pl, *.cgi)|*.pl;*.pm;*.cgi;*.pod|"
"PHP (*.php)|*.php|"
"Ruby (*.rb)|*.rb|"
"SQL (*.sql)|*.sql|"
"TCL (*.tcl)|*.tcl|"
"Text (*.txt)|*.txt";
const wxString TYRO_FILE_SAVE_WILDCARDS =
_T("All files (*.*)|*.*|")
_T("Bash (*.sh, *.bsh) |*.sh;*.bsh|")
_T("Batch (*.bat, *.cmd, *.nt)|*.bat;*.cmd,*.nt|")
_T("C/C++ (*.c,*.cpp,*.h)| *.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma;*.cp |")
_T("CSS (*.css)|*.css|")
_T("Fortran (*.f9*, *.f, *.for)|*.f9*;*.f,*.for|")
_T("HTML/XHTML (*.html, *.htm)|*.htm*|")
_T("Java (*.java)|*.java|")
_T("JavaScript(*.js)|*.js|")
_T("Makefile |Makefile;makefile.*;MAKEFILE;configure.*;*.mak|")
_T("Pascal (*.pas, *.inc, *.pp)|*.pas;*.inc;*.pp|")
_T("Perl (*.pl, *.cgi)|*.pl;*.pm;*.cgi;*.pod|")
_T("PHP (*.php)|*.php|")
_T("Ruby (*.rb)|*.rb|")
_T("SQL (*.sql)|*.sql|")
_T("TCL (*.tcl)|*.tcl|")
_T("Text (*.txt)|*.txt");
"All files (*.*)|*.*|"
"Bash (*.sh, *.bsh) |*.sh;*.bsh|"
"Batch (*.bat, *.cmd, *.nt)|*.bat;*.cmd,*.nt|"
"C/C++ (*.c,*.cpp,*.h)| *.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma;*.cp |"
"CSS (*.css)|*.css|"
"Fortran (*.f9*, *.f, *.for)|*.f9*;*.f,*.for|"
"HTML/XHTML (*.html, *.htm)|*.htm*|"
"Java (*.java)|*.java|"
"JavaScript(*.js)|*.js|"
"Makefile |Makefile;makefile.*;MAKEFILE;configure.*;*.mak|"
"Pascal (*.pas, *.inc, *.pp)|*.pas;*.inc;*.pp|"
"Perl (*.pl, *.cgi)|*.pl;*.pm;*.cgi;*.pod|"
"PHP (*.php)|*.php|"
"Ruby (*.rb)|*.rb|"
"SQL (*.sql)|*.sql|"
"TCL (*.tcl)|*.tcl|"
"Text (*.txt)|*.txt";
#endif /* DEFINITIONS_H */

View File

@ -6,7 +6,6 @@
#define TYROMAIN_H
#include "../wx_common.h"
#include "../TyroApp.h"
#include <wx/cmdline.h>
#include <wx/config.h>