Skip to content

Commit

Permalink
fix installation in VS215
Browse files Browse the repository at this point in the history
  • Loading branch information
pofider committed Aug 22, 2016
1 parent 1b824f3 commit 2da69e7
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 8 deletions.
2 changes: 1 addition & 1 deletion jsreport/NugetPack.cmd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

call .\.nuget\nuget pack -sym jsreport.Client.nuspec -Symbols -Version %1 -OutputDirectory Packages
call .\.nuget\nuget pack -sym jsreport.Embedded.nuspec -Symbols -Version %1 -OutputDirectory Packages
2 changes: 1 addition & 1 deletion jsreport/jsreport.Embedded.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<projectUrl>http://jsreport.net</projectUrl>
<licenseUrl>http://www.opensource.org/licenses/mit-license.php</licenseUrl>
<iconUrl>http://jsreport.net/img/favicon.ico</iconUrl>
<copyright>Copyright 2013-2014 Jan Blaha</copyright>
<copyright>Copyright 2013-2016 Jan Blaha</copyright>
<language>en-us</language>
<tags>jsreport report pdf</tags>
<dependencies>
Expand Down
74 changes: 69 additions & 5 deletions jsreport/jsreport.Embedded/tools/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -80,4 +144,4 @@ if (Test-Path $installPath) {

Pop-Location

start "http://jsreport.net/blog/csharp-integration-improvements"
start "http://jsreport.net/learn/net-embedded"
2 changes: 1 addition & 1 deletion jsreport/jsreport.Embedded/tools/jsreport/install.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


0 comments on commit 2da69e7

Please sign in to comment.