Commit ce6a3f40 authored by Jan-Philipp Stauffert's avatar Jan-Philipp Stauffert
Browse files

Split windows building into multiple scripts

parent 3af7d9fe
......@@ -2,21 +2,10 @@ Write-Output "Building Windows Decker"
& yarn install
& yarn run webpack --mode production
Copy-Item -Recurse -Force node_modules/reveal.js-menu resource/support/
#Copy-Item -Recurse -Force node_modules/reveal.js/plugin/notes resource/support/
New-Item -ItemType directory -Force -Path resource/support/notes
Copy-Item -Force node_modules/reveal.js/plugin/notes/notes.html resource/support/notes/notes.html
Copy-Item -Force node_modules/reveal.js/plugin/notes/notes.js resource/support/notes/notes.js
New-Item -ItemType directory -Force -Path resource/support/print
Copy-Item -Force node_modules/reveal.js/css/print/paper.css resource/support/print/paper.css
Copy-Item -Force node_modules/reveal.js/css/print/pdf.css resource/support/print/pdf.css
& stack build -j4
$binpath=(Join-Path ($(stack path | Select-String -Pattern "local-install-root") -split " ")[1] "bin\decker.exe")
Copy-Item $binpath .
$version = Get-Content .\package.yaml | Select-String -Pattern "version: "
$version = $version -replace "\s+", " "
$version = ($version -split " ")[1]
Write-Output $version > version.txt
Compress-Archive -Force -Path .\resource -CompressionLevel Fastest -DestinationPath resource
& stack build -j4 --flag decker:preextractedresources
Write-Output "Building Windows Decker Standalone Binary"
& yarn install
& yarn run webpack --mode production
Copy-Item -Recurse -Force node_modules/reveal.js-menu resource/support/
New-Item -ItemType directory -Force -Path resource/support/notes
Copy-Item -Force node_modules/reveal.js/plugin/notes/notes.html resource/support/notes/notes.html
Copy-Item -Force node_modules/reveal.js/plugin/notes/notes.js resource/support/notes/notes.js
New-Item -ItemType directory -Force -Path resource/support/print
Copy-Item -Force node_modules/reveal.js/css/print/paper.css resource/support/print/paper.css
Copy-Item -Force node_modules/reveal.js/css/print/pdf.css resource/support/print/pdf.css
& stack build -j4
$binpath=(Join-Path ($(stack path | Select-String -Pattern "local-install-root") -split " ")[1] "bin\decker.exe")
Copy-Item $binpath .
$version = Get-Content .\package.yaml | Select-String -Pattern "version: "
$version = $version -replace "\s+", " "
$version = ($version -split " ")[1]
Write-Output $version > version.txt
Compress-Archive -Force -Path .\resource -CompressionLevel Fastest -DestinationPath resource
......@@ -203,7 +203,7 @@ fileIsNewer a b = do
-- Both arguments are expected to be absolute pathes.
makeRelativeTo :: FilePath -> FilePath -> FilePath
makeRelativeTo dir file =
let (d, f) = removeCommonPrefix (dir, file)
let (d, f) = removeCommonPrefix (normalise dir, normalise file)
in normalise $ invertPath d </> f
invertPath :: FilePath -> FilePath
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment