Commit 8e9b52ef authored by 神楽坂玲奈's avatar 神楽坂玲奈

ak

parent f4ac9b66
language: cpp language: cpp
os: os:
- linux - linux
- osx - osx
env: env:
matrix: matrix:
- locale: zh-CN - locale: zh-CN
# - locale: ja-JP - locale: en-US
- locale: en-US
sudo: required sudo: required
dist: trusty dist: trusty
osx_image: xcode8 osx_image: xcode8
...@@ -15,68 +13,72 @@ git: ...@@ -15,68 +13,72 @@ git:
submodules: false submodules: false
addons: addons:
ssh_known_hosts: ssh_known_hosts:
- github.com - github.com
apt: apt:
packages: packages:
- libfreetype6-dev - libfreetype6-dev
- libevent-dev - libevent-dev
- libsqlite3-dev - libsqlite3-dev
- libirrlicht-dev - libirrlicht-dev
- liblua5.2-dev - liblua5.2-dev
- libgl1-mesa-dev - libgl1-mesa-dev
- libglu-dev - libglu-dev
before_install: before_install:
- git submodule update --init --recursive - git submodule update --init --recursive
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install freetype libevent
brew update; sqlite irrlicht lua dylibbundler; curl --location --retry 5 https://github.com/premake/premake-core/releases/download/v5.0.0-alpha10/premake-5.0.0-alpha10-macosx.tar.gz
brew install freetype libevent sqlite irrlicht lua dylibbundler; | tar zfx -; fi
curl --location --retry 5 https://github.com/premake/premake-core/releases/download/v5.0.0-alpha10/premake-5.0.0-alpha10-macosx.tar.gz | tar zfx -; - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget -O - https://github.com/premake/premake-core/releases/download/v5.0.0-alpha10/premake-5.0.0-alpha10-linux.tar.gz
fi | tar zfx -; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget -O - https://github.com/premake/premake-core/releases/download/v5.0.0-alpha10/premake-5.0.0-alpha10-linux.tar.gz | tar zfx -; fi
script: script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./premake5 gmake --cc=clang; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./premake5 gmake --cc=clang; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./premake5 gmake; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./premake5 gmake; fi
- cd build - cd build
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sed -i 's/-llua/-llua5.2/g' ygopro.make; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sed -i 's/-llua/-llua5.2/g' ygopro.make;
- make config=release ygopro fi
- cd .. - make config=release ygopro
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv bin/release/ygopro ./; strip ygopro; fi - cd ..
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv bin/release/ygopro ./; strip ygopro;
mkdir -p ygopro.app/Contents/MacOS; fi
mv bin/release/ygopro ygopro.app/Contents/MacOS; - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir -p ygopro.app/Contents/MacOS; mv
dylibbundler -x ygopro.app/Contents/MacOS/ygopro -b -d ygopro.app/Contents/Frameworks/ -p @executable_path/../Frameworks/ -cd; bin/release/ygopro ygopro.app/Contents/MacOS; dylibbundler -x ygopro.app/Contents/MacOS/ygopro
strip ygopro.app/Contents/MacOS/ygopro; -b -d ygopro.app/Contents/Frameworks/ -p @executable_path/../Frameworks/ -cd; strip
mkdir ygopro.app/Contents/Resources; ygopro.app/Contents/MacOS/ygopro; mkdir ygopro.app/Contents/Resources; mv premake/gframe/ygopro.icns
mv premake/gframe/ygopro.icns ygopro.app/Contents/Resources/Icon.icns; ygopro.app/Contents/Resources/Icon.icns; defaults write "$PWD/ygopro.app/Contents/Info.plist"
defaults write "$PWD/ygopro.app/Contents/Info.plist" "CFBundleIconFile" "Icon.icns"; "CFBundleIconFile" "Icon.icns"; echo $CERTIFICATE | base64 --decode --output cert.p12;
echo $CERTIFICATE | base64 --decode --output cert.p12; security create-keychain -p "" build.keychain; security unlock-keychain -p "" build.keychain;
security create-keychain -p "" build.keychain; security import cert.p12 -k build.keychain -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign;
security unlock-keychain -p "" build.keychain; codesign --deep --keychain build.keychain --sign "$(security find-identity -v -p
security import cert.p12 -k build.keychain -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign; codesigning build.keychain | head -1 | grep -o '".*"' | tr -d '"')" ygopro.app;
codesign --deep --keychain build.keychain --sign "$(security find-identity -v -p codesigning build.keychain | head -1 | grep -o '".*"' | tr -d '"')" ygopro.app; fi
fi
before_deploy: before_deploy:
- curl --location --retry 5 'https://github.com/moecube/ygopro-database/archive/master.tar.gz' | tar --strip-components=1 -zxf - ygopro-database-master/locales - curl --location --retry 5 'https://github.com/moecube/ygopro-database/archive/master.tar.gz'
- cp locales/${locale}/* . | tar --strip-components=1 -zxf - ygopro-database-master/locales
- mkdir replay - cp locales/${locale}/* .
- mkdir pics - mkdir replay
- curl --location --retry 5 --output "ygopro-images-${locale}.zip" https://github.com/moecube/ygopro-images/releases/download/latest/ygopro-images-${locale}.zip - mkdir pics
- unzip -q -d pics ygopro-images-${locale}.zip - curl --location --retry 5 --output "ygopro-images-${locale}.zip" https://github.com/moecube/ygopro-images/releases/download/latest/ygopro-images-${locale}.zip
- curl --location --retry 5 --output 'ygopro-starter-pack-master.zip' https://github.com/moecube/ygopro-starter-pack/archive/master.zip - unzip -q -d pics ygopro-images-${locale}.zip
- unzip -q ygopro-starter-pack-master.zip - curl --location --retry 5 --output 'ygopro-starter-pack-master.zip' https://github.com/moecube/ygopro-starter-pack/archive/master.zip
- mv ygopro-starter-pack-master/* . - unzip -q ygopro-starter-pack-master.zip
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar -zcf ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME-${locale}.tar.gz --format=posix --exclude='.git*' ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay; fi - mv ygopro-starter-pack-master/* .
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar -zcf ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME-${locale}.tar.gz --format=posix --exclude='.git*' ygopro LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar -zcf ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME-${locale}.tar.gz
--format=posix --exclude='.git*' ygopro.app LICENSE README.md lflist.conf strings.conf
system.conf cards.cdb script textures deck single pics replay; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar -zcf ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME-${locale}.tar.gz
--format=posix --exclude='.git*' ygopro LICENSE README.md lflist.conf strings.conf
system.conf cards.cdb script textures deck single pics replay; fi
deploy: deploy:
provider: releases provider: releases
file: file:
- ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME-${locale}.tar.gz - ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME-${locale}.tar.gz
api_key: user: zh99998
secure: "NiIw0pDfx6x2SbvgtqBSxdMSexN3MyGowNIEb6tuEBbvnE8RQ+sQQWal9EXxQGlWC0ro+/Zot07yXQKVszdCafls7bUO9Yb2hIbTaRuiruR9+DUs3LGwvqH40oEZGvVcMmXYiR0MCRxB6kXGk0Wmt+a15c4R6fq2VNNw2dPqbag="
skip_cleanup: true skip_cleanup: true
on: on:
tags: true tags: true
password:
secure: Ow8UgZfXFNVhnPaX3mRpplDsgDCOZvj7g4TXf9oTeN0mHB/F5MX6zAxuN3iCcvLqBxuOiAKSTyzHuftjPSM+sWdHjd88Qw48Vqwu26vDrbYOF9cHP2LQe4OPVXWS0ngjkC2vrDhPZadMZnyYTs/r2MRsxJnj/u+jkVYnEnkfMes=
branches: branches:
only: only:
- master - master
- /\d+\..+/ - /\d+\..+/
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