Override OSNAME to change the name of the OS in the installer.
This is a first step, the shell script changes will be a separate review.
Differential D34878
bsdinstall: allow whitelabeling the installer brd on Apr 11 2022, 1:25 AM. Authored by Tags None Referenced Files
Subscribers
Details Override OSNAME to change the name of the OS in the installer. This is a first step, the shell script changes will be a separate review.
Diff Detail
Event TimelineComment Actions hi @brd, I tested the 'partedit' and it seems all right.
Comment Actions The review is accepted already, I did just some test because the topic is interesting and I had the same problem in the past (solved by hardcode :-) ). BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distextract .if defined (OSNAME) LABEL="${OSNAME}" .else LABEL="FreeBSD" .endif CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -D OSNAME=\"${LABEL}\" LIBADD= archive bsddialog m MAN= .include <bsd.prog.mk> Without a defined OSNAME: ┌──────────────────────┤Partition Editor├───────────────────────┐ │ Create partitions for FreeBSD, F1 for help. │ │ No changes will be made until you select Finish. │ │ │ ...FreeBSD... OK! with a defined OSNAME % make clean ; make cleandir ; env OSNAME="MY BSD OS" make ; ./partedit ┌──────────────────────┤Partition Editor├───────────────────────┐ │ Create partitions for MY BSD OS, F1 for help. │ │ No changes will be made until you select Finish. │ │ │ ...MY BSD OS... OK! If we define a variable with the makefile % make -D OSNAME LABEL will be 1 (one), so we could solve setting the value in Makefile: .if defined (OSNAME) LABEL="MY BSD OS" .else LABEL="FreeBSD" .endif CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -D OSNAME=\"${LABEL}\" Then we can switch the label like early. ...just 2 cent to remember to myself :-), of course I' ll continue to investigate or ask to some expert. Comment Actions @asiciliano The reason I did it using a file is so that make(1) would detect a change a rebuild if you change the value and do another build. Comment Actions @brd The review is ok, I posted some test to remember to myself and to ask to somebody, I had a similar situation in the past. I'm sorry if it was unclear and boring. Comment Actions OK, cool, I just wanted to make sure the reasoning for doing what I did was understood. Thanks for the review :) |