Changeset 186


Ignore:
Timestamp:
Nov 7, 2017, 7:12:52 AM (8 years ago)
Author:
Ben Rietbroek
Message:

Improved language selection [v1.1.1-testing]

The old method copied the language specific files to a central location
before starting the build. This is a bit annoying when using version
control because the copied files get marked as changed, blurring the
current state of the work directory. Also, the specific language files
from the last build are always the active ones.

The new method conditionally includes the specific language files based
upon the BLD_LANG definition, which is passed on the cli. No more file
copying for specific language builds.

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.0-manual.pdf

Location:
trunk
Files:
3 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootcode/Makefile

    r185 r186  
    160160# -Zd   = line number debug info
    161161# -Zi   = symbolic debug info
    162 ASM_FLAGS_D0=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DJWASM -DBLD_LANG="'$(%BLD_LANG)'" $(%JWASM_DEFINES) -q -W0 -Cp -zcw -Fo$^. -Sa $(JWASM_LIST_FILE) -Fw$^&.err
    163 ASM_FLAGS_D1=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DJWASM -DBLD_LANG="'$(%BLD_LANG)'" $(%JWASM_DEFINES) -q -W4 -Cp -zcw -Fo$^. -Sa $(JWASM_LIST_FILE) -Fw$^&.err
    164 ASM_FLAGS_D2=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DJWASM -DBLD_LANG="'$(%BLD_LANG)'" $(%JWASM_DEFINES) -q -WX -Cp -zcw -Fo$^. -Sa $(JWASM_LIST_FILE) -Fw$^&.err
     162ASM_FLAGS_D0=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DJWASM -DBLD_LANG="$(%BLD_LANG)" $(%JWASM_DEFINES) -q -W0 -Cp -zcw -Fo$^. -Sa $(JWASM_LIST_FILE) -Fw$^&.err
     163ASM_FLAGS_D1=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DJWASM -DBLD_LANG="$(%BLD_LANG)" $(%JWASM_DEFINES) -q -W4 -Cp -zcw -Fo$^. -Sa $(JWASM_LIST_FILE) -Fw$^&.err
     164ASM_FLAGS_D2=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DJWASM -DBLD_LANG="$(%BLD_LANG)" $(%JWASM_DEFINES) -q -WX -Cp -zcw -Fo$^. -Sa $(JWASM_LIST_FILE) -Fw$^&.err
    165165# Workaround for JWasm list-file generation.
    166166# Generate the list-file on a local drive so JWasm doen't take forever.
     
    289289
    290290# -----------------------------------------------------------------------------
    291 # LANGUAGE SETUP
    292 # -----------------------------------------------------------------------------
    293 # Setup the relevant language files.
    294 # This is done by generating include-files for the specified language.
    295 # This is a 'pre-action' before assembling the AiR-BOOT.ASM source.
    296 # -----------------------------------------------------------------------------
    297 langsetup: .SYMBOLIC .MULTIPLE
    298 # Default to development language is none defined.
    299 !if "$(%BLD_LANG)"==""
    300 #~ %BLD_LANG=DEV_BLD_LANG
    301 !endif
    302 # Generate include-files for specified language.
    303 # After this, the Assembly sources are setup for the specified language.
    304 # Note that this target is not used as a 'dependency' but 'called' explicitly
    305 # by the $(BLD_LANGUAGES) target.
    306 !ifdef __LINUX__
    307         @bash -c 'echo -e "include text/$(%BLD_LANG)/mbr.asm\r">   text$(DS)txtmbr.asm'
    308         @bash -c 'echo -e "include text/$(%BLD_LANG)/menus.asm\r"> text$(DS)txtmenus.asm'
    309         @bash -c 'echo -e "include text/$(%BLD_LANG)/other.asm\r"> text$(DS)txtother.asm'
    310 !else
    311         @echo include text/$(%BLD_LANG)/mbr.asm>   text$(DS)txtmbr.asm
    312         @echo include text/$(%BLD_LANG)/menus.asm> text$(DS)txtmenus.asm
    313         @echo include text/$(%BLD_LANG)/other.asm> text$(DS)txtother.asm
    314 !endif
    315 
    316 
    317 # -----------------------------------------------------------------------------
    318291# BUILD ALL LANGUAGES
    319292# -----------------------------------------------------------------------------
     
    328301        @%MAKE clean
    329302        @%MAKE rmbin
    330         @%MAKE langsetup
    331303        @%MAKE $(TARGET)
    332304# Checking %AB_DEV does not work from target 'dev:' when non-recursively
  • trunk/bootcode/airboot.asm

    r185 r186  
    2929
    3030;
     31; This one should never be undefined, but if so, then default to English.
     32;
     33IFNDEF  BLD_LANG
     34BLD_LANG    EQU     en
     35ENDIF
     36
     37;
    3138; Include AiR-BOOT Version Information.
    3239; This version-info is defined using simpel EQU's so it can serve as a
     
    4855include ../include/asm.inc
    4956
     57;
     58; The BLD_LANG is passed as an unquoted string so it can be used with
     59; the 'include' directive. But for other language conditional actions a quoted
     60; version is needed. This macro creates BLD_LANG_TXT holding the language
     61; in single quotes.
     62;
     63enquote BLD_LANG,%BLD_LANG
    5064
    5165; We actually don't want to use this directive because it generates extra
     
    101115; different from being 'slash-dotted' ... ;)
    102116;
    103 IF  BLD_LANG EQ 'en'
     117IF  BLD_LANG_TXT EQ 'en'
    104118IFNDEF  AUX_DEBUG
    105119FX_ENABLED      EQU
     
    884898
    885899;------------------------------------------------------------------------------
    886 include text/txtmbr.asm                        ; All translateable Text in MBR
     900include_from text/%BLD_LANG,mbr.asm            ; All translateable Text in MBR
    887901;------------------------------------------------------------------------------
    888902
     
    17381752
    17391753b_txtother:
    1740 include text/txtother.asm       ; All translateable Text-Strings
     1754include_from text/%BLD_LANG,other.asm   ; All translateable Text-Strings
    17411755size_txtother = $-b_txtother
    17421756
    17431757b_txtmenus:
    1744 include text/txtmenus.asm       ; All translateable Menu-text
     1758include_from text/%BLD_LANG,menus.asm   ; All translateable Menu-text
    17451759size_txtmenus = $-b_txtmenus
    17461760
  • trunk/bootcode/fc.mnu

    r184 r186  
    44
    55B:      Build Development Version [EN]
    6         wmake -h dev %BLDLVL_VENDOR= %BLDLVL_MACHINE= %CRC_IGNORE=y
     6        wmake -h dev DEV_BLD_LANG=en %BLDLVL_VENDOR= %BLDLVL_MACHINE= %CRC_IGNORE=y
    77V:      Build Vendor Dev  Version [EN]
    8         wmake -h dev
     8        wmake -h dev DEV_BLD_LANG=en
    99M:      Build Development Version [??]
    1010{
  • trunk/include/asm.inc

    r122 r186  
    247247
    248248
     249;
     250; This macro composes a path and file to load in include file.
     251; It is used to include language specific files by using the BLD_LANG value.
     252;
     253include_from   MACRO   loc,file
     254    include loc/file
     255ENDM
     256
     257
     258;
     259; This macro creates a new symbol ending with '_TXT' which has the value of
     260; the original symbol put in single quotes. It is used to do language specific
     261; actions based on the BLD_LANG value.
     262;
     263enquote   MACRO   symname,symval
     264    symname&_TXT    EQU '&symval&'
     265ENDM
     266
     267
    249268; Shortcuts for pointer-types
    250269bptr                             equ   byte ptr
Note: See TracChangeset for help on using the changeset viewer.