Miscellaneous twiddling
This commit is contained in:
parent
cc644270e4
commit
1532613c08
27
Makefile
27
Makefile
@ -1,7 +1,7 @@
|
|||||||
#Try using clang, if it's installed
|
#Try using clang, if it's installed
|
||||||
ifneq ($(shell command -v clang),)
|
ifneq (command -v clang,)
|
||||||
CC = clang
|
CC = clang
|
||||||
CXX = clang++ -std=c++98
|
CXX = clang++
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CXX += -Iinclude
|
CXX += -Iinclude
|
||||||
@ -31,8 +31,11 @@ TESTS = $(patsubst %.cpp,%,$(TEST_SRC))
|
|||||||
OS ?= $(shell uname -s)
|
OS ?= $(shell uname -s)
|
||||||
|
|
||||||
ifeq ($(OS),Darwin)
|
ifeq ($(OS),Darwin)
|
||||||
CXX += -mmacosx-version-min=10.5
|
CXX += -std=c++98 -mmacosx-version-min=10.5
|
||||||
|
else
|
||||||
|
CXX += -std=c++11
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
LDLIBS += -L/lib
|
LDLIBS += -L/lib
|
||||||
endif
|
endif
|
||||||
@ -64,26 +67,30 @@ $(PROGRAM):
|
|||||||
run:
|
run:
|
||||||
./build/Tyro
|
./build/Tyro
|
||||||
|
|
||||||
release:
|
|
||||||
|
run-grind:
|
||||||
|
valgrind ./build/Tryo
|
||||||
|
|
||||||
|
# Make optimized and striped executable
|
||||||
|
release: all
|
||||||
|
strip -SXx $(PROGRAM)
|
||||||
ifeq ($(OS),Darwin)
|
ifeq ($(OS),Darwin)
|
||||||
make Tyro.app
|
make Tyro.app
|
||||||
endif
|
endif
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
make exe
|
make exe
|
||||||
endif
|
endif
|
||||||
ifeq ($(OS),Linux)
|
|
||||||
make all
|
|
||||||
endif
|
|
||||||
# strip -sxX $(PROGRAM)
|
|
||||||
|
|
||||||
|
|
||||||
|
# Windows resource linking
|
||||||
msw_resource:
|
msw_resource:
|
||||||
$(WX_RES) resources/platform/msw/resource.rc -O coff -o resource.res
|
$(WX_RES) resources/platform/msw/resource.rc -O coff -o resource.res
|
||||||
|
|
||||||
exe: LDLIBS += resource.res
|
exe: LDLIBS += resource.res
|
||||||
exe: msw_resource all
|
exe: msw_resource all
|
||||||
|
|
||||||
|
# OS X application bundle
|
||||||
Tyro.app: all resources/platform/osx/Info.plist
|
Tyro.app: all resources/platform/osx/Info.plist
|
||||||
strip -SXx $(PROGRAM)
|
|
||||||
SetFile -t APPL $(TARGET)
|
SetFile -t APPL $(TARGET)
|
||||||
-mkdir Tyro.app
|
-mkdir Tyro.app
|
||||||
-mkdir Tyro.app/Contents
|
-mkdir Tyro.app/Contents
|
||||||
|
@ -7,8 +7,22 @@
|
|||||||
* License:
|
* License:
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
|
|
||||||
#include "common.h"
|
#include "wx_common.h"
|
||||||
#include "TyroApp.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"
|
#include "widgets/MainFrame.h"
|
||||||
|
|
||||||
IMPLEMENT_APP(TyroApp);
|
IMPLEMENT_APP(TyroApp);
|
||||||
@ -18,7 +32,7 @@ bool TyroApp::OnInit()
|
|||||||
this->SetAppName(APP_NAME);
|
this->SetAppName(APP_NAME);
|
||||||
this->SetVendorName(APP_VENDOR);
|
this->SetVendorName(APP_VENDOR);
|
||||||
|
|
||||||
MainFrame* frame = new MainFrame(0L, "Tyro");
|
MainFrame* frame = new MainFrame(0L, APP_NAME);
|
||||||
|
|
||||||
SetTopWindow(frame);
|
SetTopWindow(frame);
|
||||||
|
|
||||||
|
@ -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
|
|
@ -27,45 +27,42 @@ const wxString TYRO_OPEN_ERROR_CAPTION = "Open Failed";
|
|||||||
typedef map<string, int> StringConstMap;
|
typedef map<string, int> StringConstMap;
|
||||||
|
|
||||||
const wxString TYRO_FILE_OPEN_WILDCARDS =
|
const wxString TYRO_FILE_OPEN_WILDCARDS =
|
||||||
_T("All files (*.*)|*.*|")
|
"All files (*.*)|*|"
|
||||||
_T("Bash (*.sh, *.bsh) |*.sh;*.bsh|")
|
"Bash (*.sh, *.bsh) |*.sh;*.bsh|"
|
||||||
_T("Batch (*.bat, *.cmd, *.nt)|*.bat;*.cmd,*.nt|")
|
"Batch (*.bat, *.cmd, *.nt)|*.bat;*.cmd,*.nt|"
|
||||||
_T("C/C++ (*.c,*.cpp,*.h)| *.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma;*.cp |")
|
"C/C++ (*.c,*.cpp,*.h)| *.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma;*.cp |"
|
||||||
_T("CSS (*.css)|*.css|")
|
"CSS (*.css)|*.css|"
|
||||||
_T("Fortran (*.f9*, *.f, *.for)|*.f9*;*.f,*.for|")
|
"Fortran (*.f9*, *.f, *.for)|*.f9*;*.f,*.for|"
|
||||||
_T("HTML/XHTML (*.html, *.htm)|*.htm*|")
|
"HTML/XHTML (*.html, *.htm)|*.htm*|"
|
||||||
_T("Java (*.java)|*.java|")
|
"Java (*.java)|*.java|"
|
||||||
_T("JavaScript(*.js)|*.js|")
|
"JavaScript(*.js)|*.js|"
|
||||||
_T("Makefile |Makefile;makefile.*;MAKEFILE;configure.*;*.mak|")
|
"Makefile |Makefile;makefile.*;MAKEFILE;configure.*;*.mak|"
|
||||||
_T("Pascal (*.pas, *.inc, *.pp)|*.pas;*.inc;*.pp|")
|
"Pascal (*.pas, *.inc, *.pp)|*.pas;*.inc;*.pp|"
|
||||||
_T("Perl (*.pl, *.cgi)|*.pl;*.pm;*.cgi;*.pod|")
|
"Perl (*.pl, *.cgi)|*.pl;*.pm;*.cgi;*.pod|"
|
||||||
_T("PHP (*.php)|*.php|")
|
"PHP (*.php)|*.php|"
|
||||||
_T("Ruby (*.rb)|*.rb|")
|
"Ruby (*.rb)|*.rb|"
|
||||||
_T("SQL (*.sql)|*.sql|")
|
"SQL (*.sql)|*.sql|"
|
||||||
_T("TCL (*.tcl)|*.tcl|")
|
"TCL (*.tcl)|*.tcl|"
|
||||||
_T("Text (*.txt)|*.txt");
|
"Text (*.txt)|*.txt";
|
||||||
|
|
||||||
const wxString TYRO_FILE_SAVE_WILDCARDS =
|
const wxString TYRO_FILE_SAVE_WILDCARDS =
|
||||||
_T("All files (*.*)|*.*|")
|
"All files (*.*)|*.*|"
|
||||||
_T("Bash (*.sh, *.bsh) |*.sh;*.bsh|")
|
"Bash (*.sh, *.bsh) |*.sh;*.bsh|"
|
||||||
_T("Batch (*.bat, *.cmd, *.nt)|*.bat;*.cmd,*.nt|")
|
"Batch (*.bat, *.cmd, *.nt)|*.bat;*.cmd,*.nt|"
|
||||||
_T("C/C++ (*.c,*.cpp,*.h)| *.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma;*.cp |")
|
"C/C++ (*.c,*.cpp,*.h)| *.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma;*.cp |"
|
||||||
_T("CSS (*.css)|*.css|")
|
"CSS (*.css)|*.css|"
|
||||||
_T("Fortran (*.f9*, *.f, *.for)|*.f9*;*.f,*.for|")
|
"Fortran (*.f9*, *.f, *.for)|*.f9*;*.f,*.for|"
|
||||||
_T("HTML/XHTML (*.html, *.htm)|*.htm*|")
|
"HTML/XHTML (*.html, *.htm)|*.htm*|"
|
||||||
_T("Java (*.java)|*.java|")
|
"Java (*.java)|*.java|"
|
||||||
_T("JavaScript(*.js)|*.js|")
|
"JavaScript(*.js)|*.js|"
|
||||||
_T("Makefile |Makefile;makefile.*;MAKEFILE;configure.*;*.mak|")
|
"Makefile |Makefile;makefile.*;MAKEFILE;configure.*;*.mak|"
|
||||||
_T("Pascal (*.pas, *.inc, *.pp)|*.pas;*.inc;*.pp|")
|
"Pascal (*.pas, *.inc, *.pp)|*.pas;*.inc;*.pp|"
|
||||||
_T("Perl (*.pl, *.cgi)|*.pl;*.pm;*.cgi;*.pod|")
|
"Perl (*.pl, *.cgi)|*.pl;*.pm;*.cgi;*.pod|"
|
||||||
_T("PHP (*.php)|*.php|")
|
"PHP (*.php)|*.php|"
|
||||||
_T("Ruby (*.rb)|*.rb|")
|
"Ruby (*.rb)|*.rb|"
|
||||||
_T("SQL (*.sql)|*.sql|")
|
"SQL (*.sql)|*.sql|"
|
||||||
_T("TCL (*.tcl)|*.tcl|")
|
"TCL (*.tcl)|*.tcl|"
|
||||||
_T("Text (*.txt)|*.txt");
|
"Text (*.txt)|*.txt";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* DEFINITIONS_H */
|
#endif /* DEFINITIONS_H */
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#define TYROMAIN_H
|
#define TYROMAIN_H
|
||||||
|
|
||||||
#include "../wx_common.h"
|
#include "../wx_common.h"
|
||||||
#include "../TyroApp.h"
|
|
||||||
|
|
||||||
#include <wx/cmdline.h>
|
#include <wx/cmdline.h>
|
||||||
#include <wx/config.h>
|
#include <wx/config.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user