GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — delphi7-batch-build-scripts/SetBuildDate.bat at master · r3code/delphi7-batch-build-scripts

Expand file tree

/

SetBuildDate.bat

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
53 lines (46 loc) · 1.72 KB
/

SetBuildDate.bat

Copy path

File metadata and controls

53 lines (46 loc) · 1.72 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
REM CommandInterpreter: $(COMSPEC)
@echo off
:: Ñîçäàåò .inc ôàéë ñ êîíñòàíòàìè äëÿ èñïîëüçîâàíèÿ â ïðîåêòå,
:: êîíñòàíòû ñîäåðæàò äàòó è âðåìÿ íà ìîìåíò çàïóñêà.
:: Èñïîëüçîâàòü ïåðåä ñáîðêîé, ÷òîáû â ïðîãðàììà èñïîëüçîâàëà íîâûå êîíñòàíòû.
:: Äîëæåí âûçûâàòüñÿ ïåðåä ñáîðêîé ïðîåêòà.
:: Â ïàðàìåòð ïåðåäàþò ïóòü ê ôàéëó êóäà çàïèñàòü äàííûå, ýòî ïîçâîëÿåò ñîçäàâàòü
:: òàêèå ôàéëû äëÿ ëþáîãî ïðîåêòà, óêàçûâàÿ ðàçíûå èìåíà.
:: Ïðèíÿòî çäàâàèòü èìÿ â íà÷àëå óêàçûâàÿ èìÿ ïðîåêòà.
:: Ïðèìåð: QportBuildDate.inc
setlocal enabledelayedexpansion
setlocal
rem determine project top level directory from command file name
set PRJDIR=%~dp0
::set me=%~n0
cd %PRJDIR%
set BUILD_DATE_FILE=%~1
if "%BUILD_DATE_FILE%" == "" (
echo Usage: %~n0 output_file_path/filename.inc
echo ERROR output .inc file path not set.
exit /b 1
)
echo Create BuildDateFile '%BUILD_DATE_FILE%'
call :GetGurrentDateTime&set BUILD_YEAR=!current_year!&set BUILD_MONTH=!current_month!&set BUILD_DAY=!current_day!&set BUILD_TIME=!current_time!
echo const BUILD_YEAR = %BUILD_YEAR%;> "%BUILD_DATE_FILE%"
:: 3 letter name Apr for April
echo const BUILD_MONTH = '%BUILD_MONTH%';>> "%BUILD_DATE_FILE%"
echo const BUILD_DAY = %BUILD_DAY%;>> "%BUILD_DATE_FILE%"
echo const BUILD_TIME = '%BUILD_TIME%';>> "%BUILD_DATE_FILE%"
echo OK. Created '%BUILD_DATE_FILE%'
goto :EOF
echo Done
exit /b 0
:GetGurrentDateTime
rem GET CURRENT DATE
echo.>"%TEMP%\~.ddf"
makecab /D RptFileName="%TEMP%\~.rpt" /D InfFileName="%TEMP%\~.inf" -f "%TEMP%\~.ddf">nul
for /f "tokens=4,5,6,7" %%a in ('type "%TEMP%\~.rpt"') do (
if not defined current_date (
set "current_date=%%d-%%a-%%b"
set "current_time=%%c"
set "current_year=%%d"
set "current_month=%%a"
set "current_day=%%b"
)
)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.