From 15adbef01026d1c2781e8c85d7c4873ccbc0a722 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Thu, 2 Jul 2020 14:43:26 -0700 Subject: [PATCH 1/3] bootstrap native windows --- src/Simulation/Native/bootstrap.cmd | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Simulation/Native/bootstrap.cmd b/src/Simulation/Native/bootstrap.cmd index 59903c782db..3cacb39267b 100644 --- a/src/Simulation/Native/bootstrap.cmd +++ b/src/Simulation/Native/bootstrap.cmd @@ -12,12 +12,15 @@ SET DROP_FOLDER=%SYSTEM_DEFAULTWORKINGDIRECTORY%\xplat\src\Simulation\Native\bui DIR %DROP_FOLDER% IF NOT EXIST linux mkdir linux -IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.so copy %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.so linux\Microsoft.Quantum.Simulator.Runtime.dll +IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.so copy %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.so linux\Microsoft.Quantum.Simulator.Runtime.dll IF NOT EXIST osx mkdir osx -IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib copy %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib osx\Microsoft.Quantum.Simulator.Runtime.dll +IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib copy %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib osx\Microsoft.Quantum.Simulator.Runtime.dll + +IF NOT EXIST %BUILD_FOLDER%\Release mkdir %BUILD_FOLDER%\Release +IF EXIST %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll copy %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll %BUILD_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll + -IF NOT EXIST %BUILD_FOLDER% mkdir %BUILD_FOLDER% pushd %BUILD_FOLDER% cmake -A "x64" ^ From 2dd5e839a4160afdfb718a50f7ca30855ed8dbb3 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Wed, 8 Jul 2020 02:17:45 -0700 Subject: [PATCH 2/3] Add native via project. --- src/Simulation/Common/Simulators.Dev.props | 8 ------ src/Simulation/Native/bootstrap.cmd | 4 +-- .../Microsoft.Quantum.Simulators.csproj | 26 ++++++++++++++++++- ...crosoft.Quantum.Simulators.nuspec.template | 8 +++--- 4 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/Simulation/Common/Simulators.Dev.props b/src/Simulation/Common/Simulators.Dev.props index f92092e9568..2c93b5ab65e 100644 --- a/src/Simulation/Common/Simulators.Dev.props +++ b/src/Simulation/Common/Simulators.Dev.props @@ -14,14 +14,6 @@ $(QsimDllWindowsRelease) $(QsimDllWindowsDebug) - - - - Microsoft.Quantum.Simulator.Runtime.dll - PreserveNewest - false - - diff --git a/src/Simulation/Native/bootstrap.cmd b/src/Simulation/Native/bootstrap.cmd index 3cacb39267b..19fb984e7c2 100644 --- a/src/Simulation/Native/bootstrap.cmd +++ b/src/Simulation/Native/bootstrap.cmd @@ -17,8 +17,8 @@ IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.so copy %DRO IF NOT EXIST osx mkdir osx IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib copy %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib osx\Microsoft.Quantum.Simulator.Runtime.dll -IF NOT EXIST %BUILD_FOLDER%\Release mkdir %BUILD_FOLDER%\Release -IF EXIST %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll copy %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll %BUILD_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll +IF NOT EXIST win10 mkdir win10 +IF EXIST %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll copy %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll win10\Microsoft.Quantum.Simulator.Runtime.dll pushd %BUILD_FOLDER% diff --git a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj index 3ae4043c9c0..cce7ff1251f 100644 --- a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj +++ b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj @@ -23,5 +23,29 @@ - + + + + Microsoft.Quantum.Simulator.Runtime.dll + PreserveNewest + false + + + + runtimes\win-x64\native\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + false + + + runtimes\osx-x64\native\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + false + + + runtimes\linux-x64\native\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + false + + + diff --git a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template index 756eaca2e6b..17c71ffae28 100644 --- a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template +++ b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template @@ -17,11 +17,9 @@ - - - - - + + + From a550f55d191fce286efe9ebb4c3565fbdb11989d Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Wed, 8 Jul 2020 02:57:11 -0700 Subject: [PATCH 3/3] mkdir build --- src/Simulation/Native/bootstrap.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Simulation/Native/bootstrap.cmd b/src/Simulation/Native/bootstrap.cmd index 19fb984e7c2..144b1686a9f 100644 --- a/src/Simulation/Native/bootstrap.cmd +++ b/src/Simulation/Native/bootstrap.cmd @@ -20,7 +20,7 @@ IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib copy %DRO IF NOT EXIST win10 mkdir win10 IF EXIST %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll copy %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll win10\Microsoft.Quantum.Simulator.Runtime.dll - +IF NOT EXIST %BUILD_FOLDER% mkdir %BUILD_FOLDER% pushd %BUILD_FOLDER% cmake -A "x64" ^