Repository navigation
Expand file tree
/
Copy pathcreate-package.bat
More file actions
93 lines (82 loc) · 2.18 KB
/
Copy pathcreate-package.bat
File metadata and controls
93 lines (82 loc) · 2.18 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@echo off
echo =====================================
echo Creating PipedProcess NuGet Package
echo =====================================
echo.
REM Check if nuget.exe exists
where nuget >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo ❌ NuGet CLI not found in PATH!
echo.
echo Please install NuGet CLI:
echo 1. Download from: https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
echo 2. Place in PATH or current directory
echo 3. Or install via: winget install Microsoft.NuGet
echo.
pause
exit /b 1
)
REM Verify nuspec file exists
if not exist PipedProcess.nuspec (
echo ❌ PipedProcess.nuspec not found!
echo Make sure you're running this from the project root directory.
pause
exit /b 1
)
REM Verify required files exist
echo Checking required files...
if not exist PipedProcess\PipedProcess.h (
echo ❌ PipedProcess\PipedProcess.h not found!
pause
exit /b 1
)
if not exist PipedProcess\StdPipe.h (
echo ❌ PipedProcess\StdPipe.h not found!
pause
exit /b 1
)
if not exist PipedProcess\UniqueHandle.h (
echo ❌ PipedProcess\UniqueHandle.h not found!
pause
exit /b 1
)
if not exist PipedProcess.targets (
echo ❌ PipedProcess.targets not found!
pause
exit /b 1
)
echo ✅ All required files found.
echo.
REM Clean previous packages
echo Cleaning previous packages...
del PipedProcess.*.nupkg 2>nul
echo Creating NuGet package...
nuget pack PipedProcess.nuspec
if %ERRORLEVEL% neq 0 (
echo.
echo ❌ Package creation FAILED!
echo Check the output above for errors.
pause
exit /b 1
)
echo.
echo ✅ Package created successfully!
echo.
REM Show created package
for %%f in (PipedProcess.*.nupkg) do (
echo 📦 Package: %%f
echo Size:
dir "%%f" | findstr "%%f"
)
echo.
echo Package contents: Headers, MSBuild targets, LICENSE, README.md, and icon
echo Use 7zip or rename to .zip to inspect detailed contents
echo.
echo =====================================
echo Package creation completed!
echo =====================================
echo.
echo To publish to NuGet.org:
echo nuget push PipedProcess.*.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey YOUR_API_KEY
echo.
pause