diff options
55 files changed, 352 insertions, 58 deletions
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 <gnutt@nuttx.org>
+
+* The initial release of the NxWidgets package
+
+1.1 2012-xx-xx Gregory Nutt <gnutt@nuttx.org>
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 Binary files differnew file mode 100755 index 000000000..079076b86 --- /dev/null +++ b/NxWidgets/UnitTests/CButton/cbutton-pushed.png diff --git a/NxWidgets/UnitTests/CButton/cbutton-released.png b/NxWidgets/UnitTests/CButton/cbutton-released.png Binary files differnew file mode 100755 index 000000000..0626aedb0 --- /dev/null +++ b/NxWidgets/UnitTests/CButton/cbutton-released.png 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 Binary files differnew file mode 100755 index 000000000..8609d1223 --- /dev/null +++ b/NxWidgets/UnitTests/CButtonArray/cbuttonarray.png 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 Binary files differnew file mode 100755 index 000000000..9f51c82f0 --- /dev/null +++ b/NxWidgets/UnitTests/CCheckBox/ccheckbox.png 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 Binary files differnew file mode 100755 index 000000000..d74430ca5 --- /dev/null +++ b/NxWidgets/UnitTests/CLabel/clabel.png 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 Binary files differnew file mode 100755 index 000000000..321c4d6d9 --- /dev/null +++ b/NxWidgets/UnitTests/CProgressBar/cprogressbar.png 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 Binary files differnew file mode 100755 index 000000000..058badd5d --- /dev/null +++ b/NxWidgets/UnitTests/CRadioButton/cradiobutton.png 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 Binary files differnew file mode 100755 index 000000000..8f83ded00 --- /dev/null +++ b/NxWidgets/UnitTests/CScrollbarHorizontal/cscrollbarhorizontal.png 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 Binary files differnew file mode 100755 index 000000000..58067690d --- /dev/null +++ b/NxWidgets/UnitTests/CScrollbarVertical/cscrollbarvertical.png 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 Binary files differnew file mode 100755 index 000000000..0b68a48c5 --- /dev/null +++ b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal.png 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 Binary files differnew file mode 100755 index 000000000..6572746ba --- /dev/null +++ b/NxWidgets/UnitTests/CSliderVertical/cslidervertical.png 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 Binary files differnew file mode 100755 index 000000000..4c9f76ae7 --- /dev/null +++ b/NxWidgets/UnitTests/CTextBox/ctextbox.png 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/tools/addobjs.sh index e998cfc64..5ccb289c5 100755 --- a/NxWidgets/UnitTests/tools/addobjs.sh +++ b/NxWidgets/tools/addobjs.sh @@ -1,6 +1,6 @@ #!/bin/bash ################################################################################# -# NxWidgets/UnitTests/tools/addobjs.sh +# NxWidgets/tools/addobjs.sh # # Copyright (C) 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> @@ -62,7 +62,7 @@ while [ ! -z "$1" ]; do echo $usage echo "" echo "Where:" - echo " <alib-path> is the full, absolute path to the library to use" + echo " <lib-path> is the full, absolute path to the library to use" echo " <obj-dir> 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-'" 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 <gnutt@nuttx.org> +# +# 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/UnitTests/tools/install.sh b/NxWidgets/tools/install.sh index 3ba086aff..6917b4b03 100755 --- a/NxWidgets/UnitTests/tools/install.sh +++ b/NxWidgets/tools/install.sh @@ -1,6 +1,6 @@ #!/bin/bash ################################################################################# -# NxWidgets/UnitTests/tools/install.sh +# NxWidgets/tools/install.sh # # Copyright (C) 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> @@ -81,14 +81,14 @@ fi WD=`pwd` if [ -x install.sh ]; then - UNITTEST_DIRPATH="${WD}/.." + UNITTEST_DIRPATH="${WD}/../UnitTests" TOOLS_DIRPATH="${WD}" else if [ -x tools/install.sh ]; then - UNITTEST_DIRPATH="${WD}" + UNITTEST_DIRPATH="${WD}/UnitTests" TOOLS_DIRPATH="${WD}/tools" else - echo "This script must be executed in the UnitTest or UnitTest/tools directory" + echo "This script must be executed in the NxWidgets or NxWidgets/tools directory" ShowUsage exit 1 fi 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 <gnutt@nuttx.org> +# +# 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 ; } diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 8c22f6dfa..a21898f3d 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -2549,7 +2549,7 @@ the STM32 F2 family. Contributed by Gary Teravskis, * configs/stm3220g-eval: Add support for the STMicro STM3220G-EVAL board. Contributed by Gary Teravskis, - + 6.17 2012-xx-xx Gregory Nutt <gnutt@nuttx.org> * configs/sure-pic32mx: Add support for the Sure DB-DP11212 PIC32 General |