mirror of
https://github.com/c3d/DB48X-on-DM42.git
synced 2024-09-28 03:20:53 +02:00
Add Version command, built from git version
Fetch the version number directly from git. Add the `Version` command with version information. Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
parent
cf190726b8
commit
47b9fe0281
9 changed files with 28 additions and 6 deletions
2
Makefile
2
Makefile
|
@ -33,6 +33,7 @@ CRCFIX = $(TOOLS)/forcecrc32/forcecrc32
|
|||
FLASH=$(BUILD)/$(TARGET)_flash.bin
|
||||
QSPI =$(BUILD)/$(TARGET)_qspi.bin
|
||||
|
||||
VERSION=$(shell git describe --dirty=Z | sed -e 's/^v//g')
|
||||
|
||||
|
||||
#==============================================================================
|
||||
|
@ -162,6 +163,7 @@ DEFINES += \
|
|||
DECIMAL_GLOBAL_ROUNDING_ACCESS_FUNCTIONS \
|
||||
DECIMAL_GLOBAL_EXCEPTION_FLAGS \
|
||||
DECIMAL_GLOBAL_EXCEPTION_FLAGS_ACCESS_FUNCTIONS \
|
||||
DB48X_VERSION=\"$(VERSION)\" \
|
||||
$(DEFINES_$(OPT))
|
||||
DEFINES_debug=DEBUG
|
||||
DEFINES_release=RELEASE
|
||||
|
|
|
@ -7,7 +7,7 @@ extern const unsigned char EditorFont_sparse_font_data[];
|
|||
const unsigned char EditorFont_sparse_font_data[72805] FONT_QSPI =
|
||||
{
|
||||
|
||||
0xDE, 0x01, 0xE0, 0xB8, 0x04, 0x36, 0x00, 0x01, 0x00, 0x2C, 0x01, 0x01, 0x00, 0x00, 0x0D, 0x01,
|
||||
0xDF, 0x01, 0xE0, 0xB8, 0x04, 0x36, 0x00, 0x01, 0x00, 0x2C, 0x01, 0x01, 0x00, 0x00, 0x0D, 0x01,
|
||||
0x00, 0x2C, 0x01, 0x01, 0x08, 0x00, 0x20, 0x5F, 0x00, 0x2C, 0x01, 0x01, 0x08, 0x00, 0x02, 0x0B,
|
||||
0x05, 0x21, 0x09, 0xEF, 0xBD, 0xF7, 0xDE, 0x7B, 0xEF, 0xBD, 0xF7, 0xDE, 0x7B, 0xEF, 0xBD, 0xF7,
|
||||
0x1E, 0x00, 0x00, 0xB8, 0xFF, 0xFF, 0xFF, 0x0E, 0x03, 0x0B, 0x0B, 0x0F, 0x11, 0x8F, 0x7F, 0xFC,
|
||||
|
|
|
@ -7,7 +7,7 @@ extern const unsigned char HelpFont_sparse_font_data[];
|
|||
const unsigned char HelpFont_sparse_font_data[14848] FONT_QSPI =
|
||||
{
|
||||
|
||||
0xDE, 0x01, 0xFC, 0x73, 0x14, 0x00, 0x01, 0x00, 0x11, 0x01, 0x01, 0x00, 0x00, 0x0D, 0x01, 0x00,
|
||||
0xDF, 0x01, 0xFC, 0x73, 0x14, 0x00, 0x01, 0x00, 0x11, 0x01, 0x01, 0x00, 0x00, 0x0D, 0x01, 0x00,
|
||||
0x11, 0x01, 0x01, 0x03, 0x00, 0x20, 0x5F, 0x00, 0x11, 0x01, 0x01, 0x03, 0x00, 0x01, 0x04, 0x02,
|
||||
0x0D, 0x04, 0xFF, 0xFF, 0xF3, 0x03, 0x01, 0x04, 0x04, 0x05, 0x06, 0xFF, 0xFF, 0x0F, 0x01, 0x04,
|
||||
0x08, 0x0D, 0x0A, 0x12, 0x12, 0x14, 0x7F, 0x7F, 0x24, 0x24, 0x24, 0xFE, 0xFE, 0x28, 0x48, 0x48,
|
||||
|
|
|
@ -7,7 +7,7 @@ extern const unsigned char StackFont_sparse_font_data[];
|
|||
const unsigned char StackFont_sparse_font_data[36007] FONT_QSPI =
|
||||
{
|
||||
|
||||
0xDE, 0x01, 0xA2, 0x99, 0x02, 0x24, 0x00, 0x01, 0x00, 0x1C, 0x01, 0x01, 0x00, 0x00, 0x0D, 0x01,
|
||||
0xDF, 0x01, 0xA2, 0x99, 0x02, 0x24, 0x00, 0x01, 0x00, 0x1C, 0x01, 0x01, 0x00, 0x00, 0x0D, 0x01,
|
||||
0x00, 0x1C, 0x01, 0x01, 0x06, 0x00, 0x20, 0x5F, 0x00, 0x1C, 0x01, 0x01, 0x06, 0x00, 0x02, 0x05,
|
||||
0x03, 0x17, 0x06, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xC0, 0xFF, 0x1F, 0x02, 0x05, 0x08, 0x0A,
|
||||
0x0C, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, 0x01, 0x05, 0x0E, 0x17, 0x10,
|
||||
|
|
|
@ -224,7 +224,25 @@ COMMAND(HomeDirectory)
|
|||
if (RT.push(dir))
|
||||
return OK;
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
||||
COMMAND(Version)
|
||||
// ----------------------------------------------------------------------------
|
||||
// Return a version string
|
||||
// ----------------------------------------------------------------------------
|
||||
{
|
||||
const utf8 version_text = (utf8)
|
||||
"DB48X " DB48X_VERSION "\n"
|
||||
"A modern implementation of\n"
|
||||
"Reverse Polish Lisp (RPL)\n"
|
||||
"and a tribute to\n"
|
||||
"Bill Hewlett and Dave Packard\n"
|
||||
"© 2022-2023 Christophe de Dinechin";
|
||||
if (text_g version = text::make(version_text))
|
||||
if (RT.push(object_p(version)))
|
||||
return OK;
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
#endif // COMMAND_H
|
||||
|
|
|
@ -30,6 +30,6 @@
|
|||
// ****************************************************************************
|
||||
|
||||
#define PROGRAM_NAME "DB48X"
|
||||
#define PROGRAM_VERSION "0.0.1"
|
||||
#define PROGRAM_VERSION DB48X_VERSION
|
||||
|
||||
#endif // MAIN_H
|
||||
|
|
|
@ -299,6 +299,7 @@ CMD(BasedTicks)
|
|||
CMD(BasedUnderscore)
|
||||
|
||||
CMD(Modes)
|
||||
CMD(Version)
|
||||
|
||||
|
||||
// ============================================================================
|
||||
|
|
|
@ -563,7 +563,8 @@ MENU(ProgramMenu,
|
|||
|
||||
"Objects", ID_ObjectMenu,
|
||||
"Lists", ID_ListMenu,
|
||||
"Flags", ID_FlagsMenu);
|
||||
"Flags", ID_FlagsMenu,
|
||||
ID_Version);
|
||||
|
||||
|
||||
MENU(TestsMenu,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
#define QSPI_DATA_SIZE 1503812
|
||||
#define QSPI_DATA_SIZE 1503980
|
||||
#define QSPI_DATA_CRC 0x000cfed6
|
||||
|
||||
|
|
Loading…
Reference in a new issue