From 2da69e727c953c6806c4bdf7e4d41ade44b29b63 Mon Sep 17 00:00:00 2001 From: "honza.pofider@seznam.cz" Date: Mon, 22 Aug 2016 12:15:19 +0200 Subject: [PATCH] fix installation in VS215 --- jsreport/NugetPack.cmd | 2 +- jsreport/jsreport.Embedded.nuspec | 2 +- jsreport/jsreport.Embedded/tools/install.ps1 | 74 +++++++++++++++++-- .../tools/jsreport/install.cmd | 2 +- 4 files changed, 72 insertions(+), 8 deletions(-) diff --git a/jsreport/NugetPack.cmd b/jsreport/NugetPack.cmd index cd11171..78e3b94 100644 --- a/jsreport/NugetPack.cmd +++ b/jsreport/NugetPack.cmd @@ -1,2 +1,2 @@ -call .\.nuget\nuget pack -sym jsreport.Client.nuspec -Symbols -Version %1 -OutputDirectory Packages \ No newline at end of file +call .\.nuget\nuget pack -sym jsreport.Embedded.nuspec -Symbols -Version %1 -OutputDirectory Packages \ No newline at end of file diff --git a/jsreport/jsreport.Embedded.nuspec b/jsreport/jsreport.Embedded.nuspec index fa3b9e7..2ded24c 100644 --- a/jsreport/jsreport.Embedded.nuspec +++ b/jsreport/jsreport.Embedded.nuspec @@ -10,7 +10,7 @@ http://jsreport.net http://www.opensource.org/licenses/mit-license.php http://jsreport.net/img/favicon.ico - Copyright 2013-2014 Jan Blaha + Copyright 2013-2016 Jan Blaha en-us jsreport report pdf diff --git a/jsreport/jsreport.Embedded/tools/install.ps1 b/jsreport/jsreport.Embedded/tools/install.ps1 index 4b9c5cd..11e81d2 100644 --- a/jsreport/jsreport.Embedded/tools/install.ps1 +++ b/jsreport/jsreport.Embedded/tools/install.ps1 @@ -7,11 +7,75 @@ $projectDirectory = $fileInfo.DirectoryName $jsreport = join-path $projectDirectory jsreport if (-Not (Test-Path $jsreport)) { - $jsreportTools = join-path $toolsPath jsreport - $project.ProjectItems.AddFromDirectory($jsreportTools) + $jsreportTools = join-path $toolsPath jsreport + + $jsreport = $project.ProjectItems.AddFolder("jsreport") - $app = $project.ProjectItems.Item("jsreport").ProjectItems.Item("app") - $jsreport = $project.ProjectItems.Item("jsreport") + $filePath = join-path $jsreportTools install.cmd + $jsreport.ProjectItems.AddFromFileCopy($filePath) + + $filePath = join-path $jsreportTools jsreport.zip + $jsreport.ProjectItems.AddFromFileCopy($filePath) + + $filePath = join-path $jsreportTools studio.cmd + $jsreport.ProjectItems.AddFromFileCopy($filePath) + + $filePath = join-path $jsreportTools update.cmd + $jsreport.ProjectItems.AddFromFileCopy($filePath) + + $filePath = join-path $jsreportTools install-log.txt + $jsreport.ProjectItems.AddFromFileCopy($filePath) + + $app = $jsreport.ProjectItems.AddFolder("app") + + $appPath = join-path $jsreportTools app + + $filePath = join-path $appPath dev.config.json + $app.ProjectItems.AddFromFileCopy($filePath) + + $filePath = join-path $appPath prod.config.json + $app.ProjectItems.AddFromFileCopy($filePath) + + $filePath = join-path $appPath package.json + $app.ProjectItems.AddFromFileCopy($filePath) + + $filePath = join-path $appPath server.js + $app.ProjectItems.AddFromFileCopy($filePath) + + $reports = $jsreport.ProjectItems.AddFolder("reports") + $data = $reports.ProjectItems.AddFolder("data") + $templates = $reports.ProjectItems.AddFolder("templates") + + $sampleData = $data.ProjectItems.AddFolder("Sample data") + $sampleReport = $templates.ProjectItems.AddFolder("Sample report") + + $reportsPath = join-path $jsreportTools reports + $dataPath = join-path $reportsPath data + $sampleDataPath = join-path $dataPath "Sample data" + + $filePath = join-path $sampleDataPath config.json + $sampleData.ProjectItems.AddFromFileCopy($filePath) + + $filePath = join-path $sampleDataPath dataJson.json + $sampleData.ProjectItems.AddFromFileCopy($filePath) + + $templatesPath = join-path $reportsPath templates + $sampleReportPath = join-path $templatesPath "Sample report" + + $filePath = join-path $sampleReportPath config.json + $sampleReport.ProjectItems.AddFromFileCopy($filePath) + + $filePath = join-path $sampleReportPath content.handlebars + $sampleReport.ProjectItems.AddFromFileCopy($filePath) + + $filePath = join-path $sampleReportPath footer.handlebars + $sampleReport.ProjectItems.AddFromFileCopy($filePath) + + $filePath = join-path $sampleReportPath header.handlebars + $sampleReport.ProjectItems.AddFromFileCopy($filePath) + + $filePath = join-path $sampleReportPath helpers.js + $sampleReport.ProjectItems.AddFromFileCopy($filePath) $file1 = $jsreport.ProjectItems.Item("jsreport.zip") $copyToOutput1 = $file1.Properties.Item("CopyToOutputDirectory") @@ -80,4 +144,4 @@ if (Test-Path $installPath) { Pop-Location -start "http://jsreport.net/blog/csharp-integration-improvements" \ No newline at end of file +start "http://jsreport.net/learn/net-embedded" \ No newline at end of file diff --git a/jsreport/jsreport.Embedded/tools/jsreport/install.cmd b/jsreport/jsreport.Embedded/tools/jsreport/install.cmd index aa949d3..d9cf1b9 100644 --- a/jsreport/jsreport.Embedded/tools/jsreport/install.cmd +++ b/jsreport/jsreport.Embedded/tools/jsreport/install.cmd @@ -3,7 +3,7 @@ REM This is being run by the nuget install and also if you run update.cmd, there if exist "install.js" ( "../.bin/node.cmd" install.js ) else ( - "../.bin/node.cmd" "../../packages/jsreport.Embedded.1.0.0/tools/install.js" + "../.bin/node.cmd" "../../packages/jsreport.Embedded.1.0.1/tools/install.js" )