This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathMakefile
61 lines (45 loc) · 2.75 KB
/
Makefile
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
NACLSDK_TOOL=../nacl_sdk/naclsdk
NUGET_TOOL=./electron-dotnet/tools/build/nuget.exe
all:
@echo Usage:
@echo make build - builds the bindings
@echo make setup - sets up the environment for you
build: check
make electron-dotnet
make peppersharp
make websharpjs
make websharp-cs
make generator
.PHONY: electron-dotnet, peppersharp, websharpjs, websharp-cs
electron-dotnet: check
(cd electron-dotnet; npm install electron; npm install)
peppersharp: check
(cd PepperPlugin/src; export NACL_SDK_ROOT=../../../nacl_sdk/pepper_canary/; make)
(cd PepperSharp; xbuild PepperSharp.csproj /t:Rebuild /p:Configuration=Release /p:Platform=AnyCPU)
(cd PepperSharp; xbuild PepperSharp.csproj /t:Rebuild /p:Configuration=Debug /p:Platform=AnyCPU)
(cd electron-dotnet/tools; mono ./build/nuget.exe pack ./nuget/Xamarin.PepperSharp.nuspec -outputdirectory ./build/nuget -properties Configuration=Release -basepath ../../PepperSharp)
websharpjs:
(cd electron-dotnet/src/websharpjs/WebSharp.js; msbuild WebSharp.js.sln /p:Configuration=Release /t:restore,build)
(cd electron-dotnet/src/websharpjs/WebSharp.js; mono ../../../tools/build/nuget.exe pack WebSharp.js.nuspec -OutputDirectory ./bin/Release)
# copy nuget to local nuget repo
(cp electron-dotnet/src/websharpjs/WebSharp.js/bin/Release/*.nupkg electron-dotnet/tools/build/nuget)
# make the .dll available to websharp
(cp electron-dotnet/src/websharpjs/WebSharp.js/bin/Release/net451/*.dll electron-dotnet/lib/bin/)
websharp-cs:
(cd electron-dotnet/src/websharp-cs/src/websharp-cs;mono ../../../../tools/build/nuget.exe restore websharp-cs.sln)
(cd electron-dotnet/src/websharp-cs/src/websharp-cs; msbuild websharp-cs.sln /p:Configuration=Release /p:TargeFramework="Any Cpu")
generator:
(cd Tools/generator-electron-dotnet; npm install)
check:
@if test ! -x $(NACLSDK_TOOL); then echo "You need to install the nacl_sdk on the parent directory, https://developer.chrome.com/native-client/sdk/download#installing-the-sdk"; exit 1; fi
@if $(NACLSDK_TOOL) list | egrep -q 'I\*?.*pepper_canary'; then echo $?; else echo "You should install the pepper_canary support using $(NACLSDK_TOOL) update pepper_canary --force"; exit 1; fi
@if test ! -f $(NUGET_TOOL); then echo "You need to install NuGet.exe. Run 'make setup'"; exit 1; fi
setup: setup-nacl setup-nuget
setup-nacl:
curl -O 'http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip'
unzip nacl_sdk.zip -d ../
../nacl_sdk/naclsdk update pepper_canary # Downloads the real SDK. This takes a while
setup-nuget:
(mkdir -p electron-dotnet/tools/build)
(mkdir -p electron-dotnet/tools/build/nuget)
(cd electron-dotnet/tools/ && { mcs download.cs ; mono download.exe 'http://nuget.org/nuget.exe' ./build/nuget.exe; mono ./build/nuget.exe update -self; cd -; })