Add icon to windows binary
This commit is contained in:
parent
6dec55b0d2
commit
f9d677516a
43
Makefile
43
Makefile
@ -10,22 +10,23 @@ PROGRAM_SRC = $(wildcard src/*.cpp src/widgets/*.cpp)
|
|||||||
PROGRAM = build/Tyro
|
PROGRAM = build/Tyro
|
||||||
PROGRAM_OBJECTS = $(patsubst %.cpp,%.o, $(PROGRAM_SRC))
|
PROGRAM_OBJECTS = $(patsubst %.cpp,%.o, $(PROGRAM_SRC))
|
||||||
|
|
||||||
BASE_FLAGS = -DSCI_LEXER
|
WX_LDLIBS = $(shell wx-config --libs base core aui stc adv) -lssh2
|
||||||
|
WX_CXXFLAGS = $(shell wx-config --cxxflags)
|
||||||
|
WX_RES = $(shell wx-config --rescomp)
|
||||||
|
|
||||||
|
LDLIBS = $(TARGET)
|
||||||
|
|
||||||
LDLIBS = $(TARGET) $(shell wx-config --libs base core aui stc adv) -lssh2
|
|
||||||
WX_CXXFLAGS = $(shell wx-config --cxxflags) $(BASE_FLAGS)
|
|
||||||
DEV_CXXFLAGS = -g -Wall -Wextra
|
DEV_CXXFLAGS = -g -Wall -Wextra
|
||||||
CXXFLAGS = -Os
|
CXXFLAGS = -Os -s
|
||||||
|
|
||||||
TEST_SRC = $(wildcard tests/*.cpp)
|
TEST_SRC = $(wildcard tests/*.cpp)
|
||||||
TESTS = $(patsubst %.cpp,%,$(TEST_SRC))
|
TESTS = $(patsubst %.cpp,%,$(TEST_SRC))
|
||||||
|
|
||||||
UNAME = $(shell uname -s)
|
OS ?= $(shell uname -s)
|
||||||
|
|
||||||
# Add the /lib search directory for MSyS on Windows
|
ifeq ($(OS),Windows_NT)
|
||||||
ifdef OS
|
|
||||||
ifeq($(OS),Windows_NT)
|
|
||||||
LDLIBS += -L/lib
|
LDLIBS += -L/lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: build json_wrapper $(TARGET) $(PROGRAM)
|
all: build json_wrapper $(TARGET) $(PROGRAM)
|
||||||
|
|
||||||
@ -41,7 +42,6 @@ json_wrapper_build:
|
|||||||
build:
|
build:
|
||||||
@mkdir -p build
|
@mkdir -p build
|
||||||
|
|
||||||
#$(TARGET): CXXFLAGS +=
|
|
||||||
$(TARGET): $(OBJECTS)
|
$(TARGET): $(OBJECTS)
|
||||||
ar rcs $@ $(OBJECTS)
|
ar rcs $@ $(OBJECTS)
|
||||||
ranlib $@
|
ranlib $@
|
||||||
@ -49,19 +49,32 @@ $(TARGET): $(OBJECTS)
|
|||||||
|
|
||||||
$(PROGRAM): CXXFLAGS += $(WX_CXXFLAGS) $(TARGET)
|
$(PROGRAM): CXXFLAGS += $(WX_CXXFLAGS) $(TARGET)
|
||||||
$(PROGRAM):
|
$(PROGRAM):
|
||||||
$(CXX) $(WX_CXXFLAGS) $(PROGRAM_SRC) $(LDLIBS) -o $(PROGRAM)
|
$(CXX) $(WX_CXXFLAGS) $(PROGRAM_SRC) $(LDLIBS) $(WX_LDLIBS) -o $(PROGRAM)
|
||||||
|
|
||||||
|
|
||||||
run:
|
run:
|
||||||
./build/Tyro
|
./build/Tyro
|
||||||
|
|
||||||
release: all
|
release:
|
||||||
ifeq ($(UNAME),Darwin)
|
ifeq ($(OS),Darwin)
|
||||||
make Tyro.app
|
make Tyro.app
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
make exe
|
||||||
|
endif
|
||||||
|
ifeq ($(OS),Linux)
|
||||||
|
make all
|
||||||
|
endif
|
||||||
|
# strip -sxX $(PROGRAM)
|
||||||
|
|
||||||
|
msw_resource:
|
||||||
|
$(WX_RES) resources/platform/msw/resource.rc -O coff -o resource.res
|
||||||
|
|
||||||
|
exe: LDLIBS += resource.res
|
||||||
|
exe: msw_resource all
|
||||||
|
|
||||||
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
|
||||||
@ -79,9 +92,11 @@ tests: $(TESTS)
|
|||||||
sh ./tests/runtests.sh
|
sh ./tests/runtests.sh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
rm -f *.res
|
||||||
rm -f config/json2c
|
rm -f config/json2c
|
||||||
|
rm -f config/json2c.exe
|
||||||
rm -f config/*_json.h
|
rm -f config/*_json.h
|
||||||
rm -f *.o
|
rm -rf *.o
|
||||||
rm -rf Tyro.app
|
rm -rf Tyro.app
|
||||||
rm -rf build $(OBJECTS) $(PROGRAM) $(TARGET) $(TESTS)
|
rm -rf build $(OBJECTS) $(PROGRAM) $(TARGET) $(TESTS)
|
||||||
find . -name "*.gc*" -exec rm {} \;
|
find . -name "*.gc*" -exec rm {} \;
|
||||||
|
1
resources/platform/msw/resource.rc
Normal file
1
resources/platform/msw/resource.rc
Normal file
@ -0,0 +1 @@
|
|||||||
|
APP_ICON ICON "tyro.ico"
|
@ -33,8 +33,8 @@ private:
|
|||||||
TyroConfig *config;
|
TyroConfig *config;
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
MARGIN_LINE_NUMBERS,
|
MARGIN_FOLD,
|
||||||
MARGIN_FOLD
|
MARGIN_LINE_NUMBERS
|
||||||
};
|
};
|
||||||
void BindEvents();
|
void BindEvents();
|
||||||
void OnMarginClick(wxStyledTextEvent &event);
|
void OnMarginClick(wxStyledTextEvent &event);
|
||||||
|
@ -61,7 +61,7 @@ void MainFrame::SetupToolbar()
|
|||||||
wxBitmap new_file_icon = wxArtProvider::GetBitmap(wxART_NEW);
|
wxBitmap new_file_icon = wxArtProvider::GetBitmap(wxART_NEW);
|
||||||
wxBitmap open_file_icon = wxArtProvider::GetBitmap(wxART_FILE_OPEN);
|
wxBitmap open_file_icon = wxArtProvider::GetBitmap(wxART_FILE_OPEN);
|
||||||
wxBitmap save_file_icon = wxArtProvider::GetBitmap(wxART_FILE_SAVE);
|
wxBitmap save_file_icon = wxArtProvider::GetBitmap(wxART_FILE_SAVE);
|
||||||
wxBitmap close_file_icon = wxArtProvider::GetBitmap(wxART_FILE_CLOSE);
|
wxBitmap close_file_icon = wxArtProvider::GetBitmap(wxART_CLOSE);
|
||||||
wxBitmap copy_icon = wxArtProvider::GetBitmap(wxART_COPY);
|
wxBitmap copy_icon = wxArtProvider::GetBitmap(wxART_COPY);
|
||||||
wxBitmap cut_icon = wxArtProvider::GetBitmap(wxART_CUT);
|
wxBitmap cut_icon = wxArtProvider::GetBitmap(wxART_CUT);
|
||||||
wxBitmap paste_icon = wxArtProvider::GetBitmap(wxART_PASTE);
|
wxBitmap paste_icon = wxArtProvider::GetBitmap(wxART_PASTE);
|
||||||
|
Loading…
Reference in New Issue
Block a user