1 @if not defined _echo @echo off
4 if /I [%1] == [] goto Usage
5 if /I [%1] == [build] goto ModuleBuild
6 if /I [%1] == [full] goto FullBuild
7 if /I [%1] == [dummy] goto DummyBuild
8 if /I [%1] == [pack] goto Pack
9 if /I [%1] == [clean] goto Clean
14 echo Usage: %0 [command] [args]
16 echo build [module] Build a specific module
17 echo full Build all modules in src/ directory
18 echo dummy Generate dummy assemblies of all modules
19 echo pack [version] Make a NuGet package with build artifacts
20 echo clean Clean all artifacts
26 echo No module specified.
29 call dotnet msbuild %~dp0build\build.proj /nologo /t:restore /p:Project=%2
30 call dotnet msbuild %~dp0build\build.proj /nologo /t:build /p:Project=%2
34 call dotnet msbuild %~dp0build\build.proj /nologo /t:clean
35 call dotnet msbuild %~dp0build\build.proj /nologo /t:restore
36 call dotnet msbuild %~dp0build\build.proj /nologo /t:build
40 call dotnet build %~dp0build\build.dummy.csproj
45 set VERSION_INTERNAL=%3
46 call :GetUnixTime TIMESTAMP
47 if /I [%VERSION%] == [] set VERSION=4.0.1-local-%TIMESTAMP%
48 if /I [%VERSION_INTERNAL%] == [] set VERSION_INTERNAL=%VERSION%
49 set OUTDIR=%~dp0Artifacts
50 set NUGET_CMD=%~dp0tools\NuGet.exe
51 %NUGET_CMD% pack %~dp0pkg\Tizen.NET.nuspec -NoPackageAnalysis -Version %VERSION% -BasePath %~dp0 -OutputDirectory %OUTDIR%
52 %NUGET_CMD% pack %~dp0pkg\Tizen.NET.Internals.nuspec -NoPackageAnalysis -Version %VERSION_INTERNAL% -BasePath %~dp0 -OutputDirectory %OUTDIR%
56 call dotnet msbuild %~dp0build\build.proj /nologo /t:clean
60 setlocal enableextensions
61 for /f %%x in ('wmic path win32_utctime get /format:list ^| findstr "="') do (
63 set /a z=(14-100%Month%%%100)/12, y=10000%Year%%%10000-z
64 set /a ut=y*365+y/4-y/100+y/400+(153*(100%Month%%%100+12*z-3)+2)/5+Day-719469
65 set /a ut=ut*86400+100%Hour%%%100*3600+100%Minute%%%100*60+100%Second%%%100
66 endlocal & set "%1=%ut%" & goto :EOF