Skip to content

Commit 5aede66

Browse files
Installer - Fixes installation to all OS (#1862)
* Adds a File Manager pane. Jumps to folder or file when open project. * Better activation of file or directory opened * First working version of File panel. Double click of files to open, in RIDE or external simple editor. * Minor refactoring * Feature: When invalid data file, open in Code Editor * Fixes installer * Add Pywin32 dependency on run time, when in Windows
1 parent 4b3142d commit 5aede66

File tree

3 files changed

+6
-31
lines changed

3 files changed

+6
-31
lines changed

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
wxPython
2+
# Only for Windows to have a shortcut created (install before RIDE)
3+
Pywin32; sys_platform == 'win32'
24
Pygments # This enables syntax highlighted in Text Editor
35
robotframeworklexer # Updates lexer to newer RF 3.1.1
46
robotframework

requirements_win32.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

setup.py

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,10 @@
2222

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

27-
#Windows specific requirements
2827
if sys.platform == 'win32':
29-
with open(join(ROOT_DIR, 'requirements_win32.txt')) as f:
30-
REQ_WIN = f.read().splitlines()
31-
32-
for idx in range(0, len(REQ_WIN)):
33-
if REQ_WIN[idx].startswith('#') or REQ_WIN[idx].startswith('-r'):
34-
continue
35-
else:
36-
REQUIREMENTS.append(REQ_WIN[idx])
37-
38-
# Common requirements
39-
with open(join(ROOT_DIR, 'requirements.txt')) as f:
40-
REQ_COMMON = f.read().splitlines()
41-
42-
for idx in range(0, len(REQ_COMMON)):
43-
if REQ_COMMON[idx].startswith('#') or REQ_COMMON[idx].startswith('-r'):
44-
continue
45-
else:
46-
REQUIREMENTS.append(REQ_COMMON[idx])
47-
48-
for idx in range(0, len(REQUIREMENTS)):
49-
if (REQUIREMENTS[idx].find(';') != -1):
50-
REQUIREMENTS[idx] = REQUIREMENTS[idx][0:REQUIREMENTS[idx].find(';')].strip()
51-
if (REQUIREMENTS[idx].find('#') != -1):
52-
REQUIREMENTS[idx] = REQUIREMENTS[idx][0:REQUIREMENTS[idx].find('#')].strip()
28+
REQUIREMENTS.append('Pywin32')
5329

5430
version_file = join(ROOT_DIR, 'src', 'robotide', 'version.py')
5531
exec(compile(open(version_file).read(), version_file, 'exec'))
@@ -78,14 +54,15 @@
7854
# This solution is found at http://stackoverflow.com/a/26490820/5889853
7955
from setuptools.command.install import install
8056
import os
57+
import sys
8158

8259

8360
class CustomInstallCommand(install):
8461
"""Customized setuptools install command - prints a friendly greeting."""
8562
def run(self):
8663
install.run(self)
8764
_ = sys.stderr.write("Creating Desktop Shortcut to RIDE...\n")
88-
os.system("ride_postinstall.py -install")
65+
os.system(sys.executable + " -m robotide.postinstall -install")
8966

9067
setup(
9168
name='robotframework-ride',

0 commit comments

Comments
 (0)