Skip to content

Commit

Permalink
Fix minor default settings, fix dist script for wx3 merge
Browse files Browse the repository at this point in the history
  • Loading branch information
blitzmann committed Oct 5, 2015
1 parent 30f0770 commit 231cdb8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion gui/mainFrame.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def LoadPreviousOpenFits(self):


def LoadMainFrameAttribs(self):
mainFrameDefaultAttribs = {"wnd_width": 1000, "wnd_height": 680, "wnd_maximized": False, "browser_width": 300, "market_height": 0, "fitting_height": 0}
mainFrameDefaultAttribs = {"wnd_width": 1000, "wnd_height": 700, "wnd_maximized": False, "browser_width": 300, "market_height": 0, "fitting_height": -200}
self.mainFrameAttribs = service.SettingsProvider.getInstance().getSettings("pyfaMainWindowAttribs", mainFrameDefaultAttribs)

if self.mainFrameAttribs["wnd_maximized"]:
Expand Down
26 changes: 16 additions & 10 deletions scripts/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def zipdir(path, zip):
tmpFile = os.path.join(os.getcwd(), archiveName)

i = 0
ignoreData = (".git", ".gitignore", ".gitmodules", "dist_assets", "build", "dist", "scripts", ".idea")
ignoreData = (".git", ".gitignore", ".gitmodules", "dist_assets", "build", "dist", "scripts", ".idea", "imgs")
def loginfo(path, names):
# Print out a "progress" and return directories / files to ignore
global i
Expand All @@ -149,7 +149,7 @@ def loginfo(path, names):
i = 0
shutil.copytree(skeleton, dst, ignore=loginfo)
print
if "win-wx3" not in skel:
if skel != "win":
# simply copying base into working build
base = os.path.join(dst, info["base"])
print "Copying base to ", base
Expand All @@ -174,6 +174,7 @@ def loginfo(path, names):
sys.path.append(source)
import setup

print "Injecting files into library.zip"
# the following operations require us to be in the source directory
# for the zipping to work correctly
oldcwd = os.getcwd()
Expand All @@ -187,19 +188,24 @@ def loginfo(path, names):
library.write('pyfa.py', 'pyfa__main__.py')
library.write('config.py')

print "Copying included files"
for dir in setup.include_files:
copyanything(dir, os.path.join(base, dir))

# @todo: this is in win-wx3 for now, but it will have to be migrated to OS X release when wx3 is merged into master. This must be tested
imagesFile = os.path.join(base, "imgs.zip")

with zipfile.ZipFile(imagesFile, 'w') as images:
os.chdir('imgs') # need to be in images directory
for dir in setup.icon_dirs:
zipdir(dir, images)

os.chdir(oldcwd)

print "Creating images zipfile"
# Move imgs to zipfile
oldcwd = os.getcwd()
os.chdir(source)
imagesFile = os.path.join(base, "imgs.zip")

with zipfile.ZipFile(imagesFile, 'w') as images:
os.chdir('imgs') # need to be in images directory
for dir in setup.icon_dirs:
zipdir(dir, images)
os.chdir(oldcwd)

if options.zip:
archive = zipfile.ZipFile(tmpFile, 'w', compression=zipfile.ZIP_DEFLATED)
zipdir(dirName, archive)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""

packages = ['eos', 'gui', 'service', 'utils']
include_files = ['eve.db', 'gpl.txt']
include_files = ['eve.db', 'LICENSE', 'README.md']
# this is read by dist.py to package the icons
icon_dirs = ['gui', 'icons', 'renders']

Expand Down

0 comments on commit 231cdb8

Please sign in to comment.