Browse Source

[build] Use PRODUCT_SHORT_NAME for end-user visible strings

Use PRODUCT_SHORT_NAME instead of a hardcoded "iPXE" for strings which
are typically shown in the user interface.

Note that this only allows for customisation of the user interface.
Where the "iPXE" string serves a technical purpose (such as in the
HTTP User-Agent), the string cannot be customised.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 years ago
parent
commit
544a6a9769
4 changed files with 11 additions and 6 deletions
  1. 2
    1
      src/arch/i386/prefix/romprefix.S
  2. 2
    1
      src/hci/shell.c
  3. 2
    1
      src/hci/tui/settings_ui.c
  4. 5
    3
      src/usr/autoboot.c

+ 2
- 1
src/arch/i386/prefix/romprefix.S View File

590
 	.ascii	"\n"
590
 	.ascii	"\n"
591
 	.ascii	PRODUCT_NAME
591
 	.ascii	PRODUCT_NAME
592
 	.ascii	"\n"
592
 	.ascii	"\n"
593
-	.asciz	"iPXE (http://ipxe.org)"
593
+	.ascii	PRODUCT_SHORT_NAME
594
+	.asciz	" (http://ipxe.org)"
594
 	.size	init_message, . - init_message
595
 	.size	init_message, . - init_message
595
 .ifeqs	BUSTYPE, "PCIR"
596
 .ifeqs	BUSTYPE, "PCIR"
596
 init_message_pci:
597
 init_message_pci:

+ 2
- 1
src/hci/shell.c View File

28
 #include <ipxe/command.h>
28
 #include <ipxe/command.h>
29
 #include <ipxe/parseopt.h>
29
 #include <ipxe/parseopt.h>
30
 #include <ipxe/shell.h>
30
 #include <ipxe/shell.h>
31
+#include <config/branding.h>
31
 
32
 
32
 /** @file
33
 /** @file
33
  *
34
  *
36
  */
37
  */
37
 
38
 
38
 /** The shell prompt string */
39
 /** The shell prompt string */
39
-static const char shell_prompt[] = "iPXE> ";
40
+static const char shell_prompt[] = PRODUCT_SHORT_NAME "> ";
40
 
41
 
41
 /**
42
 /**
42
  * "help" command
43
  * "help" command

+ 2
- 1
src/hci/tui/settings_ui.c View File

30
 #include <ipxe/keys.h>
30
 #include <ipxe/keys.h>
31
 #include <ipxe/ansicol.h>
31
 #include <ipxe/ansicol.h>
32
 #include <ipxe/settings_ui.h>
32
 #include <ipxe/settings_ui.h>
33
+#include <config/branding.h>
33
 
34
 
34
 /** @file
35
 /** @file
35
  *
36
  *
348
 	clearmsg ( TITLE_ROW );
349
 	clearmsg ( TITLE_ROW );
349
 	name = settings_name ( widget->settings );
350
 	name = settings_name ( widget->settings );
350
 	attron ( A_BOLD );
351
 	attron ( A_BOLD );
351
-	msg ( TITLE_ROW, "iPXE configuration settings%s%s",
352
+	msg ( TITLE_ROW, PRODUCT_SHORT_NAME " configuration settings%s%s",
352
 	      ( name[0] ? " - " : "" ), name );
353
 	      ( name[0] ? " - " : "" ), name );
353
 	attroff ( A_BOLD );
354
 	attroff ( A_BOLD );
354
 }
355
 }

+ 5
- 3
src/usr/autoboot.c View File

42
 #include <usr/prompt.h>
42
 #include <usr/prompt.h>
43
 #include <usr/autoboot.h>
43
 #include <usr/autoboot.h>
44
 #include <config/general.h>
44
 #include <config/general.h>
45
+#include <config/branding.h>
45
 
46
 
46
 /** @file
47
 /** @file
47
  *
48
  *
522
 
523
 
523
 	/* Prompt user */
524
 	/* Prompt user */
524
 	printf ( "\n" );
525
 	printf ( "\n" );
525
-	return ( prompt ( "Press Ctrl-B for the iPXE command line...",
526
+	return ( prompt ( "Press Ctrl-B for the " PRODUCT_SHORT_NAME
527
+			  " command line...",
526
 			  ( ( BANNER_TIMEOUT * TICKS_PER_SEC ) / 10 ),
528
 			  ( ( BANNER_TIMEOUT * TICKS_PER_SEC ) / 10 ),
527
 			  CTRL_B ) == 0 );
529
 			  CTRL_B ) == 0 );
528
 }
530
 }
549
 	 * do so.
551
 	 * do so.
550
 	 *
552
 	 *
551
 	 */
553
 	 */
552
-	printf ( NORMAL "\n\n%s\n" BOLD "iPXE %s"
554
+	printf ( NORMAL "\n\n" PRODUCT_NAME "\n" BOLD PRODUCT_SHORT_NAME " %s"
553
 		 NORMAL " -- Open Source Network Boot Firmware -- "
555
 		 NORMAL " -- Open Source Network Boot Firmware -- "
554
 		 CYAN "http://ipxe.org" NORMAL "\n"
556
 		 CYAN "http://ipxe.org" NORMAL "\n"
555
-		 "Features:", product_name, product_version );
557
+		 "Features:", product_version );
556
 	for_each_table_entry ( feature, FEATURES )
558
 	for_each_table_entry ( feature, FEATURES )
557
 		printf ( " %s", feature->name );
559
 		printf ( " %s", feature->name );
558
 	printf ( "\n" );
560
 	printf ( "\n" );

Loading…
Cancel
Save