From b14d81e450e446598db0cde46fadf21f54c67f92 Mon Sep 17 00:00:00 2001 From: Joseph Humfrey Date: Sun, 24 Jul 2016 09:13:49 +0100 Subject: [PATCH] Generate documentation in the postinstall script instead of on start, so that we can run install in the main build scripts --- BUILD_FOR_MAC.command | 3 +++ BUILD_FOR_WINDOWS.bat | 5 +++++ BUILD_PACKAGE.command | 3 +++ app/package.json | 3 ++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/BUILD_FOR_MAC.command b/BUILD_FOR_MAC.command index 4b7016d2..6e3b9053 100755 --- a/BUILD_FOR_MAC.command +++ b/BUILD_FOR_MAC.command @@ -9,6 +9,9 @@ cd "`dirname "$0"`" # Clean rm -rf Inky-darwin-x64/ +# Ensure it's correctly/fully installed first +( cd app && npm install ) + # Create icon from PNG ./resources/makeIcns.command diff --git a/BUILD_FOR_WINDOWS.bat b/BUILD_FOR_WINDOWS.bat index 4b8d2283..0156da77 100644 --- a/BUILD_FOR_WINDOWS.bat +++ b/BUILD_FOR_WINDOWS.bat @@ -1 +1,6 @@ +# Ensure it's correctly/fully installed first +cd app +npm install +cd .. + electron-packager app Inky --platform=win32 --arch=x64 --icon=resources/Icon1024.png.ico --prune --asar --asar-unpack-dir="main-process/ink" --ignore="inklecate_mac" --version-string.ProductName="Inky" --version-string.CompanyName="inkle Ltd" --version-string.FileDescription="Inky" --version-string.OriginalFilename="Inky" --version-string.InternalName="Inky" --overwrite \ No newline at end of file diff --git a/BUILD_PACKAGE.command b/BUILD_PACKAGE.command index ebc62df9..240f39cd 100755 --- a/BUILD_PACKAGE.command +++ b/BUILD_PACKAGE.command @@ -15,6 +15,9 @@ rm -rf ReleaseUpload # Create icon from PNG ./resources/makeIcns.command +# Ensure it's correctly/fully installed first +( cd app && npm install ) + # Mac electron-packager app Inky --platform=darwin --arch=x64 --icon=resources/Icon.icns --extend-info=resources/info.plist --prune --asar --asar-unpack-dir="main-process/ink" --ignore="inklecate_win.exe" diff --git a/app/package.json b/app/package.json index 21a53d53..78cd2999 100644 --- a/app/package.json +++ b/app/package.json @@ -5,7 +5,8 @@ "description": "An editor for ink", "main": "main-process/main.js", "scripts": { - "start": "node ../build/createDocumentnavigation.js && markdown-html resources/Documentation/WritingWithInk.md -s resources/Documentation/documentation.css -o renderer/documentation/embedded.html && electron main-process/main.js" + "postinstall": "node ../build/createDocumentnavigation.js && markdown-html resources/Documentation/WritingWithInk.md -s resources/Documentation/documentation.css -o renderer/documentation/embedded.html", + "start": "electron main-process/main.js" }, "repository": { "type": "git",