Skip to content

Commit 9b94ec6

Browse files
Installer (#1883)
* Add Pywin32 dependency on run time, when in Windows * Better launch of postinstaller. * Better shortcut on MacOS. Removed ride_postinstall.py * Set version to 1.7.4dev1 * Reintroduces ride_postinstall.py. Simplifies execution. Only runs postinstaller with setup.py, not with pip. * Fixes installer on python 3.7 on MacOS. * Adds PyPubSub to installer. * Adds Pygments to installer. Fixes sh starter in MacOS shortcut.
1 parent 2810f61 commit 9b94ec6

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
ROOT_DIR = dirname(abspath(__file__))
2424
SOURCE_DIR = 'src'
25-
REQUIREMENTS = ['wxPython']
25+
REQUIREMENTS = ['wxPython', 'PyPubSub', 'Pygments']
2626

2727
#Windows specific requirements
2828
if sys.platform == 'win32':

src/bin/ride_postinstall.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@
1717

1818
import os
1919
import sys
20+
from robotide.postinstall import __main__ as postinstall
2021

2122
# Must be protected against reimporting
2223
# As multiprocessing has an odd requirement
2324
# and we use multiprocessing
2425
# http://docs.python.org/library/multiprocessing.html#windows
2526
if __name__ == '__main__':
26-
arg = " ".join(sys.argv[1:]) if len(sys.argv[1:]) > 0 else "-help"
27-
py = sys.executable
28-
os.system("{} -m robotide.postinstall {}\n".format(py,arg))
27+
postinstall.caller(None, sys.platform.lower())

src/robotide/postinstall/__main__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,12 @@ def _create_desktop_shortcut_mac(frame=None):
156156
import os
157157
import subprocess
158158
import pwd
159-
user = subprocess.check_output(['logname']).strip()
160-
link = os.path.join("/Users", user, "Desktop", "RIDE")
159+
if PY2:
160+
user = unicode(subprocess.check_output(['logname']).strip())
161+
else:
162+
user = str(subprocess.check_output(['logname']).strip(),
163+
encoding='utf-8')
164+
link = os.path.join("/Users", user, "Desktop", "RIDE.command")
161165
if not exists(link) or option_f:
162166
if not option_q and not option_f:
163167
if not _askyesno("Setup", "Create desktop shortcut?", frame):
@@ -225,7 +229,7 @@ def caller(frame, platform):
225229
global option_q
226230
global option_f
227231
option_q = None
228-
option_f = True
232+
option_f = frame is not None
229233
# We don't verify install because called from RIDE
230234
return create_desktop_shortcut(platform, frame)
231235

src/robotide/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# limitations under the License.
1515
#
1616
# Automatically generated by `tasks.py`.
17-
VERSION = '1.7.4dev'
17+
VERSION = '1.7.4dev1'

0 commit comments

Comments
 (0)