From 231cdb83997029d9d7a98f434bb8f1c38d2855c5 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Sun, 4 Oct 2015 22:07:23 -0400 Subject: [PATCH] Fix minor default settings, fix dist script for wx3 merge --- gui/mainFrame.py | 2 +- scripts/dist.py | 26 ++++++++++++++++---------- setup.py | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/gui/mainFrame.py b/gui/mainFrame.py index 587cfb79e..9a1e9eec3 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -222,7 +222,7 @@ class MainFrame(wx.Frame): 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"]: diff --git a/scripts/dist.py b/scripts/dist.py index b13cb48d9..b76aab9b3 100755 --- a/scripts/dist.py +++ b/scripts/dist.py @@ -134,7 +134,7 @@ if __name__ == "__main__": 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 @@ -149,7 +149,7 @@ if __name__ == "__main__": 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 @@ -174,6 +174,7 @@ if __name__ == "__main__": 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() @@ -187,19 +188,24 @@ if __name__ == "__main__": 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) diff --git a/setup.py b/setup.py index 04966bb0d..7d89c05ef 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ Windows executable + installer: python setup.py bdist_msi """ 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']