From a8ee3cbbee16d61d7216e6109096b2713dc42a23 Mon Sep 17 00:00:00 2001 From: Matthew Moore Date: Wed, 25 Apr 2018 02:12:18 -0700 Subject: [PATCH] Add nuget package holding all libraries for development --- makefiles/Makefile.dotnet.mk | 17 ++++++++++++++-- ortools/dotnet/OrTools.nuspec | 38 +++++++++++++++++------------------ 2 files changed, 33 insertions(+), 22 deletions(-) diff --git a/makefiles/Makefile.dotnet.mk b/makefiles/Makefile.dotnet.mk index 5ee9f78e59..4b2173aa6b 100644 --- a/makefiles/Makefile.dotnet.mk +++ b/makefiles/Makefile.dotnet.mk @@ -20,7 +20,7 @@ ORTOOLS_NUSPEC_FILE=$(ORTOOLS_DLL_NAME).nuspec CLR_PROTOBUF_DLL_NAME?=Google.Protobuf CLR_ORTOOLS_DLL_NAME?=Google.$(ORTOOLS_DLL_NAME) -BASE_CLR_ORTOOLS_DLL_NAME:= $(CLR_ORTOOLS_DLL_NAME) +BASE_CLR_ORTOOLS_DLL_NAME:=$(CLR_ORTOOLS_DLL_NAME) CLR_ORTOOLS_IMPORT_DLL_NAME:=$(CLR_ORTOOLS_DLL_NAME) # Check for required build tools @@ -213,9 +213,21 @@ dotnet: \ csharp_dotnet \ fsharp_dotnet + +ifeq ($(SYSTEM),win) +NUGET_COMPILER ?= nuget.exe +NUGET_EXECUTABLE := $(shell $(WHICH) $(NUGET_COMPILER) 2>nul) +else #UNIX +NUGET_COMPILER ?= nuget +NUGET_EXECUTABLE := $(shell which $(NUGET_COMPILER)) +endif +NUGET_SRC = https://www.nuget.org/api/v2/package + .PHONY: pkg_dotnet # Build Nuget Package pkg_dotnet: - $(warning Not Implemented) + $(SED) -i -e "s/MMMM/$(CLR_ORTOOLS_DLL_NAME)/" ortools$Sdotnet$S$(ORTOOLS_NUSPEC_FILE) + $(SED) -i -e "s/VVVV/$(OR_TOOLS_VERSION)/" ortools$Sdotnet$S$(ORTOOLS_NUSPEC_FILE) + $(NUGET_EXECUTABLE) pack ortools$Sdotnet$S$(ORTOOLS_NUSPEC_FILE) .PHONY: pkg_dotnet-upload # Upload Nuget Package pkg_dotnet-upload: nuget_archive @@ -231,6 +243,7 @@ else endif @echo DOTNET_EXECUTABLE = "$(DOTNET_EXECUTABLE)" @echo MONO_EXECUTABLE = "$(MONO_EXECUTABLE)" + @echo NUGET_EXECUTABLE = "$(NUGET_EXECUTABLE)" ifeq ($(SYSTEM),win) @echo off & echo( else diff --git a/ortools/dotnet/OrTools.nuspec b/ortools/dotnet/OrTools.nuspec index 2832225a92..f1eebf4544 100644 --- a/ortools/dotnet/OrTools.nuspec +++ b/ortools/dotnet/OrTools.nuspec @@ -1,22 +1,20 @@ - - NNNN - VVVV - Google - https://github.com/google/or-tools/blob/master/LICENSE-2.0.txt - https://developers.google.com/optimization - .NET Assembly for the Operations Research Tools project - Copyright 2018 Google, Inc - Operations Research Math Linear Constraint Programming C# .NET SWIG C++ - - - - - - - - - - - + + MMMM + VVVV + Google Inc. + https://github.com/google/or-tools/blob/master/LICENSE-2.0.txt + https://developers.google.com/optimization + .NET wrapper for the Operations Research Tools project + Copyright 2018 Google, Inc + Operations Research Math Linear Constraint Programming C# F# .NETStandard + + + + + + + + + \ No newline at end of file