Skip to content
Permalink
Browse files

Merge pull request #118 from Pyfa-fit/Builds_OSX

Builds: OS X
  • Loading branch information...
Ebag333 committed Jun 9, 2017
2 parents eeace2f + a02d7c3 commit 71aa51e61b60d0571fdea53fa55a6b5142fefed9
Showing with 50 additions and 19 deletions.
  1. +18 −13 .travis.yml
  2. +11 −3 dist_assets/mac/pyfa.spec
  3. +11 −3 dist_assets/mac/pyfa_debug.spec
  4. +8 −0 pyfa.py
  5. +2 −0 requirements_build.txt
@@ -27,11 +27,16 @@ before_install:
sudo apt-get install fonts-cantarell lmodern ttf-aenigma ttf-georgewilliams ttf-bitstream-vera ttf-sjfonts ttf-tuffy tv-fonts;
sudo apt-get install ubuntustudio-font-meta;
sudo apt-get update && sudo apt-get --reinstall install -qq language-pack-en language-pack-ru language-pack-he language-pack-zh-hans;
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew install graphviz;
# Disabling brew for now to try and trim down build time
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# brew update;
# brew install graphviz;
# fi

# Conda Install
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh;
@@ -42,10 +47,17 @@ before_install:
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
# - conda info -a

install:
# install wxPython 3.0.0.0
- conda install -c https://conda.anaconda.org/travis wxpython
# - conda install -c https://conda.anaconda.org/travis wxpython
- conda install -c anaconda wxpython=3.0.0.0
# Not sure why this only works on OS X, but it fixes an issue with matplotlib
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
conda install matplotlib;
fi

before_script:
- pip install -r requirements.txt
- pip install -r requirements_test.txt
@@ -67,13 +79,6 @@ after_success:
cp $TRAVIS_BUILD_DIR/dist_assets/mac/pyfa.spec $TRAVIS_BUILD_DIR/pyfa.spec;
cp $TRAVIS_BUILD_DIR/dist_assets/mac/pyfa_debug.spec $TRAVIS_BUILD_DIR/pyfa_debug.spec;
fi
- ls $TRAVIS_BUILD_DIR
- if [[ "$TRAVIS_OS_NAME" == "mac" ]]; then
cp ~/dist_assets/mac/pyfa.spec ~/pyfa.spec;
cp ~/dist_assets/mac/pyfa_debug.spec ~/pyfa_debug.spec;
fi
- ls $TRAVIS_BUILD_DIR
- ls $TRAVIS_BUILD_DIR/dist_assets/mac/

# Run build
- cd $TRAVIS_BUILD_DIR
@@ -11,6 +11,9 @@
# pathex=['C:\\Users\\Ebag333\\Documents\\GitHub\\Ebag333\\Pyfa'],

import os
import sys

sys.path.append(os.path.realpath(os.getcwd()))

block_cipher = None

@@ -38,6 +41,11 @@ for root, folders, files in os.walk("eos/effects"):
)
import_these.append(mod_name)

excluded_modules = [
'setup',
'setup-osx',
]

a = Analysis(
['pyfa.py'],
pathex=['$TRAVIS_BUILD_DIR'],
@@ -46,7 +54,7 @@ a = Analysis(
hiddenimports=import_these,
hookspath=[],
runtime_hooks=[],
excludes=[],
excludes=excluded_modules,
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
@@ -64,7 +72,7 @@ exe = EXE(pyz,
debug=False,
console=False,
strip=False,
upx=True,
upx=False,
name='pyfa',
icon='dist_assets/mac/pyfa.icns',
onefile=False,
@@ -76,7 +84,7 @@ coll = COLLECT(
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx=False,
onefile=False,
name='pyfa',
icon='dist_assets/mac/pyfa.icns',
@@ -11,6 +11,9 @@
# pathex=['C:\\Users\\Ebag333\\Documents\\GitHub\\Ebag333\\Pyfa'],

import os
import sys

sys.path.append(os.path.realpath(os.getcwd()))

block_cipher = None

@@ -38,6 +41,11 @@ for root, folders, files in os.walk("eos/effects"):
)
import_these.append(mod_name)

excluded_modules = [
'setup',
'setup-osx',
]

a = Analysis(
['pyfa.py'],
pathex=['$TRAVIS_BUILD_DIR'],
@@ -46,7 +54,7 @@ a = Analysis(
hiddenimports=import_these,
hookspath=[],
runtime_hooks=[],
excludes=[],
excludes=excluded_modules,
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
@@ -64,7 +72,7 @@ exe = EXE(pyz,
debug=True,
console=True,
strip=False,
upx=True,
upx=False,
name='pyfa_debug',
icon='dist_assets/mac/pyfa.icns',
onefile=False,
@@ -76,7 +84,7 @@ coll = COLLECT(
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx=False,
onefile=False,
name='pyfa_debug',
icon='dist_assets/mac/pyfa.icns',
@@ -395,21 +395,29 @@ def handleGUIException(exc_type, exc_value, exc_traceback):
import eos.events

# noinspection PyUnresolvedReferences
pyfalog.debug("Running prefetch service.")
import service.prefetch # noqa: F401

# Make sure the saveddata db exists
pyfalog.debug("Validate savedata DB path.")
if not os.path.exists(config.savePath):
os.mkdir(config.savePath)

pyfalog.debug("Creating DB metadata.")
eos.db.saveddata_meta.create_all()

pyfalog.info("Starting threads")
executeStartupThreads()

pyfalog.debug("Importing main GUI interface.")
from gui.mainFrame import MainFrame

pyfalog.debug("Creating wx application.")
pyfa = wx.App(False)

pyfalog.debug("Creating GUI main frame.")
MainFrame(options.title)
pyfalog.debug("Launching Pyfa.")
pyfa.MainLoop()

# TODO: Add some thread cleanup code here. Right now we bail, and that can lead to orphaned threads or threads not properly exiting.
@@ -8,3 +8,5 @@ tornado

# Windows specific
pypiwin32 >= 219; sys_platform == 'win'

# OS X specific

0 comments on commit 71aa51e

Please sign in to comment.
You can’t perform that action at this time.