update to make current FreeDOS style package, not 1.0 version

This commit is contained in:
Kenneth J Davis 2021-05-14 22:57:59 -04:00
parent 46c1ec3b4a
commit 00daebd468
2 changed files with 33 additions and 18 deletions

View File

@ -3,6 +3,8 @@ IF "%1"=="" GOTO USAGE
REM assumes ran in same directory as this file, ie base of kernel source REM assumes ran in same directory as this file, ie base of kernel source
SET BASEPATH=%CD% SET BASEPATH=%CD%
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 REM when called from RELEASE.BAT assume clean source exported from version control
IF "%2"=="RELEASE" GOTO PACK IF "%2"=="RELEASE" GOTO PACK
@ -30,8 +32,19 @@ GOTO LSM
REM remove CONFIG.BAT if exists, such as building packages from develoment directory 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 IF EXIST SOURCE\ke%1\CONFIG.BAT DEL SOURCE\ke%1\CONFIG.BAT > NUL
ECHO zipping source ECHO zipping source
7z.exe a -tzip -mx9 -mpass15 -r ke%1s.zip SOURCE\* %ZIPIT% ke%1s.zip SOURCE\*
ECHO creating APPINFO and expected packaging dir structure 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 ECHO using working configuration file
COPY %BASEPATH%\CONFIG.BAT SOURCE\ke%1\ > NUL COPY %BASEPATH%\CONFIG.BAT SOURCE\ke%1\ > NUL
CD SOURCE\ke%1 CD SOURCE\ke%1
@ -39,17 +52,23 @@ CD SOURCE\ke%1
ECHO build and packaging ECHO build and packaging
SET VERSION=%1 (FAT12/FAT16) SET VERSION=%1 (FAT12/FAT16)
SET FAT=16 SET FAT=16
SET CPU=86
SET BZKRET=F16 SET BZKRET=F16
GOTO BZK GOTO BZK
:F16 :F16
SET VERSION=%1 (FAT12/FAT16/FAT32) SET VERSION=%1 (FAT12/FAT16/FAT32)
SET FAT=32 SET FAT=32
SET CPU=386
SET BZKRET=F32 SET BZKRET=F32
GOTO BZK GOTO BZK
:F32 :F32
ECHO building FreeDOS package
CD ..\..\PACKAGE
%ZIPIT% ..\kernel.zip APPINFO BIN DOC SOURCE
ECHO clean up ECHO clean up
CD ..\.. CD ..
RMDIR /S /Q SOURCE > NUL RMDIR /S /Q SOURCE > NUL
RMDIR /S /Q PACKAGE > NUL
ECHO Done. ECHO Done.
SET BZKRET= SET BZKRET=
GOTO DONE GOTO DONE
@ -57,27 +76,23 @@ GOTO DONE
:BZK :BZK
ECHO build kernel %VERSION% ECHO build kernel %VERSION%
CALL build.bat /D KERNEL_VERSION /V "%1 " 86 win upx fat%FAT% CALL build.bat /D KERNEL_VERSION /V "%1 " %CPU% win upx fat%FAT%
DEL BIN\K??86??.sys DEL BIN\K*86??.sys
SET LSMRET=BZK_2 SET LSMRET=BZK_2
SET LSMFILE=docs\fdkernel.lsm SET LSMFILE=docs\fdkernel.lsm
GOTO LSM GOTO LSM
:BZK_2 :BZK_2
SET LSMRET= SET LSMRET=
ECHO zipping FAT%FAT% release version ECHO zipping FAT%FAT% release version
7z.exe a -tzip -mx9 -mpass15 -r ..\..\ke%1_86f%FAT%.zip BIN\* DOCS\* %ZIPIT% ..\..\ke%1_%CPU%f%FAT%.zip BIN\* DOCS\*
ECHO restructuring and zipping update package ECHO storing binaries for FreeDOS package
DEL BIN\K??86??.* > NUL COPY BIN\KERNEL.SYS ..\..\PACKAGE\BIN\KERNL%CPU%.SYS
MKDIR DOC COPY /B /Y BIN\country.sys ..\..\PACKAGE\BIN\COUNTRY.SYS
MKDIR DOC\KERNEL COPY /B /Y BIN\setver.sys ..\..\PACKAGE\BIN\SETVER.SYS
COPY DOCS\* DOC\KERNEL\ COPY /B /Y BIN\sys.com ..\..\PACKAGE\BIN\SYS.COM
MKDIR APPINFO IF EXIST BIN\share.com COPY /B /Y BIN\share.com ..\..\PACKAGE\BIN\SHARE.COM
MOVE DOC\KERNEL\*.lsm APPINFO\
7z.exe a -tzip -mx9 -mpass15 -r ..\..\kernel%FAT%.zip APPINFO\* BIN\* DOC\*
ECHO cleaning up between builds ECHO cleaning up between builds
CALL clobber.bat CALL clobber.bat
RMDIR /S /Q DOC
RMDIR /S /Q APPINFO
GOTO %BZKRET% GOTO %BZKRET%
:LSM :LSM
@ -105,4 +120,4 @@ ECHO Build kernel packages (interim builds or release without tagging) - usage:
:DONE :DONE
CD %BASEPATH% CD %BASEPATH%
SET BASEPATH= SET BASEPATH=
SET ZIPIT=

View File

@ -1,4 +1,4 @@
rem @echo off @echo off
rem batch file to build everything rem batch file to build everything
rem IF NOTHING COMPILES, CHECK IF YOUR CVS CHECKOUT USES CORRECT DOS LINEBREAKS rem IF NOTHING COMPILES, CHECK IF YOUR CVS CHECKOUT USES CORRECT DOS LINEBREAKS