-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-wp81-sample.bat
More file actions
126 lines (106 loc) · 3.51 KB
/
build-wp81-sample.bat
File metadata and controls
126 lines (106 loc) · 3.51 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
@echo off
REM CLRNet WP8.1 Sample App - Complete Build and Setup Script
echo =======================================================
echo CLRNet Windows Phone 8.1 Sample App - Build Setup
echo =======================================================
REM Navigate to the sample app directory
cd /d "%~dp0\examples\WP81Integration"
echo Current directory: %CD%
echo.
REM Ensure all required directories exist
echo Creating required directories...
if not exist "CLRNet" mkdir CLRNet
if not exist "bin\ARM\Debug" mkdir bin\ARM\Debug
if not exist "bin\ARM\Release" mkdir bin\ARM\Release
REM Copy CLRNet binaries if they exist in the main build directory
if exist "..\..\build\bin\ARM\Release\CLRNetCore.dll" (
echo Copying CLRNet binaries from main build...
copy "..\..\build\bin\ARM\Release\CLRNet*.dll" "CLRNet\" >nul
copy "..\..\build\bin\ARM\Release\CLRNetHost.exe" "CLRNet\" >nul
) else (
echo CLRNet binaries already present in project directory
)
REM Ensure SamplePlugin.dll exists
if not exist "SamplePlugin.dll" (
echo Creating SamplePlugin.dll placeholder...
echo Sample Plugin Assembly - CLRNet Demo > SamplePlugin.dll
)
REM Verify all required files are present
echo.
echo Verifying required files...
set "MISSING_FILES="
if not exist "CLRNet\CLRNetCore.dll" (
echo ❌ Missing: CLRNetCore.dll
set "MISSING_FILES=1"
) else (
echo ✓ CLRNetCore.dll found
)
if not exist "CLRNet\CLRNetInterop.dll" (
echo ❌ Missing: CLRNetInterop.dll
set "MISSING_FILES=1"
) else (
echo ✓ CLRNetInterop.dll found
)
if not exist "CLRNet\CLRNetSystem.dll" (
echo ❌ Missing: CLRNetSystem.dll
set "MISSING_FILES=1"
) else (
echo ✓ CLRNetSystem.dll found
)
if not exist "CLRNet\CLRNetHost.exe" (
echo ❌ Missing: CLRNetHost.exe
set "MISSING_FILES=1"
) else (
echo ✓ CLRNetHost.exe found
)
if not exist "SamplePlugin.dll" (
echo ❌ Missing: SamplePlugin.dll
set "MISSING_FILES=1"
) else (
echo ✓ SamplePlugin.dll found
)
if defined MISSING_FILES (
echo.
echo ❌ Some required files are missing. Build may fail.
echo Please ensure CLRNet runtime has been built first.
pause
exit /b 1
)
echo.
echo ✅ All required files are present!
echo.
REM Check for Visual Studio and build tools
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" (
echo ✓ Visual Studio 2013 found
REM Set up build environment
call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat" >nul 2>&1
if not errorlevel 1 (
echo ✓ Build environment initialized
echo.
echo Building CLRNet Sample App...
REM Build the project
msbuild CLRNetSampleApp.csproj /p:Configuration=Debug /p:Platform=AnyCPU /verbosity:minimal
if not errorlevel 1 (
echo.
echo ✅ CLRNet Sample App built successfully!
echo.
echo Output files can be found in:
echo - bin\Debug\ (for AnyCPU Debug build)
echo.
echo To build for Windows Phone 8.1 ARM:
echo msbuild CLRNetSampleApp.csproj /p:Configuration=Release /p:Platform=ARM
echo.
) else (
echo.
echo ❌ Build failed. Check error messages above.
)
) else (
echo ❌ Failed to initialize build environment
)
) else (
echo ⚠️ Visual Studio 2013 not found
echo The project files are ready but you'll need VS2013 to compile
)
echo.
echo Build setup completed.
pause