diff --git a/MAKEPKGS.BAT b/MAKEPKGS.BAT index 750df44..5ca72f2 100644 --- a/MAKEPKGS.BAT +++ b/MAKEPKGS.BAT @@ -3,6 +3,8 @@ IF "%1"=="" GOTO USAGE REM assumes ran in same directory as this file, ie base of kernel source SET BASEPATH=%CD% CD .. +REM setup command aliases +SET ZIPIT=7z.exe a -tzip -mx9 -mm=deflate -mpass15 -r REM when called from RELEASE.BAT assume clean source exported from version control IF "%2"=="RELEASE" GOTO PACK @@ -30,8 +32,19 @@ GOTO LSM REM remove CONFIG.BAT if exists, such as building packages from develoment directory IF EXIST SOURCE\ke%1\CONFIG.BAT DEL SOURCE\ke%1\CONFIG.BAT > NUL ECHO zipping source -7z.exe a -tzip -mx9 -mpass15 -r ke%1s.zip SOURCE\* -ECHO creating APPINFO and expected packaging dir structure +%ZIPIT% ke%1s.zip SOURCE\* +ECHO gathering source and creating APPINFO and expected packaging dir structure +REM FreeDOS package format, has APPINFO, BIN, DOC\KERNEL, SOURCE\KERNEL\ +MKDIR PACKAGE +MKDIR PACKAGE\SOURCE +XCOPY /S /I /Q SOURCE\ke%1 PACKAGE\SOURCE\KERNEL +MKDIR PACKAGE\DOC +MKDIR PACKAGE\DOC\KERNEL +COPY /N SOURCE\ke%1\DOCS\* PACKAGE\DOC\KERNEL\ +COPY SOURCE\ke%1\COPYING PACKAGE\DOC\KERNEL\COPYING +MKDIR PACKAGE\APPINFO +MOVE PACKAGE\DOC\KERNEL\fdkernel.lsm PACKAGE\APPINFO\KERNEL.LSM +MKDIR PACKAGE\BIN ECHO using working configuration file COPY %BASEPATH%\CONFIG.BAT SOURCE\ke%1\ > NUL CD SOURCE\ke%1 @@ -39,17 +52,23 @@ CD SOURCE\ke%1 ECHO build and packaging SET VERSION=%1 (FAT12/FAT16) SET FAT=16 +SET CPU=86 SET BZKRET=F16 GOTO BZK :F16 SET VERSION=%1 (FAT12/FAT16/FAT32) SET FAT=32 +SET CPU=386 SET BZKRET=F32 GOTO BZK :F32 +ECHO building FreeDOS package +CD ..\..\PACKAGE +%ZIPIT% ..\kernel.zip APPINFO BIN DOC SOURCE ECHO clean up -CD ..\.. +CD .. RMDIR /S /Q SOURCE > NUL +RMDIR /S /Q PACKAGE > NUL ECHO Done. SET BZKRET= GOTO DONE @@ -57,27 +76,23 @@ GOTO DONE :BZK ECHO build kernel %VERSION% -CALL build.bat /D KERNEL_VERSION /V "%1 " 86 win upx fat%FAT% -DEL BIN\K??86??.sys +CALL build.bat /D KERNEL_VERSION /V "%1 " %CPU% win upx fat%FAT% +DEL BIN\K*86??.sys SET LSMRET=BZK_2 SET LSMFILE=docs\fdkernel.lsm GOTO LSM :BZK_2 SET LSMRET= ECHO zipping FAT%FAT% release version -7z.exe a -tzip -mx9 -mpass15 -r ..\..\ke%1_86f%FAT%.zip BIN\* DOCS\* -ECHO restructuring and zipping update package -DEL BIN\K??86??.* > NUL -MKDIR DOC -MKDIR DOC\KERNEL -COPY DOCS\* DOC\KERNEL\ -MKDIR APPINFO -MOVE DOC\KERNEL\*.lsm APPINFO\ -7z.exe a -tzip -mx9 -mpass15 -r ..\..\kernel%FAT%.zip APPINFO\* BIN\* DOC\* +%ZIPIT% ..\..\ke%1_%CPU%f%FAT%.zip BIN\* DOCS\* +ECHO storing binaries for FreeDOS package +COPY BIN\KERNEL.SYS ..\..\PACKAGE\BIN\KERNL%CPU%.SYS +COPY /B /Y BIN\country.sys ..\..\PACKAGE\BIN\COUNTRY.SYS +COPY /B /Y BIN\setver.sys ..\..\PACKAGE\BIN\SETVER.SYS +COPY /B /Y BIN\sys.com ..\..\PACKAGE\BIN\SYS.COM +IF EXIST BIN\share.com COPY /B /Y BIN\share.com ..\..\PACKAGE\BIN\SHARE.COM ECHO cleaning up between builds CALL clobber.bat -RMDIR /S /Q DOC -RMDIR /S /Q APPINFO GOTO %BZKRET% :LSM @@ -105,4 +120,4 @@ ECHO Build kernel packages (interim builds or release without tagging) - usage: :DONE CD %BASEPATH% SET BASEPATH= - +SET ZIPIT= diff --git a/build.bat b/build.bat index ca5e187..20125ea 100644 --- a/build.bat +++ b/build.bat @@ -1,4 +1,4 @@ -rem @echo off +@echo off rem batch file to build everything rem IF NOTHING COMPILES, CHECK IF YOUR CVS CHECKOUT USES CORRECT DOS LINEBREAKS