11@ echo off
2- REM ***********************************************************************
3- REM This bat file uses Aget: https://git.autodesk.com/Dynamo/Aget to
4- REM download the nuget packages from NuGet server or closest Artifactory server for
5- REM
6- REM NuGet Server: https://www.nuget.org
7- REM Santa Clara: https://art-bobcat.autodesk.com
8- REM
9- REM ***********************************************************************
10-
11- setlocal EnableDelayedExpansion
12- setlocal EnableExtensions
13-
14- REM 1. set variable values
15- set DynamoPackages = %~dp0 \packages\_packages
16- echo %DynamoPackages%
17- set CurrentDir = %~dp0
18- if %CurrentDir:~-1 % == \ (
19- set CurrentDir = %CurrentDir:~0 ,-1 %
20- )
21- set ConfigDir = %CurrentDir% \Config
22- set SymLinksDir = %CurrentDir% \packages
23-
24- set NugetExe = %CurrentDir% \Tools\NugetCLI\nuget.exe
25- set AgetFile = %CurrentDir% \Tools\Aget\aget.exe
26- set NugetConfig = %ConfigDir% \dynamo-nuget.config
27-
28- REM 2. download 3rdParty packages by Aget.exe
29- echo Running Python script from %AgetFile% using dynamo-nuget.config file
30- REM TODO: check if this actually works with .NET 10 version of Dynamo
31- REM Auto-detect default platform from solution file
32- set SolutionFile = %CurrentDir% \DynamoRevit.All.sln
33- echo SolutionFile is %SolutionFile%
34- if exist " %SolutionFile% " (
35- REM Find the first platform in SolutionConfigurationPlatforms section
36- for /f " tokens=1 delims=|" %%i in ('findstr /R " Debug|.*=" " %SolutionFile% " ^ | findstr /V " SolutionConfigurationPlatforms" ') do (
37- set Framework = %%i
38- set FrameworkFound = true
39- break
40- )
41- ) else echo " %SolutionFile% " does not exist!
42- echo Found framework: %Framework%
43- set Framework = NET100
44- echo Using framework: %Framework%
45- set PythonAget = " %AgetFile% " -os win -config release -iset intel64 -toolchain v140 -linkage shared -packagesDir " %DynamoPackages% " -nuget " %NugetExe% " -framework %Framework% -nugetConfig " %NugetConfig% "
46-
47- call :TrackTime " [Aget] Downloading NuGet packages from the NuGet Gallery and the Artifactory server, might take a while if running for the first time."
48- echo If any package is not found in the NuGet Gallery, redirect to look up in the Artifactory server...
49-
50- :: Symlinks are generated here
51- echo COMMAND: %PythonAget% -agettable " %ConfigDir% \packages.aget" -refsDir " %SymLinksDir% "
52- %PythonAget% -agettable " %ConfigDir% \packages.aget" -refsDir " %SymLinksDir% "
53- if not ERRORLEVEL 0 (
54- echo ERROR %ERRORLEVEL% : Failed to update Dynamo 3rdParty nuget packages in packages.aget
55- exit /b 1
56- )
57- call :TrackTime " %~n0 : exiting from batch script"
58- endlocal
59- exit /b 0
60- :TrackTime
61- echo ========================================================
62- echo %~1
63- time /t
64- echo ========================================================
2+ echo skipping Restoring packages with aget (for testing)...
0 commit comments