From a9c46fb196913920f041256a6cb4edda0da0232d Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Wed, 15 Oct 2025 11:32:12 +0000 Subject: [PATCH] add install for makefile git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@339 b9cfdab3-6d41-4d17-bbe4-086880011989 --- GNUmakefile | 16 +++++++++++++++- README.txt | 4 ++++ doc/index.html | 2 +- include/MwOO/Widget/ListBox.h | 2 +- oosrc/widget/listbox.cc | 2 +- resource/icon/error.png | Bin 663 -> 663 bytes resource/icon/info.png | Bin 434 -> 434 bytes resource/icon/news.png | Bin 542 -> 542 bytes resource/icon/note.png | Bin 594 -> 594 bytes resource/icon/question.png | Bin 529 -> 529 bytes resource/icon/warning.png | Bin 498 -> 498 bytes tools/readme.pl | 6 +++++- 12 files changed, 27 insertions(+), 5 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 8f74207..0172f44 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,5 +1,7 @@ # $Id$ +PREFIX = /usr/milsko + ifeq ($(TARGET),) TARGET = $(shell uname -s) endif @@ -153,13 +155,25 @@ OOL_OBJS += oosrc/widget/vulkan.o EXAMPLES += examples/vulkan$(EXEC) endif -.PHONY: all format clean lib oolib examples +.PHONY: all install format clean lib oolib examples all: lib examples lib: src/$(LIB)Mw$(SO) oolib: oosrc/$(LIB)MwOO$(SO) examples: $(EXAMPLES) +install: lib oolib + mkdir -p $(PREFIX)/lib + mkdir -p $(PREFIX)/bin + mkdir -p $(PREFIX)/include + for i in src oosrc; do \ + cp $$i/*.so $(PREFIX)/lib/ ; \ + cp $$i/*.a $(PREFIX)/lib/ ; \ + cp $$i/*.dll $(PREFIX)/bin/ ; \ + done ; true + cp -rf include/Mw $(PREFIX)/include/ + cp -rf include/MwOO $(PREFIX)/include/ + format: clang-format --verbose -i `find oosrc src include examples tools "(" -name "*.c" -or -name "*.h" ")" -and -not -name "stb_*.h"` perltidy -b -bext='/' --paren-tightness=2 `find tools -name "*.pl"` diff --git a/README.txt b/README.txt index 721cb76..c03cc13 100644 --- a/README.txt +++ b/README.txt @@ -88,6 +88,8 @@ D. MinGW-w64/GCC/Clang USE_STB_IMAGE - Use stb_image or not. + PREFIX - Installation destination directory. + Makefile targets @@ -101,4 +103,6 @@ D. MinGW-w64/GCC/Clang all - Builds lib and examples + install - Installs Milsko to PREFIX + -- Nishi (nishi@nishi.boats) diff --git a/doc/index.html b/doc/index.html index d2f8d75..40a9c44 100644 --- a/doc/index.html +++ b/doc/index.html @@ -2393,7 +2393,7 @@
MWDECL void MwListBoxInsertMultiple (
 	MwWidget handle,
 	int index,
-	char* const* text,
+	char** text,
 	int count
 );
diff --git a/include/MwOO/Widget/ListBox.h b/include/MwOO/Widget/ListBox.h index fe0b4fc..66a8e28 100644 --- a/include/MwOO/Widget/ListBox.h +++ b/include/MwOO/Widget/ListBox.h @@ -9,7 +9,7 @@ class ListBox : public MwOO::Base { public: ListBox(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h); void Insert(int index, const char* text); - void InsertMultiple(int index, char* const* text, int count); + void InsertMultiple(int index, char** text, int count); void Delete(int index); const char* Get(int index); void SetBackground(const char* value); diff --git a/oosrc/widget/listbox.cc b/oosrc/widget/listbox.cc index c78979b..d7b0fe9 100644 --- a/oosrc/widget/listbox.cc +++ b/oosrc/widget/listbox.cc @@ -8,7 +8,7 @@ MwOO::ListBox::ListBox(const char* widget_name, MwOO::Base* parent, int x, int y void MwOO::ListBox::Insert(int index, const char* text){ MwListBoxInsert(this->widget, index, text); } -void MwOO::ListBox::InsertMultiple(int index, char* const* text, int count){ +void MwOO::ListBox::InsertMultiple(int index, char** text, int count){ MwListBoxInsertMultiple(this->widget, index, text, count); } void MwOO::ListBox::Delete(int index){ diff --git a/resource/icon/error.png b/resource/icon/error.png index 29f4329e1e992b6d3d3b962be65de498b9b63658..f6ae5d501166351bf634e1694a1032b9dac5e26b 100644 GIT binary patch delta 49 zcmbQvI-PaGbarkztB)ZMCvKc~n^Dft(8}1r%G5&Jz`)ADAbO+qW(FYeboFyt=akR{ E0GwD4fdBvi delta 49 zcmbQvI-PaGban56W|T89urf5aGBwr)G7JnB&;QEA00f?{elF{r5}E*K C^$s@x diff --git a/resource/icon/info.png b/resource/icon/info.png index 3a69fa56adb2a1f79d46ce8cee31b75ac8952103..3c849a86f7d37c0740b17b8c5ab29368e066023d 100644 GIT binary patch delta 49 zcmdnQyoq^2H#@hS)yI&B6E{v`Vw5v9v@$lZGPTe)Ft9Q(h~8+unE?nqUHx3vIVCg! E0EQb5!Tu%S+RcHl#P>^808EMtPIVqOii?b3=d#Wzp$Pz0 C%nf}2 diff --git a/resource/icon/news.png b/resource/icon/news.png index 85462d235b8c8a226df195a922251c04ebc7cc68..4c2f06503a93910cd0d17fb9c51a5ff6365f0471 100644 GIT binary patch delta 49 zcmbQoGLL1#M0RdDtB)ZMCvKdP!6;{FXk~0*Won^qU|?ln5WUfQGXoHKy85}Sb4q9e E0FCnx4gdfE delta 49 zcmbQoGLL1#M0N&2vts?YDH~^GFv=MiSQ(mInVM(=83qPv7N>g{fWXt$&t;ucLK6U8 Cqz%ac diff --git a/resource/icon/note.png b/resource/icon/note.png index b1cb661c881dcf800e9d2bf16a44a9eb4ec325d8..fdb1eca6b42541965e315654d897a636aa4c4a61 100644 GIT binary patch delta 49 zcmcb_a*1WabarkztB)ZMCvKcKjZx0f(8}1r%G5&Jz`)ADAbO+qW(FYeboFyt=akR{ E0I4+(umAu6 delta 49 zcmcb_a*1WabanEB diff --git a/resource/icon/question.png b/resource/icon/question.png index e81aaf6bf11c6ce17ca6e6f8b09aef6aa74d4b04..19c70f8c82ab6479c1e4c5193db206a148624dc4 100644 GIT binary patch delta 49 zcmbQpGLdD%M0RdDtB)ZMCvKb(%_wJRXk~0*Won^qU|?ln5WUfQGXoHKy85}Sb4q9e E0EcD{=Kufz delta 49 zcmbQpGLdD%M0N&2vts?YDH~@*Gs+nlSQ(mInVM(=83qPv7N>g{fWXt$&t;ucLK6U2 C7Y(8S diff --git a/resource/icon/warning.png b/resource/icon/warning.png index 7895894410d158b28e589b787f47863a14aec8bc..a994b7fe8b0d4e492c5ea00f8a81035fcea9f07c 100644 GIT binary patch delta 49 zcmeyw{E2zOM0RdDtB)ZMCvKc!!zgEHXk~0*Won^qU|?ln5WUfQGXoHKy85}Sb4q9e E0Hg{fWXt$&t;ucLK6UY C8V*AM diff --git a/tools/readme.pl b/tools/readme.pl index 76542b7..2a1cc0c 100755 --- a/tools/readme.pl +++ b/tools/readme.pl @@ -126,6 +126,8 @@ c("OPENGL - Build OpenGL widget or not.", 60); l(""); c("USE_STB_IMAGE - Use stb_image or not.", 60); l(""); +c("PREFIX - Installation destination directory.", 60); +l(""); l(""); c("Makefile targets"); @@ -139,8 +141,10 @@ l(""); c("examples - Builds examples", 60); l(""); c("all - Builds lib and examples", 60); - l(""); +c("install - Installs Milsko to PREFIX", 60); +l(""); + l(" -- Nishi (nishi\@nishi.boats)"); close(OUT);