Skip to content

Commit

Permalink
Release 0.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ngld committed Apr 16, 2018
2 parents 96b6fcb + 8728340 commit 17d4ff0
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion knossos/center.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# The version should follow the http://semver.org guidelines.
# Only remove the -dev tag if you're making a release!
VERSION = '0.9.3'
VERSION = '0.9.4'
UPDATE_LINK = 'https://fsnebula.org/knossos'
INNOEXTRACT_LINK = 'https://dev.tproxy.de/knossos/innoextract.txt'
DEBUG = os.getenv('KN_DEBUG', '0').strip() == '1'
Expand Down
19 changes: 14 additions & 5 deletions knossos/clibs.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
from . import center

if sys.platform == 'win32':
from comtypes import client as cc

ENCODING = 'latin1'
else:
ENCODING = 'utf8'
Expand Down Expand Up @@ -417,7 +415,8 @@ def list_voices():
return []

try:
voice = cc.CreateObject('SAPI.SpVoice')
import win32com.client as cc
voice = cc.Dispatch('SAPI.SpVoice')
return [v.GetDescription() for v in voice.GetVoices()]
except Exception:
logging.exception('Failed to retrieve voices!')
Expand All @@ -429,8 +428,18 @@ def speak(voice, volume, text):
return False

try:
hdl = cc.CreateObject('SAPI.SpVoice')
hdl.Voice = hdl.GetVoices()[voice]
import win32com.client as cc

hdl = cc.Dispatch('SAPI.SpVoice')

# We always seem to receive an AttributeError when we try to access
# SetVoice the first time. It works the second time for whatever reason... >_>
try:
hdl.SetVoice
except AttributeError:
pass

hdl.SetVoice(hdl.GetVoices()[voice])
hdl.Volume = volume
hdl.Speak(text, 19)
hdl.WaitUntilDone(10000)
Expand Down
2 changes: 2 additions & 0 deletions knossos/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@ def _check_editable(self):
except Exception:
logging.exception('Failed to retrieve editable status for %s!' % mid)
res[mid] = False
else:
res[mid] = False

if not self.closed:
self.updateEditable.emit(res)
Expand Down
2 changes: 1 addition & 1 deletion releng/windows/Knossos.spec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ onefile = False
him = ['knossos.parsetab']
debug = os.environ.get('KN_BUILD_DEBUG') == 'yes'
is_x64 = platform.architecture()[0] == '64bit'
rthooks = ['fix-comtypes-rthook.py', 'version-rthook.py']
rthooks = ['version-rthook.py']

if debug:
rthooks.append('../../tools/common/debug-rthook.py')
Expand Down
6 changes: 0 additions & 6 deletions releng/windows/fix-comtypes-rthook.py

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
data = stream.read()
commit = data[:7]
if commit == '0000000':
commit = data.split(' ')[1][:7]
commit = data.splitlines()[-1].split(' ')[1][:7]

version += '+' + commit
elif len(ref[0]) == 40:
Expand Down

0 comments on commit 17d4ff0

Please sign in to comment.