From ef0b23ea7dba56647ceffa0b561d971f7f963540 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 22 Mar 2012 22:41:11 +0000 Subject: Prep for NxWidgets 1.0 release git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4506 42af7a65-404d-4744-a932-0658087f49c3 --- NxWidgets/ChangeLog.txt | 5 + NxWidgets/README.txt | 51 +++++++ NxWidgets/ReleaseNotes.txt | 9 ++ NxWidgets/UnitTests/CButton/Makefile | 4 +- NxWidgets/UnitTests/CButton/cbutton-pushed.png | Bin 0 -> 22223 bytes NxWidgets/UnitTests/CButton/cbutton-released.png | Bin 0 -> 19844 bytes NxWidgets/UnitTests/CButton/cbuttontest.hxx | 2 +- NxWidgets/UnitTests/CButtonArray/Makefile | 4 +- NxWidgets/UnitTests/CButtonArray/cbuttonarray.png | Bin 0 -> 35615 bytes .../UnitTests/CButtonArray/cbuttonarraytest.hxx | 2 +- NxWidgets/UnitTests/CCheckBox/Makefile | 4 +- NxWidgets/UnitTests/CCheckBox/ccheckbox.png | Bin 0 -> 20124 bytes NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx | 2 +- NxWidgets/UnitTests/CGlyphButton/Makefile | 4 +- .../UnitTests/CGlyphButton/cglyphbuttontest.hxx | 2 +- NxWidgets/UnitTests/CImage/Makefile | 4 +- NxWidgets/UnitTests/CImage/cimagetest.hxx | 2 +- NxWidgets/UnitTests/CKeypad/Makefile | 4 +- NxWidgets/UnitTests/CKeypad/ckeypadtest.hxx | 2 +- NxWidgets/UnitTests/CLabel/Makefile | 4 +- NxWidgets/UnitTests/CLabel/clabel.png | Bin 0 -> 18204 bytes NxWidgets/UnitTests/CLabel/clabeltest.hxx | 2 +- NxWidgets/UnitTests/CLatchButton/Makefile | 4 +- .../UnitTests/CLatchButton/clatchbuttontest.hxx | 2 +- NxWidgets/UnitTests/CLatchButtonArray/Makefile | 4 +- .../CLatchButtonArray/clatchbuttonarraytest.hxx | 2 +- NxWidgets/UnitTests/CListBox/Makefile | 4 +- NxWidgets/UnitTests/CListBox/clistboxtest.hxx | 2 +- NxWidgets/UnitTests/CProgressBar/Makefile | 4 +- NxWidgets/UnitTests/CProgressBar/cprogressbar.png | Bin 0 -> 20469 bytes .../UnitTests/CProgressBar/cprogressbartest.hxx | 2 +- NxWidgets/UnitTests/CRadioButton/Makefile | 4 +- NxWidgets/UnitTests/CRadioButton/cradiobutton.png | Bin 0 -> 32930 bytes .../UnitTests/CRadioButton/cradiobuttontest.hxx | 2 +- NxWidgets/UnitTests/CScrollbarHorizontal/Makefile | 4 +- .../CScrollbarHorizontal/cscrollbarhorizontal.png | Bin 0 -> 20426 bytes .../cscrollbarhorizontaltest.hxx | 2 +- NxWidgets/UnitTests/CScrollbarVertical/Makefile | 4 +- .../CScrollbarVertical/cscrollbarvertical.png | Bin 0 -> 31491 bytes .../CScrollbarVertical/cscrollbarverticaltest.hxx | 2 +- NxWidgets/UnitTests/CSliderHorizonal/Makefile | 4 +- .../CSliderHorizonal/csliderhorizontal.png | Bin 0 -> 21590 bytes .../CSliderHorizonal/csliderhorizontaltest.hxx | 2 +- NxWidgets/UnitTests/CSliderVertical/Makefile | 4 +- .../UnitTests/CSliderVertical/cslidervertical.png | Bin 0 -> 19625 bytes .../CSliderVertical/csliderverticaltest.hxx | 2 +- NxWidgets/UnitTests/CTextBox/Makefile | 4 +- NxWidgets/UnitTests/CTextBox/ctextbox.png | Bin 0 -> 45575 bytes NxWidgets/UnitTests/CTextBox/ctextboxtest.hxx | 2 +- NxWidgets/UnitTests/TestStatus.txt | 59 ++++++++ NxWidgets/UnitTests/tools/addobjs.sh | 141 ------------------- NxWidgets/UnitTests/tools/install.sh | 152 --------------------- NxWidgets/tools/addobjs.sh | 141 +++++++++++++++++++ NxWidgets/tools/indent.sh | 45 ++++++ NxWidgets/tools/install.sh | 152 +++++++++++++++++++++ NxWidgets/tools/zipme.sh | 125 +++++++++++++++++ 56 files changed, 638 insertions(+), 344 deletions(-) create mode 100755 NxWidgets/ChangeLog.txt create mode 100755 NxWidgets/README.txt create mode 100755 NxWidgets/ReleaseNotes.txt create mode 100755 NxWidgets/UnitTests/CButton/cbutton-pushed.png create mode 100755 NxWidgets/UnitTests/CButton/cbutton-released.png create mode 100755 NxWidgets/UnitTests/CButtonArray/cbuttonarray.png create mode 100755 NxWidgets/UnitTests/CCheckBox/ccheckbox.png create mode 100755 NxWidgets/UnitTests/CLabel/clabel.png create mode 100755 NxWidgets/UnitTests/CProgressBar/cprogressbar.png create mode 100755 NxWidgets/UnitTests/CRadioButton/cradiobutton.png create mode 100755 NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal.png create mode 100755 NxWidgets/UnitTests/CScrollbarVertical/cscrollbarvertical.png create mode 100755 NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal.png create mode 100755 NxWidgets/UnitTests/CSliderVertical/cslidervertical.png create mode 100755 NxWidgets/UnitTests/CTextBox/ctextbox.png create mode 100755 NxWidgets/UnitTests/TestStatus.txt delete mode 100755 NxWidgets/UnitTests/tools/addobjs.sh delete mode 100755 NxWidgets/UnitTests/tools/install.sh create mode 100755 NxWidgets/tools/addobjs.sh create mode 100755 NxWidgets/tools/indent.sh create mode 100755 NxWidgets/tools/install.sh create mode 100755 NxWidgets/tools/zipme.sh (limited to 'NxWidgets') diff --git a/NxWidgets/ChangeLog.txt b/NxWidgets/ChangeLog.txt new file mode 100755 index 000000000..5a2806fcd --- /dev/null +++ b/NxWidgets/ChangeLog.txt @@ -0,0 +1,5 @@ +1.0 2012-03-22 Gregory Nutt + +* The initial release of the NxWidgets package + +1.1 2012-xx-xx Gregory Nutt diff --git a/NxWidgets/README.txt b/NxWidgets/README.txt new file mode 100755 index 000000000..380051a22 --- /dev/null +++ b/NxWidgets/README.txt @@ -0,0 +1,51 @@ +NXWidgets +========= + +In order to better support NuttX based platforms, a special graphical user +interface has been created called NXWidgets. NXWidgets is written in C++ +and integrates seamlessly with the NuttX NX graphics subsystem in order +to provide graphic objects, or "widgets," in the NX Graphics Subsystem + +Some of the features of NXWidgets include: + +o Conservative C++ + + NXWidgets is written entirely in C++ but using only selected “embedded + friendly” C++ constructs that are fully supported under NuttX. No + additional C++ support libraries are required. + +o NX Integration + + NXWidgets integrate seamlessly with the NX graphics system. Think of the + X server under Linux … the NX graphics system is like a tiny X server + that provides windowing under NuttX. By adding NXWidgets, you can support + graphics objects like buttons and text boxes in the NX windows and toolbars. + +o Small Footprint + + NXWidgets is tailored for use MCUs in embedded applications. It is ideally + suited for mid- and upper-range of most MCU families. A complete NXWidgets + is possible in as little as 40Kb of FLASH and maybe 4Kb of SRAM. + +o Output Devices + + NXWidgets will work on the high-end frame buffer devices as well as on LCDs + connected via serial or parallel ports to a small MCU. + +o Input Devices + + NXWidgets will accept position and selection inputs from a mouse or a + touchscreen. It will also support character input from a keyboard such as a + USB keyboard. NXWidgets supports on very special widget called CKeypad that + will provide keyboard input via an on-screen keypad that can be operated + via mouse or touchscreen inputs. + +o Many Graphic Objects + + Some of the graphic objects supported by NXWidgets include labels, buttons, + text boxes, button arrays, check boxes, cycle buttons, images, sliders, + scrollable list boxes, progress bars, and more. + +Note: Many of the fundamental classed in NxWidgets derive from the Antony +Dzeryn's "Woopsi" project: http://woopsi.org/ which also has a BSD style +license. See the COPYING file for details. diff --git a/NxWidgets/ReleaseNotes.txt b/NxWidgets/ReleaseNotes.txt new file mode 100755 index 000000000..dea4771a3 --- /dev/null +++ b/NxWidgets/ReleaseNotes.txt @@ -0,0 +1,9 @@ +NxWidgets-1.0 +============= + +The initial version of NxWidgets was released on March 22, 2012. This +package has been used in several projects prior to its release to open +source and is considered stable its initial release (although not all +features have been fully verified). + + diff --git a/NxWidgets/UnitTests/CButton/Makefile b/NxWidgets/UnitTests/CButton/Makefile index fbb7d815b..4e1ae042f 100644 --- a/NxWidgets/UnitTests/CButton/Makefile +++ b/NxWidgets/UnitTests/CButton/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CButton/cbutton-pushed.png b/NxWidgets/UnitTests/CButton/cbutton-pushed.png new file mode 100755 index 000000000..079076b86 Binary files /dev/null and b/NxWidgets/UnitTests/CButton/cbutton-pushed.png differ diff --git a/NxWidgets/UnitTests/CButton/cbutton-released.png b/NxWidgets/UnitTests/CButton/cbutton-released.png new file mode 100755 index 000000000..0626aedb0 Binary files /dev/null and b/NxWidgets/UnitTests/CButton/cbutton-released.png differ diff --git a/NxWidgets/UnitTests/CButton/cbuttontest.hxx b/NxWidgets/UnitTests/CButton/cbuttontest.hxx index f125af6b3..cba947b73 100644 --- a/NxWidgets/UnitTests/CButton/cbuttontest.hxx +++ b/NxWidgets/UnitTests/CButton/cbuttontest.hxx @@ -68,7 +68,7 @@ #endif #ifndef CONFIG_CBUTTONTEST_BGCOLOR -# define CONFIG_CBUTTONTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CBUTTONTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif #ifndef CONFIG_CBUTTONTEST_FONTCOLOR diff --git a/NxWidgets/UnitTests/CButtonArray/Makefile b/NxWidgets/UnitTests/CButtonArray/Makefile index 6bb67424c..a37e49142 100644 --- a/NxWidgets/UnitTests/CButtonArray/Makefile +++ b/NxWidgets/UnitTests/CButtonArray/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CButtonArray/cbuttonarray.png b/NxWidgets/UnitTests/CButtonArray/cbuttonarray.png new file mode 100755 index 000000000..8609d1223 Binary files /dev/null and b/NxWidgets/UnitTests/CButtonArray/cbuttonarray.png differ diff --git a/NxWidgets/UnitTests/CButtonArray/cbuttonarraytest.hxx b/NxWidgets/UnitTests/CButtonArray/cbuttonarraytest.hxx index ef265efbf..1a75ac2c3 100644 --- a/NxWidgets/UnitTests/CButtonArray/cbuttonarraytest.hxx +++ b/NxWidgets/UnitTests/CButtonArray/cbuttonarraytest.hxx @@ -68,7 +68,7 @@ #endif #ifndef CONFIG_CBUTTONARRAYTEST_BGCOLOR -# define CONFIG_CBUTTONARRAYTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CBUTTONARRAYTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif #ifndef CONFIG_CBUTTONARRAYTEST_FONTCOLOR diff --git a/NxWidgets/UnitTests/CCheckBox/Makefile b/NxWidgets/UnitTests/CCheckBox/Makefile index 9dae246ce..6b31286df 100644 --- a/NxWidgets/UnitTests/CCheckBox/Makefile +++ b/NxWidgets/UnitTests/CCheckBox/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CCheckBox/ccheckbox.png b/NxWidgets/UnitTests/CCheckBox/ccheckbox.png new file mode 100755 index 000000000..9f51c82f0 Binary files /dev/null and b/NxWidgets/UnitTests/CCheckBox/ccheckbox.png differ diff --git a/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx b/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx index 52371ab73..73e72e282 100644 --- a/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx +++ b/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx @@ -66,7 +66,7 @@ #endif #ifndef CONFIG_CCHECKBOXTEST_BGCOLOR -# define CONFIG_CCHECKBOXTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CCHECKBOXTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif // What is the entry point called? diff --git a/NxWidgets/UnitTests/CGlyphButton/Makefile b/NxWidgets/UnitTests/CGlyphButton/Makefile index 527d882fa..01e843555 100644 --- a/NxWidgets/UnitTests/CGlyphButton/Makefile +++ b/NxWidgets/UnitTests/CGlyphButton/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx b/NxWidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx index 889ce21ca..940d82a9f 100644 --- a/NxWidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx +++ b/NxWidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx @@ -69,7 +69,7 @@ #endif #ifndef CONFIG_CGLYPHBUTTONTEST_BGCOLOR -# define CONFIG_CGLYPHBUTTONTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CGLYPHBUTTONTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif #ifndef CONFIG_CGLYPHBUTTONTEST_FONTCOLOR diff --git a/NxWidgets/UnitTests/CImage/Makefile b/NxWidgets/UnitTests/CImage/Makefile index e248761e7..8db783364 100644 --- a/NxWidgets/UnitTests/CImage/Makefile +++ b/NxWidgets/UnitTests/CImage/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CImage/cimagetest.hxx b/NxWidgets/UnitTests/CImage/cimagetest.hxx index 8a8a55556..64592ee23 100644 --- a/NxWidgets/UnitTests/CImage/cimagetest.hxx +++ b/NxWidgets/UnitTests/CImage/cimagetest.hxx @@ -68,7 +68,7 @@ #endif #ifndef CONFIG_CIMAGETEST_BGCOLOR -# define CONFIG_CIMAGETEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CIMAGETEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif // What is the entry point called? diff --git a/NxWidgets/UnitTests/CKeypad/Makefile b/NxWidgets/UnitTests/CKeypad/Makefile index 631be3b68..ddb8fb962 100644 --- a/NxWidgets/UnitTests/CKeypad/Makefile +++ b/NxWidgets/UnitTests/CKeypad/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CKeypad/ckeypadtest.hxx b/NxWidgets/UnitTests/CKeypad/ckeypadtest.hxx index 820113960..c1c7ba79e 100644 --- a/NxWidgets/UnitTests/CKeypad/ckeypadtest.hxx +++ b/NxWidgets/UnitTests/CKeypad/ckeypadtest.hxx @@ -69,7 +69,7 @@ #endif #ifndef CONFIG_CKEYPADTEST_BGCOLOR -# define CONFIG_CKEYPADTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CKEYPADTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif // What is the entry point called? diff --git a/NxWidgets/UnitTests/CLabel/Makefile b/NxWidgets/UnitTests/CLabel/Makefile index 163d04175..4e49a7f5c 100644 --- a/NxWidgets/UnitTests/CLabel/Makefile +++ b/NxWidgets/UnitTests/CLabel/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CLabel/clabel.png b/NxWidgets/UnitTests/CLabel/clabel.png new file mode 100755 index 000000000..d74430ca5 Binary files /dev/null and b/NxWidgets/UnitTests/CLabel/clabel.png differ diff --git a/NxWidgets/UnitTests/CLabel/clabeltest.hxx b/NxWidgets/UnitTests/CLabel/clabeltest.hxx index 2d404b2df..f7e13fdfb 100644 --- a/NxWidgets/UnitTests/CLabel/clabeltest.hxx +++ b/NxWidgets/UnitTests/CLabel/clabeltest.hxx @@ -68,7 +68,7 @@ #endif #ifndef CONFIG_CLABELTEST_BGCOLOR -# define CONFIG_CLABELTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CLABELTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif #ifndef CONFIG_CLABELTEST_FONTCOLOR diff --git a/NxWidgets/UnitTests/CLatchButton/Makefile b/NxWidgets/UnitTests/CLatchButton/Makefile index ea6e7d662..d953c3e99 100644 --- a/NxWidgets/UnitTests/CLatchButton/Makefile +++ b/NxWidgets/UnitTests/CLatchButton/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CLatchButton/clatchbuttontest.hxx b/NxWidgets/UnitTests/CLatchButton/clatchbuttontest.hxx index 22ded3d77..62405ac88 100644 --- a/NxWidgets/UnitTests/CLatchButton/clatchbuttontest.hxx +++ b/NxWidgets/UnitTests/CLatchButton/clatchbuttontest.hxx @@ -68,7 +68,7 @@ #endif #ifndef CONFIG_CLATCHBUTTONTEST_BGCOLOR -# define CONFIG_CLATCHBUTTONTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CLATCHBUTTONTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif #ifndef CONFIG_CLATCHBUTTONTEST_FONTCOLOR diff --git a/NxWidgets/UnitTests/CLatchButtonArray/Makefile b/NxWidgets/UnitTests/CLatchButtonArray/Makefile index faa9d8fd9..ddd44f8b3 100644 --- a/NxWidgets/UnitTests/CLatchButtonArray/Makefile +++ b/NxWidgets/UnitTests/CLatchButtonArray/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarraytest.hxx b/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarraytest.hxx index 89ed242e7..f8642f089 100644 --- a/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarraytest.hxx +++ b/NxWidgets/UnitTests/CLatchButtonArray/clatchbuttonarraytest.hxx @@ -68,7 +68,7 @@ #endif #ifndef CONFIG_CLATCHBUTTONARRAYTEST_BGCOLOR -# define CONFIG_CLATCHBUTTONARRAYTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CLATCHBUTTONARRAYTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif #ifndef CONFIG_CLATCHBUTTONARRAYTEST_FONTCOLOR diff --git a/NxWidgets/UnitTests/CListBox/Makefile b/NxWidgets/UnitTests/CListBox/Makefile index 9f3d5721d..4f933ad98 100644 --- a/NxWidgets/UnitTests/CListBox/Makefile +++ b/NxWidgets/UnitTests/CListBox/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CListBox/clistboxtest.hxx b/NxWidgets/UnitTests/CListBox/clistboxtest.hxx index 5cc356849..88e41f3bf 100644 --- a/NxWidgets/UnitTests/CListBox/clistboxtest.hxx +++ b/NxWidgets/UnitTests/CListBox/clistboxtest.hxx @@ -66,7 +66,7 @@ #endif #ifndef CONFIG_CLISTBOXTEST_BGCOLOR -# define CONFIG_CLISTBOXTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CLISTBOXTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif // What is the entry point called? diff --git a/NxWidgets/UnitTests/CProgressBar/Makefile b/NxWidgets/UnitTests/CProgressBar/Makefile index 53d66fefa..a1e09ed57 100644 --- a/NxWidgets/UnitTests/CProgressBar/Makefile +++ b/NxWidgets/UnitTests/CProgressBar/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CProgressBar/cprogressbar.png b/NxWidgets/UnitTests/CProgressBar/cprogressbar.png new file mode 100755 index 000000000..321c4d6d9 Binary files /dev/null and b/NxWidgets/UnitTests/CProgressBar/cprogressbar.png differ diff --git a/NxWidgets/UnitTests/CProgressBar/cprogressbartest.hxx b/NxWidgets/UnitTests/CProgressBar/cprogressbartest.hxx index f5058a0c4..99312cf8f 100644 --- a/NxWidgets/UnitTests/CProgressBar/cprogressbartest.hxx +++ b/NxWidgets/UnitTests/CProgressBar/cprogressbartest.hxx @@ -66,7 +66,7 @@ #endif #ifndef CONFIG_CPROGRESSBARTEST_BGCOLOR -# define CONFIG_CPROGRESSBARTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CPROGRESSBARTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif // What is the entry point called? diff --git a/NxWidgets/UnitTests/CRadioButton/Makefile b/NxWidgets/UnitTests/CRadioButton/Makefile index 0b4906dd8..f861326e9 100644 --- a/NxWidgets/UnitTests/CRadioButton/Makefile +++ b/NxWidgets/UnitTests/CRadioButton/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CRadioButton/cradiobutton.png b/NxWidgets/UnitTests/CRadioButton/cradiobutton.png new file mode 100755 index 000000000..058badd5d Binary files /dev/null and b/NxWidgets/UnitTests/CRadioButton/cradiobutton.png differ diff --git a/NxWidgets/UnitTests/CRadioButton/cradiobuttontest.hxx b/NxWidgets/UnitTests/CRadioButton/cradiobuttontest.hxx index 563049dcf..00cded78c 100644 --- a/NxWidgets/UnitTests/CRadioButton/cradiobuttontest.hxx +++ b/NxWidgets/UnitTests/CRadioButton/cradiobuttontest.hxx @@ -67,7 +67,7 @@ #endif #ifndef CONFIG_CRADIOBUTTONTEST_BGCOLOR -# define CONFIG_CRADIOBUTTONTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CRADIOBUTTONTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif // What is the entry point called? diff --git a/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile b/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile index 6be8f7cd6..a6abb461b 100644 --- a/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile +++ b/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal.png b/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal.png new file mode 100755 index 000000000..8f83ded00 Binary files /dev/null and b/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal.png differ diff --git a/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontaltest.hxx b/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontaltest.hxx index feae319d0..fac165033 100644 --- a/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontaltest.hxx +++ b/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontaltest.hxx @@ -66,7 +66,7 @@ #endif #ifndef CONFIG_CSCROLLBARHORIZONTALTEST_BGCOLOR -# define CONFIG_CSCROLLBARHORIZONTALTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CSCROLLBARHORIZONTALTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif // What is the entry point called? diff --git a/NxWidgets/UnitTests/CScrollbarVertical/Makefile b/NxWidgets/UnitTests/CScrollbarVertical/Makefile index a2c404aad..ad7ae2a38 100644 --- a/NxWidgets/UnitTests/CScrollbarVertical/Makefile +++ b/NxWidgets/UnitTests/CScrollbarVertical/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarvertical.png b/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarvertical.png new file mode 100755 index 000000000..58067690d Binary files /dev/null and b/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarvertical.png differ diff --git a/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarverticaltest.hxx b/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarverticaltest.hxx index 874a851fd..e6005ced9 100644 --- a/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarverticaltest.hxx +++ b/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarverticaltest.hxx @@ -66,7 +66,7 @@ #endif #ifndef CONFIG_CSCROLLBARVERTICALTEST_BGCOLOR -# define CONFIG_CSCROLLBARVERTICALTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CSCROLLBARVERTICALTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif // What is the entry point called? diff --git a/NxWidgets/UnitTests/CSliderHorizonal/Makefile b/NxWidgets/UnitTests/CSliderHorizonal/Makefile index b496bdda7..0a86aaf5f 100644 --- a/NxWidgets/UnitTests/CSliderHorizonal/Makefile +++ b/NxWidgets/UnitTests/CSliderHorizonal/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal.png b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal.png new file mode 100755 index 000000000..0b68a48c5 Binary files /dev/null and b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal.png differ diff --git a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx index 1dde688a8..99d6f739e 100644 --- a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx +++ b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx @@ -66,7 +66,7 @@ #endif #ifndef CONFIG_CSLIDERHORIZONTALTEST_BGCOLOR -# define CONFIG_CSLIDERHORIZONTALTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CSLIDERHORIZONTALTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif // What is the entry point called? diff --git a/NxWidgets/UnitTests/CSliderVertical/Makefile b/NxWidgets/UnitTests/CSliderVertical/Makefile index 5d5e590f1..76fd0da57 100644 --- a/NxWidgets/UnitTests/CSliderVertical/Makefile +++ b/NxWidgets/UnitTests/CSliderVertical/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CSliderVertical/cslidervertical.png b/NxWidgets/UnitTests/CSliderVertical/cslidervertical.png new file mode 100755 index 000000000..6572746ba Binary files /dev/null and b/NxWidgets/UnitTests/CSliderVertical/cslidervertical.png differ diff --git a/NxWidgets/UnitTests/CSliderVertical/csliderverticaltest.hxx b/NxWidgets/UnitTests/CSliderVertical/csliderverticaltest.hxx index e8d506db9..a0d3df801 100644 --- a/NxWidgets/UnitTests/CSliderVertical/csliderverticaltest.hxx +++ b/NxWidgets/UnitTests/CSliderVertical/csliderverticaltest.hxx @@ -66,7 +66,7 @@ #endif #ifndef CONFIG_CSLIDERVERTICALTEST_BGCOLOR -# define CONFIG_CSLIDERVERTICALTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CSLIDERVERTICALTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif // What is the entry point called? diff --git a/NxWidgets/UnitTests/CTextBox/Makefile b/NxWidgets/UnitTests/CTextBox/Makefile index 3fe0fa43e..bd7d98491 100644 --- a/NxWidgets/UnitTests/CTextBox/Makefile +++ b/NxWidgets/UnitTests/CTextBox/Makefile @@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs # Add the path to the NXWidget include directory to the CFLAGS -NXWIDGETS_DIR="$(TESTDIR)/../../NXWidgets/libnxwidgets" +NXWIDGETS_DIR="$(TESTDIR)/../../libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)/include" NXWIDGETS_LIB="$(NXWIDGETS_DIR)/libnxwidgets$(LIBEXT)" @@ -56,7 +56,7 @@ endif # Get the path to the archiver tool -TESTTOOL_DIR="$(TESTDIR)/../tools" +TESTTOOL_DIR="$(TESTDIR)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh # Hello, World! C++ Example diff --git a/NxWidgets/UnitTests/CTextBox/ctextbox.png b/NxWidgets/UnitTests/CTextBox/ctextbox.png new file mode 100755 index 000000000..4c9f76ae7 Binary files /dev/null and b/NxWidgets/UnitTests/CTextBox/ctextbox.png differ diff --git a/NxWidgets/UnitTests/CTextBox/ctextboxtest.hxx b/NxWidgets/UnitTests/CTextBox/ctextboxtest.hxx index 2a839b06d..1d470a1a8 100644 --- a/NxWidgets/UnitTests/CTextBox/ctextboxtest.hxx +++ b/NxWidgets/UnitTests/CTextBox/ctextboxtest.hxx @@ -68,7 +68,7 @@ #endif #ifndef CONFIG_CTEXTBOXTEST_BGCOLOR -# define CONFIG_CTEXTBOXTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKCOLOR +# define CONFIG_CTEXTBOXTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif #ifndef CONFIG_CTEXTBOXTEST_FONTCOLOR diff --git a/NxWidgets/UnitTests/TestStatus.txt b/NxWidgets/UnitTests/TestStatus.txt new file mode 100755 index 000000000..965f83ef7 --- /dev/null +++ b/NxWidgets/UnitTests/TestStatus.txt @@ -0,0 +1,59 @@ +NxWidgets Test Status +===================== + +At this point, the NXWidgets GUI toolkit code complete but still not +completely tested. This is a list of testing issues that still need to be +addressed. + +The following Widgets have been have completed unit testing. The level of +unit testing is, however, superficial. Many features have not yet been +tested: + + - CLabel + - CTextBox + - CButton + - CButtonArray + - CKeypad + - CRadioButton (and CRadioButtonGoup) + - CGlyphButton + - CLatchButton (and CStickyButton) + - CLatchButtonArray (and CStickyButtonArray) + - CCheckBox + - CProgressBar + - CImage + - CSliderHorizontal (and CSliderHorizontalGrip) + - CSliderVertical (and CSliderVerticalGrip) + - CScrollBarHorizontal (except paging buttons) + - CScrollBarVertical (except paging buttons) + +The following components have unit test in place, but do not successfully +pass the test: + + - CListBox (and CListBoxDataItem) which also tests: + o CText + o CList and CListDataItem + o CScrollingPanel + +The following no unit tests (and, hence, are probably non-functional): + + Infrastructure (won't have their own unit tests) + - CScrollBarPanel + + Widgets that need unit tests: + - CCycleButton + - CScrollingTextBox + - CMultiLineTextBox + - CScrollingListBox + +There are things that require testing after all widgets complete their unit +tests as well. As examples: + + - Need to verify that a screen with many widgets works correctly. That + focus is correctly handled when widgets are removed. etc. + - Need to verify that widget with many children work correctly together. + - Need to verfiy that a display with many windows with multiple wigets + per window works okay. + +Most unit-level testing was performed in a simulated environment driven by +simulated mouse and keyboard input. So many features are not tested that +require human interaction ... such grabbing and dragging scrollbars. diff --git a/NxWidgets/UnitTests/tools/addobjs.sh b/NxWidgets/UnitTests/tools/addobjs.sh deleted file mode 100755 index e998cfc64..000000000 --- a/NxWidgets/UnitTests/tools/addobjs.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/bin/bash -################################################################################# -# NxWidgets/UnitTests/tools/addobjs.sh -# -# Copyright (C) 2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX, NxWidgets, nor the names of its contributors -# me be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -################################################################################# - -# set -x - -# Get input parameters - -usage="Usage: $0 [OPTIONS] " -advice="Try '$0 -h' for more information" - -unset prefix -wintool=n - -while [ ! -z "$1" ]; do - case $1 in - -d ) - set -x - ;; - -p ) - shift - prefix=$1 - ;; - -w ) - wintool=y - ;; - -h ) - echo "$0 will add all object (.o) files in directory to an archive." - echo "" - echo $usage - echo "" - echo "Where:" - echo " is the full, absolute path to the library to use" - echo " is full path to the directory containing the object files to be added" - echo "OPTIONS include:" - echo " -p Prefix to use. For example, to use arm-elf-ar, add '-p arm-elf-'" - echo " -w Use Windows style paths insted of POSIX paths" - echo " -d Enable script debug" - echo " -h Show this usage information" - exit 0 - ;; - * ) - break; - ;; - esac - shift -done - -libpath=$1 -objdir=$2 -archiver="${prefix}"ar - -# Verify input parameters - -if [ -z "${libpath}" ]; then - echo "Missing required arguments" - echo "" - echo $usage - echo $advice - exit 1 -fi - -if [ -z "${objdir}" ]; then - echo "Missing required argument " - echo "" - echo $usage - echo $advice - exit 1 -fi - -if [ ! -w ${libpath} ]; then - if [ -e ${libpath} ]; then - echo "${libpath} exists but is not a write-able file" - echo $advice - else - echo "${libpath} does not exist" - echo $advice - fi - exit 1 -fi - -if [ ! -d ${objdir} ]; then - if [ -e ${objdir} ]; then - echo "${objdir} exists but is not a directory" - echo $advice - else - echo "${objdir} does not exist" - echo $advice - fi - exit 1 -fi - -# Add each object file in to the archive at - -for obj in `ls "${objdir}"/*.o`; do - name=`basename "${obj}"` - if [ "X${wintool}" = "Xy" ]; then - objpath=`cygpath -w "${obj}"` - else - objpath=${obj} - fi - echo "AR: ${name}" - ${archiver} rcs ${libpath} ${objpath} || \ - { echo "Failed to archive the object file:"; \ - echo " Archive: ${libpath}"; \ - echo " Object: ${obj}"; \ - exit 1; \ - } -done \ No newline at end of file diff --git a/NxWidgets/UnitTests/tools/install.sh b/NxWidgets/UnitTests/tools/install.sh deleted file mode 100755 index 3ba086aff..000000000 --- a/NxWidgets/UnitTests/tools/install.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/bin/bash -################################################################################# -# NxWidgets/UnitTests/tools/install.sh -# -# Copyright (C) 2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX, NxWidgets, nor the names of its contributors -# me be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -################################################################################# -# -# set -x -# Functions - -function ShowUsage() -{ - echo "" - echo "USAGE: $0 " - echo "" - echo "Where:" - echo " is the full, absolute path to the NuttX apps/ directory" - echo " is the name of a sub-directory in the UnitTests directory" - echo "" -} - -function ShowTests() -{ - for testdir in ${UNITTEST_DIRPATH}/*; do - subdir=`basename ${testdir}` - if [ -d "${UNITTEST_DIRPATH}/${subdir}" ]; then - if [ -f "${UNITTEST_DIRPATH}/${subdir}/Makefile" ]; then - echo $subdir - fi - fi - done -} - -# Input parameters - -APPS_DIRPATH=$1 -TEST_SUBDIR=$2 - -if [ -z "${APPS_DIRPATH}" ]; then - echo "Missing required arguments" - ShowUsage - exit 1 -fi - -if [ -z "${TEST_SUBDIR}" ]; then - echo "Missing required argument " - ShowUsage - exit 1 -fi - -# Make sure that we know where we are and where we are going - -WD=`pwd` -if [ -x install.sh ]; then - UNITTEST_DIRPATH="${WD}/.." - TOOLS_DIRPATH="${WD}" -else - if [ -x tools/install.sh ]; then - UNITTEST_DIRPATH="${WD}" - TOOLS_DIRPATH="${WD}/tools" - else - echo "This script must be executed in the UnitTest or UnitTest/tools directory" - ShowUsage - exit 1 - fi -fi - -if [ ! -d "${APPS_DIRPATH}" ]; then - echo "Directory ${APPS_DIRPATH} does not exist" - ShowUsage - exit 1 -fi - -if [ ! -f "${APPS_DIRPATH}/Makefile" ]; then - echo "Directory ${APPS_DIRPATH} does not look like a NuttX apps directory" - ShowUsage - exit 1 -fi - -TEST_PATH="${UNITTEST_DIRPATH}/${TEST_SUBDIR}" -if [ ! -d "${TEST_PATH}" ]; then - echo "Directory ${TEST_PATH} does not exist" - ShowUsage - ShowTests - exit 1 -fi - -if [ ! -f "${TEST_PATH}/Makefile" ]; then - echo "Directory ${TEST_PATH} does not look like a unit test directory" - ShowUsage - ShowTests - exit 1 -fi - -# Check if the symbolic link "external" exists in the NuttX apps directory - -if [ -e "${APPS_DIRPATH}/external" ]; then - echo "${APPS_DIRPATH}/external already exists..." - if [ -h "${APPS_DIRPATH}/external" ]; then - echo " Removing the old symbolic link." - rm "${APPS_DIRPATH}/external" || \ - { echo " ERROR: Failed to remove old symbolic link"; \ - exit 1; - } - else - echo " ERROR: But it is not a symbolic link!" - echo " Please remove ${APPS_DIRPATH}/external" - echo " and run this script again" - fi -fi - -# Then set up the symbolic link "external" in the NuttX apps to point to the -# UnitTest subdirectory - -echo "Creating symbolic link" -echo " - To ${TEST_PATH}" -echo " - At ${APPS_DIRPATH}/external" - -ln -s "${TEST_PATH}" "${APPS_DIRPATH}/external" || \ - { echo "Failed to create symbollic link"; \ - exit 1; - } - diff --git a/NxWidgets/tools/addobjs.sh b/NxWidgets/tools/addobjs.sh new file mode 100755 index 000000000..5ccb289c5 --- /dev/null +++ b/NxWidgets/tools/addobjs.sh @@ -0,0 +1,141 @@ +#!/bin/bash +################################################################################# +# NxWidgets/tools/addobjs.sh +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX, NxWidgets, nor the names of its contributors +# me be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +################################################################################# + +# set -x + +# Get input parameters + +usage="Usage: $0 [OPTIONS] " +advice="Try '$0 -h' for more information" + +unset prefix +wintool=n + +while [ ! -z "$1" ]; do + case $1 in + -d ) + set -x + ;; + -p ) + shift + prefix=$1 + ;; + -w ) + wintool=y + ;; + -h ) + echo "$0 will add all object (.o) files in directory to an archive." + echo "" + echo $usage + echo "" + echo "Where:" + echo " is the full, absolute path to the library to use" + echo " is full path to the directory containing the object files to be added" + echo "OPTIONS include:" + echo " -p Prefix to use. For example, to use arm-elf-ar, add '-p arm-elf-'" + echo " -w Use Windows style paths insted of POSIX paths" + echo " -d Enable script debug" + echo " -h Show this usage information" + exit 0 + ;; + * ) + break; + ;; + esac + shift +done + +libpath=$1 +objdir=$2 +archiver="${prefix}"ar + +# Verify input parameters + +if [ -z "${libpath}" ]; then + echo "Missing required arguments" + echo "" + echo $usage + echo $advice + exit 1 +fi + +if [ -z "${objdir}" ]; then + echo "Missing required argument " + echo "" + echo $usage + echo $advice + exit 1 +fi + +if [ ! -w ${libpath} ]; then + if [ -e ${libpath} ]; then + echo "${libpath} exists but is not a write-able file" + echo $advice + else + echo "${libpath} does not exist" + echo $advice + fi + exit 1 +fi + +if [ ! -d ${objdir} ]; then + if [ -e ${objdir} ]; then + echo "${objdir} exists but is not a directory" + echo $advice + else + echo "${objdir} does not exist" + echo $advice + fi + exit 1 +fi + +# Add each object file in to the archive at + +for obj in `ls "${objdir}"/*.o`; do + name=`basename "${obj}"` + if [ "X${wintool}" = "Xy" ]; then + objpath=`cygpath -w "${obj}"` + else + objpath=${obj} + fi + echo "AR: ${name}" + ${archiver} rcs ${libpath} ${objpath} || \ + { echo "Failed to archive the object file:"; \ + echo " Archive: ${libpath}"; \ + echo " Object: ${obj}"; \ + exit 1; \ + } +done \ No newline at end of file diff --git a/NxWidgets/tools/indent.sh b/NxWidgets/tools/indent.sh new file mode 100755 index 000000000..e763cff37 --- /dev/null +++ b/NxWidgets/tools/indent.sh @@ -0,0 +1,45 @@ +#!/bin/sh +################################################################################# +# NxWidgets/tools/install.sh +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX, NxWidgets, nor the names of its contributors +# me be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +################################################################################# +# +# This script uses the Linux 'indent' utility to re-format C source files +# to match the coding style that I use. It differs from my coding style in that +# +# - I normally put the traiing */ of a multi-line comment on a separate line, +# - I usually align things vertically (like '='in assignments. +# + +indent -nbad -bap -bbb -nbbo -nbc -bl -bl2 -bls -nbs -cbi2 -ncdw -nce -ci2 -cli0 -cp40 -ncs -nbfda -nbfde -di1 -nfc1 -fca -i2 -l80 -lp -ppi2 -lps -npcs -pmt -nprs -npsl -saf -sai -sbi2 -saw -sc -sob -nss -nut "$@" + diff --git a/NxWidgets/tools/install.sh b/NxWidgets/tools/install.sh new file mode 100755 index 000000000..6917b4b03 --- /dev/null +++ b/NxWidgets/tools/install.sh @@ -0,0 +1,152 @@ +#!/bin/bash +################################################################################# +# NxWidgets/tools/install.sh +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX, NxWidgets, nor the names of its contributors +# me be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +################################################################################# +# +# set -x +# Functions + +function ShowUsage() +{ + echo "" + echo "USAGE: $0 " + echo "" + echo "Where:" + echo " is the full, absolute path to the NuttX apps/ directory" + echo " is the name of a sub-directory in the UnitTests directory" + echo "" +} + +function ShowTests() +{ + for testdir in ${UNITTEST_DIRPATH}/*; do + subdir=`basename ${testdir}` + if [ -d "${UNITTEST_DIRPATH}/${subdir}" ]; then + if [ -f "${UNITTEST_DIRPATH}/${subdir}/Makefile" ]; then + echo $subdir + fi + fi + done +} + +# Input parameters + +APPS_DIRPATH=$1 +TEST_SUBDIR=$2 + +if [ -z "${APPS_DIRPATH}" ]; then + echo "Missing required arguments" + ShowUsage + exit 1 +fi + +if [ -z "${TEST_SUBDIR}" ]; then + echo "Missing required argument " + ShowUsage + exit 1 +fi + +# Make sure that we know where we are and where we are going + +WD=`pwd` +if [ -x install.sh ]; then + UNITTEST_DIRPATH="${WD}/../UnitTests" + TOOLS_DIRPATH="${WD}" +else + if [ -x tools/install.sh ]; then + UNITTEST_DIRPATH="${WD}/UnitTests" + TOOLS_DIRPATH="${WD}/tools" + else + echo "This script must be executed in the NxWidgets or NxWidgets/tools directory" + ShowUsage + exit 1 + fi +fi + +if [ ! -d "${APPS_DIRPATH}" ]; then + echo "Directory ${APPS_DIRPATH} does not exist" + ShowUsage + exit 1 +fi + +if [ ! -f "${APPS_DIRPATH}/Makefile" ]; then + echo "Directory ${APPS_DIRPATH} does not look like a NuttX apps directory" + ShowUsage + exit 1 +fi + +TEST_PATH="${UNITTEST_DIRPATH}/${TEST_SUBDIR}" +if [ ! -d "${TEST_PATH}" ]; then + echo "Directory ${TEST_PATH} does not exist" + ShowUsage + ShowTests + exit 1 +fi + +if [ ! -f "${TEST_PATH}/Makefile" ]; then + echo "Directory ${TEST_PATH} does not look like a unit test directory" + ShowUsage + ShowTests + exit 1 +fi + +# Check if the symbolic link "external" exists in the NuttX apps directory + +if [ -e "${APPS_DIRPATH}/external" ]; then + echo "${APPS_DIRPATH}/external already exists..." + if [ -h "${APPS_DIRPATH}/external" ]; then + echo " Removing the old symbolic link." + rm "${APPS_DIRPATH}/external" || \ + { echo " ERROR: Failed to remove old symbolic link"; \ + exit 1; + } + else + echo " ERROR: But it is not a symbolic link!" + echo " Please remove ${APPS_DIRPATH}/external" + echo " and run this script again" + fi +fi + +# Then set up the symbolic link "external" in the NuttX apps to point to the +# UnitTest subdirectory + +echo "Creating symbolic link" +echo " - To ${TEST_PATH}" +echo " - At ${APPS_DIRPATH}/external" + +ln -s "${TEST_PATH}" "${APPS_DIRPATH}/external" || \ + { echo "Failed to create symbollic link"; \ + exit 1; + } + diff --git a/NxWidgets/tools/zipme.sh b/NxWidgets/tools/zipme.sh new file mode 100755 index 000000000..a77748c3b --- /dev/null +++ b/NxWidgets/tools/zipme.sh @@ -0,0 +1,125 @@ +#!/bin/bash +################################################################################# +# NxWidgets/tools/zipme.sh +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX, NxWidgets, nor the names of its contributors +# me be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +################################################################################# + +#set -x + +WD=`pwd` +VERSION=$1 + +TAR="tar cvf" +ZIP=gzip + +# Make sure we know what is going on + +if [ -z ${VERSION} ] ; then + echo "You must supply a version like xx.yy as a parameter" + exit 1; +fi + +# Find the directory we were executed from and were we expect to +# see the directory to tar up + +MYNAME=`basename $0` + +if [ -x ${WD}/${MYNAME} ] ; then + NXWIDGETS=`dirname ${WD}` +else + if [ -x ${WD}/tools/${MYNAME} ] ; then + NXWIDGETS=${WD} + else + echo "You must cd into the NxWidgets or NxWidgets/tools directory to execute this script." + exit 1 + fi +fi + +# Get the NxWidgets directory name and the path to the parent directory + +NXWIDGETSDIR=`basename ${NXWIDGETS}` +PROJECTS=`dirname ${NXWIDGETS}` + +# The name of the directory must match the version number + +if [ "X${NXWIDGETSDIR}" != "Xupthreads-${VERSION}" ]; then + echo "Expected directory name to be NxWidgets-${VERSION} found ${NXWIDGETSDIR}" + exit 1 +fi + +cd ${PROJECTS} || \ + { echo "Failed to cd to ${PROJECTS}" ; exit 1 ; } + +if [ ! -d ${NXWIDGETSDIR} ] ; then + echo "${PROJECTS}/${NXWIDGETSDIR} does not exist!" + exit 1 +fi + +TAR_NAME=NxWidgets-${VERSION}.tar +ZIP_NAME=${TAR_NAME}.gz + +# Prepare the NxWidgets directory -- Remove editor garbage + +find ${NXWIDGETSDIR} -name '*~' -exec rm -f '{}' ';' || \ + { echo "Removal of emacs garbage failed!" ; exit 1 ; } + +find ${NXWIDGETSDIR} -name '#*' -exec rm -f '{}' ';' || \ + { echo "Removal of VI garbage failed!" ; exit 1 ; } + +find ${NXWIDGETSDIR} -name '*.swp' -exec rm -f '{}' ';' || \ + { echo "Removal of VI garbage failed!" ; exit 1 ; } + +# Perform a full clean for the distribution + +make -C ${NXWIDGETSDIR} distclean + +# Remove any previous tarballs + +if [ -f ${TAR_NAME} ] ; then + echo "Removing ${PROJECTS}/${TAR_NAME}" + rm -f ${TAR_NAME} || \ + { echo "rm ${TAR_NAME} failed!" ; exit 1 ; } +fi + +if [ -f ${ZIP_NAME} ] ; then + echo "Removing ${PROJECTS}/${ZIP_NAME}" + rm -f ${ZIP_NAME} || \ + { echo "rm ${ZIP_NAME} failed!" ; exit 1 ; } +fi + +# Then zip it + +${TAR} ${TAR_NAME} ${NXWIDGETSDIR} || \ + { echo "tar of ${NXWIDGETSDIR} failed!" ; exit 1 ; } +${ZIP} ${TAR_NAME} || \ + { echo "zip of ${TAR_NAME} failed!" ; exit 1 ; } -- cgit v1.2.3