use docker for windows

pull/432/head
Lex Neva 2019-04-12 01:41:14 -04:00
rodzic 9091be8b97
commit 0d54c828d0
7 zmienionych plików z 5228 dodań i 10512 usunięć

Wyświetl plik

@ -23,6 +23,7 @@ matrix:
- python: 2.7
sudo: required
env: BUILD=windows
services: docker
if: type != cron AND (tag =~ ^v[0-9.]+$ OR branch != master)
- language: generic
os: osx
@ -42,7 +43,6 @@ cache:
- $HOME/.cache/pip
- electron/node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- /var/cache/apt/archives
install:
- |
@ -107,10 +107,6 @@ install:
wine c:\\Python\\python.exe c:\\Python\\scripts\\pip.exe install -r requirements.txt
wget -q https://nodejs.org/dist/v10.15.3/node-v10.15.3-win-x86.zip --output-document=node.zip
unzip node.zip
mv node-v*-win-x86 $(winepath 'C:\node')
set +x
elif [ "$BUILD" = "osx" ]; then
set -x

Wyświetl plik

@ -16,7 +16,7 @@ dist: distclean locales inx
cp -a icons dist/inkstitch/bin
cp -a locales dist/inkstitch/bin
cp -a print dist/inkstitch/bin
cp -a electron/out/* dist/inkstitch/electron
cp -a electron/dist/*-unpacked dist/inkstitch/electron
if [ "$$BUILD" = "windows" ]; then \
cd dist; zip -r ../inkstitch-$(VERSION)-win32.zip *; \
else \

Wyświetl plik

@ -1,13 +1,14 @@
#!/bin/bash
cd electron
if [ "$BUILD" = "windows" ]; then
NPM="wine cmd /c C:\\node\\npm.cmd"
docker run --rm \
-e ELECTRON_CACHE=$HOME/.cache/electron \
-v ${PWD}/electron:/project \
-v ~/.cache/electron:/root/.cache/electron \
electronuserland/builder:wine \
/bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn run dist"
else
NPM="npm"
cd electron
yarn install
yarn run dist
fi
$NPM install
$NPM update
$NPM run package

10444
electron/package-lock.json wygenerowano

Plik diff jest za duży Load Diff

Wyświetl plik

@ -5,60 +5,22 @@
"description": "Ink/Stitch GUI",
"main": "src/index.js",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "eslint src --color"
"pack": "electron-builder --dir",
"dist": "electron-builder"
},
"build": {
"linux": { "target": "dir" }
},
"keywords": [],
"author": "lex",
"license": "GPLv3",
"config": {
"forge": {
"make_targets": {
"win32": [
"squirrel"
],
"darwin": [
"dmg"
],
"linux": [
"deb"
]
},
"electronPackagerConfig": {
"packageManager": "npm"
},
"electronWinstallerConfig": {
"name": "inkstitch"
},
"electronInstallerDebian": {},
"electronInstallerRedhat": {},
"github_repository": {
"owner": "",
"name": ""
},
"windowsStoreConfig": {
"packageName": "",
"name": "inkstitch"
}
}
},
"license": "GPL-3.0-or-later",
"dependencies": {
"electron-compile": "^6.4.4",
"electron-squirrel-startup": "^1.0.0"
"electron-compile": "^6.4.4"
},
"devDependencies": {
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"electron-forge": "^5.2.4",
"electron-prebuilt-compile": "4.0.0",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.1.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.12.4"
"electron": "4.1.3",
"electron-builder": "^20.39.0",
"electron-packager": "13.1.1",
"electron-prebuilt-compile": "4.0.0"
}
}

5201
electron/yarn.lock 100644

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,3 +1,4 @@
from glob import glob
import os
import subprocess
import sys
@ -16,13 +17,12 @@ def open_url(url):
else:
# It's a bit trickier to find the electron app in a development environment.
base_dir = get_bundled_dir("electron")
package_dir = glob(os.path.join(base_dir, 'dist', '*-unpacked'))
try:
package_dir = os.listdir(os.path.join(base_dir, "out"))[0]
except (OSError, IndexError):
raise Exception("Electron app not found. Be sure to run 'npm install; npm run package' in %s." % base_dir)
if not package_dir:
raise Exception("Electron app not found. Be sure to run 'yarn; yarn dist' in %s." % base_dir)
electron_path = os.path.join(base_dir, "out", package_dir, "inkstitch-gui")
electron_path = os.path.join(base_dir, package_dir, "inkstitch-gui")
if sys.platform == "darwin":
electron_path += ".app/Contents/MacOS/inkstitch-gui"