From 193cafcc9d3a6c21892770393020fac717c88eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Fri, 12 Dec 2014 12:21:59 -0600 Subject: [PATCH] A bash script to create TWBlue installer versions has been added --- src/gui/main.py | 4 +++ tools/build_installer.sh | 57 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 tools/build_installer.sh diff --git a/src/gui/main.py b/src/gui/main.py index 50f178a8..c9747f3b 100644 --- a/src/gui/main.py +++ b/src/gui/main.py @@ -817,6 +817,8 @@ class mainFrame(wx.Frame): except: msg = _(u"%s. Empty") % (self.nb.GetPageText(self.nb.GetSelection())) output.speak(msg, 1) + if self.showing == True: + self.nb.GetCurrentPage().list.list.SetFocus() def right(self, event=None): num = self.nb.GetSelection() @@ -830,6 +832,8 @@ class mainFrame(wx.Frame): except: msg = _(u"%s. Empty") % (self.nb.GetPageText(self.nb.GetSelection())) output.speak(msg, 1) + if self.showing == True: + self.nb.GetCurrentPage().list.list.SetFocus() def create_invisible_keyboard_shorcuts(self): keymap = {} diff --git a/tools/build_installer.sh b/tools/build_installer.sh new file mode 100644 index 00000000..5217c4f2 --- /dev/null +++ b/tools/build_installer.sh @@ -0,0 +1,57 @@ +#!/bin/bash +# Define paths for a regular use, if there are not paths for python32 or 64, these commands will be taken. +pythonpath32="C:/python27x86" +pythonpath64="C:/python27" +nsyspath=$PROGRAMFILES/NSIS + +help () { + echo -e "$0 | usage:" + echo -e "$0 | \t./generate_installer.sh [-py32path | -py64path | -nsyspath | -h]" +} + +# parsing options from the command line +while [[ $# > 1 ]] + do + key="$1" + shift + +case $key in + -py32path) + pythonpath32="$1" + shift + ;; + -py64path) + pythonpath64="$1" + shift + ;; + -nsispath) + nsispath="$1" + shift + ;; + -help) + help + ;; + *) + help +esac +done + +cd ../src +if [ -d build/ ]; + then + rm -rf build +fi +if [ -d dist/ ]; + then + rm -rf dist +fi +$pythonpath32/python.exe "setup.py" "py2exe" "--quiet" +mv -f dist ../scripts/TWBlue64 +rm -rf build +$pythonpath64/python.exe "setup.py" "py2exe" "--quiet" +mv -f dist ../scripts/TWBlue +rm -rf build +cd ../scripts +$nsispath/Unicode/makensis.exe "twblue.nsi" +rm -rf TWBlue +rm -rf TWBlue64 \ No newline at end of file