-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #286 from RoDuth/ghini-1.0-wininstaller
windows installer
- Loading branch information
Showing
11 changed files
with
750 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
# | ||
# Copyright (c) 2005,2006,2007,2008,2009 Brett Adams <[email protected]> | ||
# Copyright (c) 2012-2016 Mario Frasca <[email protected]> | ||
# Copyright (c) 2016 Ross Demuth <[email protected]> | ||
# | ||
# This file is part of ghini.desktop. | ||
# | ||
|
@@ -217,6 +218,14 @@ def main(uri=None): | |
if not os.path.exists(paths.appdata_dir()): | ||
os.makedirs(paths.appdata_dir()) | ||
|
||
# a hack to write stderr and stdout to a file in a py2exe environment | ||
# prevents failed attempts at creating ghini.exe.log | ||
if main_is_frozen(): | ||
_stdout = os.path.join(paths.user_dir(), 'stdout.log') | ||
_stderr = os.path.join(paths.user_dir(), 'stderr.log') | ||
sys.stdout = open(_stdout, 'w') | ||
sys.stderr = open(_stderr, 'w') | ||
|
||
# add console root handler, and file root handler, set it at the logging | ||
# level specified by BAUBLE_LOGGING, or at INFO level. | ||
filename = os.path.join(paths.appdata_dir(), 'bauble.log') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
# | ||
# Copyright 2008-2010 Brett Adams | ||
# Copyright 2015-2016 Mario Frasca <[email protected]>. | ||
# Copyright 2016 Ross Demuth <[email protected]> | ||
# | ||
# This file is part of ghini.desktop. | ||
# | ||
|
@@ -223,9 +224,15 @@ def __init__(self, view=None): | |
except: | ||
pass | ||
|
||
from threading import Thread | ||
self.start_thread(Thread(target=check_and_notify_new_version, | ||
from bauble import main_is_frozen | ||
# Don't check for new versions if we are in a py2exe environment | ||
if main_is_frozen(): | ||
pass | ||
else: | ||
from threading import Thread | ||
self.start_thread(Thread(target=check_and_notify_new_version, | ||
args=[self.view])) | ||
logger.debug('main_is_frozen = %s' % (main_is_frozen())) | ||
|
||
def on_file_btnbrowse_clicked(self, *args): | ||
previously = self.view.widget_get_value('file_entry') | ||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
# | ||
# Copyright (c) 2005,2006,2007,2008,2009 Brett Adams <[email protected]> | ||
# Copyright (c) 2012-2016 Mario Frasca <[email protected]> | ||
# Copyright (c) 2016 Ross Demuth <[email protected]> | ||
# | ||
# This file is part of ghini.desktop. | ||
# | ||
|
@@ -89,7 +90,7 @@ def installation_dir(): | |
elif sys.platform == 'win32': | ||
# main_dir is the location of the scripts, which is located in the | ||
# installation_dir: | ||
d = os.path.dirname(main_dir()) | ||
d = main_dir() | ||
else: | ||
raise NotImplementedError('This platform does not support ' | ||
'translations: %s' % sys.platform) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
# | ||
# Copyright 2008-2010 Brett Adams | ||
# Copyright 2014-2017 Mario Frasca <[email protected]>. | ||
# Copyright 2016 Ross Demuth <[email protected]> | ||
# | ||
# This file is part of ghini.desktop. | ||
# | ||
|
@@ -31,7 +32,13 @@ | |
|
||
|
||
def _open_link(func, data=None): | ||
desktop.open(data) | ||
# windows generates odd characters in the uri unless its in ascii | ||
import sys | ||
if sys.platform == 'win32' : | ||
udata=data.decode("utf-8") | ||
asciidata=udata.encode("ascii","ignore") | ||
desktop.open(asciidata) | ||
else : desktop.open(data) | ||
|
||
gtk.link_button_set_uri_hook(_open_link) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
' -Copyright (c) 2016,2017 Ross Demuth <[email protected]> | ||
' | ||
' This file is part of ghini.desktop. | ||
' | ||
' ghini.desktop is free software: you can redistribute it and/or modify | ||
' it under the terms of the GNU General Public License as published by | ||
' the Free Software Foundation, either version 3 of the License, or | ||
' (at your option) any later version. | ||
' | ||
' ghini.desktop is distributed in the hope that it will be useful, | ||
' but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
' GNU General Public License for more details. | ||
' | ||
' You should have received a copy of the GNU General Public License | ||
' along with ghini.desktop. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
' a simple script used by the nsis installer to prepend to the PATH | ||
' EXAMPLES: | ||
' cscript.exe Add_to_PATH.vbs /path:"C:\TEST" /env:"USER" | ||
' cscript.exe //E:vbscript Add_to_PATH.vbs /env:"SYSTEM" /path:"C:\TEST\" | ||
|
||
Dim wshShell : Set wshShell = CreateObject("WScript.Shell") | ||
Dim strPathToAdd : strPathToAdd = WScript.Arguments.Named("path") | ||
Dim strEnv : strEnv = WScript.Arguments.Named("env") | ||
|
||
Dim wshSysEnv : Set wshSysEnv = wshShell.Environment(strEnv) | ||
Dim strCurrentPath : strCurrentPath = wshSysEnv("PATH") | ||
|
||
Dim strNewPath : strNewPath = strPathToAdd & ";" & strCurrentPath | ||
wshSysEnv("PATH") = strNewPath |
Oops, something went wrong.