add travis config to build standalone bundle on multiple platforms

This commit is contained in:
Max Klenk 2020-05-28 16:08:08 +02:00
parent 627231075d
commit e6567c15df
3 changed files with 171 additions and 1 deletions

167
.travis.yml Normal file
View File

@ -0,0 +1,167 @@
# validate config at https://config.travis-ci.com/explore
os: linux
dist: xenial
language: node_js
node_js:
- "10"
cache: yarn
# platform specific configuration
jobs:
# jobs which have to succeed
include:
# OS: MAC
## -> build darwin
- name: "Standalone MacOS on MacOS"
os: osx
osx_image: xcode11.3
before_install:
- HOMEBREW_NO_AUTO_UPDATE=1 brew install git-lfs
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ffmpeg
script:
- cd gulp
- yarn gulp build.standalone-prod || travis_terminate 1
- yarn gulp standalone.prepare
- yarn gulp standalone.package.prod.darwin64
- cd ..
## -> build win
- name: "Standalone Windows on MacOS"
os: osx
osx_image: xcode11.3
before_install:
- HOMEBREW_NO_AUTO_UPDATE=1 brew install git-lfs
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ffmpeg
- HOMEBREW_NO_AUTO_UPDATE=1 brew cask install wine-stable
# prevent Wine popup dialogs about installing additional packages
- export WINEDLLOVERRIDES="mscoree,mshtml="
- export WINEDEBUG="-all"
script:
- cd gulp
- yarn gulp build.standalone-prod || travis_terminate 1
- yarn gulp standalone.prepare
- yarn gulp standalone.package.prod.win64
- yarn gulp standalone.package.prod.win32
- cd ..
## -> build linux
- name: "Standalone Linux on MacOS"
os: osx
osx_image: xcode11.3
before_install:
- HOMEBREW_NO_AUTO_UPDATE=1 brew install git-lfs
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ffmpeg
script:
- cd gulp
- yarn gulp build.standalone-prod || travis_terminate 1
- yarn gulp standalone.prepare
- yarn gulp standalone.package.prod.linux64
- yarn gulp standalone.package.prod.linux32
- cd ..
# OS: LINUX
## -> build darwin
## not possible
## -> build win
- name: "Standalone Windows on Linux"
os: linux
addons:
apt:
packages:
- libavformat-dev
- libavfilter-dev
- libavdevice-dev
- ffmpeg
- wine
script:
- cd gulp
- yarn gulp build.standalone-prod || travis_terminate 1
- yarn gulp standalone.prepare
- yarn gulp standalone.package.prod.win64
- yarn gulp standalone.package.prod.win32
- cd ..
## -> build linux
- name: "Standalone Linux on Linux"
os: linux
addons:
apt:
packages:
- libavformat-dev
- libavfilter-dev
- libavdevice-dev
- ffmpeg
script:
- cd gulp
- yarn gulp build.standalone-prod || travis_terminate 1
- yarn gulp standalone.prepare
- yarn gulp standalone.package.prod.linux64
- yarn gulp standalone.package.prod.linux32
- cd ..
# OS: WINDOWS
## -> build darwin
## not possible
## -> build linux
- name: "Standalone Linux on Windows"
os: windows
env: YARN_GPG=no
before_install:
- choco install git-lfs -y -f || echo "0" # choco fails but git-lfs is still installed
- choco install ffmpeg
- export PATH=/C/ProgramData/chocolatey/lib/ffmpeg/tools/ffmpeg/bin:$PATH
- wget https://github.com/moiamond/docker-ffmpeg-base-windowsservercore/raw/master/System32/avicap32.dll -P /C/Windows/System32/
- wget https://github.com/moiamond/docker-ffmpeg-base-windowsservercore/raw/master/System32/msvfw32.dll -P /C/Windows/System32/
script:
- cd gulp
- yarn gulp build.standalone-prod || travis_terminate 1
- yarn gulp standalone.prepare
- yarn gulp standalone.package.prod.linux64
- yarn gulp standalone.package.prod.linux32
- cd ..
## -> build win
- name: "Standalone Windows on Windows"
os: windows
env: YARN_GPG=no
before_install:
- choco install git-lfs -y -f || echo "0" # choco fails but git-lfs is still installed
- choco install ffmpeg
- choco install wget
- export PATH=/C/ProgramData/chocolatey/lib/ffmpeg/tools/ffmpeg/bin:$PATH
- wget https://github.com/moiamond/docker-ffmpeg-base-windowsservercore/raw/master/System32/avicap32.dll -P /C/Windows/System32/
- wget https://github.com/moiamond/docker-ffmpeg-base-windowsservercore/raw/master/System32/msvfw32.dll -P /C/Windows/System32/
script:
- cd gulp
- yarn gulp build.standalone-prod || travis_terminate 1
- yarn gulp standalone.prepare
- yarn gulp standalone.package.prod.win64
- yarn gulp standalone.package.prod.win32
- cd ..
# mark build as finished even if "allow_failures" are still running
fast_finish: true
# optional jobs which may fail
#allow_failures:
# - name: ""
# shared
install:
- git lfs install
- git lfs pull
- yarn
# electron dependencies
- cd electron
- yarn
- cd ..
# gulp dependendencies
- cd gulp
- yarn
- cd ..

BIN
electron/favicon.icns Normal file

Binary file not shown.

View File

@ -21,8 +21,11 @@ function gulptasksStandalone($, gulp, buildFolder) {
path.join(electronBaseDir, "lib", "**", "*.node"),
path.join(electronBaseDir, "node_modules", "**", "*.*"),
path.join(electronBaseDir, "node_modules", "**", ".*"),
path.join(electronBaseDir, "node_modules", "**", "*"),
path.join(electronBaseDir, "favicon*"),
// fails on platforms which support symlinks
// https://github.com/gulpjs/gulp/issues/1427
// path.join(electronBaseDir, "node_modules", "**", "*"),
];
return gulp.src(requiredFiles, { base: electronBaseDir }).pipe(gulp.dest(tempDestBuildDir));
});