1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

* some fixes for windows

git-svn-id: file:///home/shlomif/Backup/svn-dumps/PySolFC/svnsync-repos/pysolfc/PySolFC/trunk@254 efabe8c0-fbe8-4139-b769-b5e6d273206e
This commit is contained in:
skomoroh 2009-12-03 19:25:06 +00:00
parent b227c1c2e2
commit 066821b011
2 changed files with 10 additions and 3 deletions

View file

@ -149,10 +149,10 @@ def init():
if sys.path[0] and not os.path.isdir(sys.path[0]): # i.e. library.zip
d = os.path.dirname(sys.path[0])
os.chdir(d) # for read presets
fcs_command = os.path.join('freecell-solver', 'fc-solve.exe')
fcs_command = os.path.join('freecell-solver', 'bin', 'fc-solve.exe')
settings.FCS_COMMAND = fcs_command
##f = os.path.join(d, 'freecell-solver', 'presetrc')
##os.environ['FREECELL_SOLVER_PRESETRC'] = f # defined in prefix.h
f = os.path.join('freecell-solver', 'presetrc')
os.environ['FREECELL_SOLVER_PRESETRC'] = f
if os.name in ('posix', 'nt'):
try:
kw = {'shell': True,

View file

@ -134,9 +134,16 @@ if os.name == "posix":
def win32_getusername():
user = os.environ.get('USERNAME','').strip()
try:
user = unicode(user, locale.getpreferredencoding())
except:
user = ''
return user
def win32_getprefdir(package):
portprefdir = 'config' # portable varsion
if os.path.isdir(portprefdir):
return portprefdir
# %USERPROFILE%, %APPDATA%
hd = os.environ.get('APPDATA')
if not hd: