Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Add basic support for OS X #80

Closed
wants to merge 1 commit into from
Closed

Conversation

patternoia
Copy link

Hi, here is a product of my short hacking around your code.
I will not have much time to support it further, but this could be a good foundation to possibly further extend the code to support linux/other posix compatible systems.

Cheers,
pat

@remyroy
Copy link
Owner

remyroy commented Oct 3, 2016

Awesome! I'll try to check it out shortly and see if I could release a OSX version soon.

@@ -378,7 +470,7 @@ def check_new_launcher_version(self):
def lv_http_finished(self):
self.lv_html.seek(0)
document = html5lib.parse(self.lv_html, treebuilder='lxml',
encoding='utf8', namespaceHTMLElements=False)
namespaceHTMLElements=False)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my python deployment (Python 3.5.1 from Homebrew) there is no such parameter as 'encoding'

@@ -497,7 +589,7 @@ def __init__(self):

try:
self.pipe = SimpleNamedPipe('cddagl_instance')
except (OSError, PyWinError):
except (OSError):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PyWinError should be generalized to some other which is platform independent. I excluded it for now.

@@ -2208,6 +2351,27 @@ def run(self):

self.completed.emit()

class TestingImgThread(QThread):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check could be skipped, since the image verification happens during the mounting. But I left it in place for consistency.

@patternoia
Copy link
Author

It would be great to refactor and segment the program to divide single ~8k lines ui.py file into smaller blocks. I really had some problems with it

return os.name == 'posix'

def is_64_system():
return sys.maxsize > 2**32
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fail detecting a 64-bit OS that runs a 32-bit version of Python. This needs to be changed so it can detect the OS bitness.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, platform.architecture()[0] gives more reliable result according to http://stackoverflow.com/questions/1842544/how-do-i-detect-if-python-is-running-as-a-64-bit-application

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

platform.architecture()[0] will also fail to detect a 64-bit OS that runs a 32-bit version of Python. On my Windows 64-bit, here is what I get:

>>> platform.architecture()[0]
'32bit'

@remyroy
Copy link
Owner

remyroy commented Oct 3, 2016

This is related to #73.

@remyroy remyroy mentioned this pull request Nov 14, 2016
@patternoia
Copy link
Author

Should close this, since it is too inmature and stale to be merged in near future.

@patternoia patternoia closed this Nov 30, 2016
@Veid Veid mentioned this pull request Apr 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants