mirror of
https://github.com/janet-lang/janet
synced 2024-12-25 07:50:27 +00:00
Add build commit hash to windows build from appveyor.
This commit is contained in:
parent
c35d6d2396
commit
0360942942
@ -18,6 +18,7 @@ init:
|
|||||||
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
|
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
- set JANET_BUILD=%appveyor_repo_commit:~0,7%
|
||||||
- choco install nsis -y -pre
|
- choco install nsis -y -pre
|
||||||
# Replace makensis.exe and files with special long string build. This should
|
# Replace makensis.exe and files with special long string build. This should
|
||||||
# prevent issues when setting PATH during installation.
|
# prevent issues when setting PATH during installation.
|
||||||
|
@ -23,36 +23,41 @@
|
|||||||
@set JANET_LINK=link /nologo
|
@set JANET_LINK=link /nologo
|
||||||
@set JANET_LINK_STATIC=lib /nologo
|
@set JANET_LINK_STATIC=lib /nologo
|
||||||
|
|
||||||
|
@rem Add janet build tag
|
||||||
|
if not "%JANET_BUILD%" == "" (
|
||||||
|
@set JANET_COMPILE=%JANET_COMPILE% /DJANET_BUILD="\"%JANET_BUILD%\""
|
||||||
|
)
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
mkdir build\core
|
mkdir build\core
|
||||||
mkdir build\mainclient
|
mkdir build\mainclient
|
||||||
mkdir build\boot
|
mkdir build\boot
|
||||||
|
|
||||||
@rem Build the xxd tool for generating sources
|
@rem Build the xxd tool for generating sources
|
||||||
@cl /nologo /c tools/xxd.c /Fobuild\xxd.obj
|
cl /nologo /c tools/xxd.c /Fobuild\xxd.obj
|
||||||
@if errorlevel 1 goto :BUILDFAIL
|
@if errorlevel 1 goto :BUILDFAIL
|
||||||
@link /nologo /out:build\xxd.exe build\xxd.obj
|
link /nologo /out:build\xxd.exe build\xxd.obj
|
||||||
@if errorlevel 1 goto :BUILDFAIL
|
@if errorlevel 1 goto :BUILDFAIL
|
||||||
|
|
||||||
@rem Generate the embedded sources
|
@rem Generate the embedded sources
|
||||||
@build\xxd.exe src\mainclient\init.janet build\init.gen.c janet_gen_init
|
build\xxd.exe src\mainclient\init.janet build\init.gen.c janet_gen_init
|
||||||
@if errorlevel 1 goto :BUILDFAIL
|
@if errorlevel 1 goto :BUILDFAIL
|
||||||
@build\xxd.exe src\boot\boot.janet build\boot.gen.c janet_gen_boot
|
build\xxd.exe src\boot\boot.janet build\boot.gen.c janet_gen_boot
|
||||||
@if errorlevel 1 goto :BUILDFAIL
|
@if errorlevel 1 goto :BUILDFAIL
|
||||||
|
|
||||||
@rem Build the generated sources
|
@rem Build the generated sources
|
||||||
@%JANET_COMPILE% /Fobuild\mainclient\init.gen.obj build\init.gen.c
|
%JANET_COMPILE% /Fobuild\mainclient\init.gen.obj build\init.gen.c
|
||||||
@if errorlevel 1 goto :BUILDFAIL
|
@if errorlevel 1 goto :BUILDFAIL
|
||||||
@%JANET_COMPILE% /Fobuild\boot\boot.gen.obj build\boot.gen.c
|
%JANET_COMPILE% /Fobuild\boot\boot.gen.obj build\boot.gen.c
|
||||||
@if errorlevel 1 goto :BUILDFAIL
|
@if errorlevel 1 goto :BUILDFAIL
|
||||||
|
|
||||||
@rem Build the bootstrap interpreter
|
@rem Build the bootstrap interpreter
|
||||||
for %%f in (src\core\*.c) do (
|
for %%f in (src\core\*.c) do (
|
||||||
@%JANET_COMPILE% /DJANET_BOOTSTRAP /Fobuild\boot\%%~nf.obj %%f
|
%JANET_COMPILE% /DJANET_BOOTSTRAP /Fobuild\boot\%%~nf.obj %%f
|
||||||
@if errorlevel 1 goto :BUILDFAIL
|
@if errorlevel 1 goto :BUILDFAIL
|
||||||
)
|
)
|
||||||
for %%f in (src\boot\*.c) do (
|
for %%f in (src\boot\*.c) do (
|
||||||
@%JANET_COMPILE% /DJANET_BOOTSTRAP /Fobuild\boot\%%~nf.obj %%f
|
%JANET_COMPILE% /DJANET_BOOTSTRAP /Fobuild\boot\%%~nf.obj %%f
|
||||||
@if errorlevel 1 goto :BUILDFAIL
|
@if errorlevel 1 goto :BUILDFAIL
|
||||||
)
|
)
|
||||||
%JANET_LINK% /out:build\janet_boot.exe build\boot\*.obj
|
%JANET_LINK% /out:build\janet_boot.exe build\boot\*.obj
|
||||||
@ -60,12 +65,12 @@ for %%f in (src\boot\*.c) do (
|
|||||||
build\janet_boot build\core_image.c
|
build\janet_boot build\core_image.c
|
||||||
|
|
||||||
@rem Build the core image
|
@rem Build the core image
|
||||||
@%JANET_COMPILE% /Fobuild\core_image.obj build\core_image.c
|
%JANET_COMPILE% /Fobuild\core_image.obj build\core_image.c
|
||||||
@if errorlevel 1 goto :BUILDFAIL
|
@if errorlevel 1 goto :BUILDFAIL
|
||||||
|
|
||||||
@rem Build the sources
|
@rem Build the sources
|
||||||
for %%f in (src\core\*.c) do (
|
for %%f in (src\core\*.c) do (
|
||||||
@%JANET_COMPILE% /Fobuild\core\%%~nf.obj %%f
|
%JANET_COMPILE% /Fobuild\core\%%~nf.obj %%f
|
||||||
@if errorlevel 1 goto :BUILDFAIL
|
@if errorlevel 1 goto :BUILDFAIL
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -74,7 +79,7 @@ rc /nologo /fobuild\janet_win.res janet_win.rc
|
|||||||
|
|
||||||
@rem Build the main client
|
@rem Build the main client
|
||||||
for %%f in (src\mainclient\*.c) do (
|
for %%f in (src\mainclient\*.c) do (
|
||||||
@%JANET_COMPILE% /Fobuild\mainclient\%%~nf.obj %%f
|
%JANET_COMPILE% /Fobuild\mainclient\%%~nf.obj %%f
|
||||||
@if errorlevel 1 goto :BUILDFAIL
|
@if errorlevel 1 goto :BUILDFAIL
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ Name "Janet"
|
|||||||
!define DOLLAR "$"
|
!define DOLLAR "$"
|
||||||
!ifdef CHECK_${DOLLAR}%APPVEYOR_REPO_TAG_NAME%
|
!ifdef CHECK_${DOLLAR}%APPVEYOR_REPO_TAG_NAME%
|
||||||
# We are not in the appveyor environment, use version name
|
# We are not in the appveyor environment, use version name
|
||||||
!define OUTNAME_PART v${VERSION}-nonrelease-
|
!define OUTNAME_PART v${VERSION}
|
||||||
!else
|
!else
|
||||||
# We are in appveyor, use git tag name for installer
|
# We are in appveyor, use git tag name for installer
|
||||||
!define OUTNAME_PART ${OUTNAME}
|
!define OUTNAME_PART ${OUTNAME}
|
||||||
|
Loading…
Reference in New Issue
Block a user