Skip to content

Commit

Permalink
Warn user if C++ rt missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheeo committed Mar 30, 2016
1 parent 6539507 commit add45e0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/chat/_chatwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def __init__(self, client, *args, **kwargs):
def disconnect(self):
self.canDisconnect = True
self.irc_disconnect()
self._notifier = None
if self._notifier:
self._notifier.activated.disconnect(self.once)
self._notifier = None


@QtCore.pyqtSlot(object)
Expand Down
4 changes: 3 additions & 1 deletion src/client/_clientwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ def disconnectedFromServer(self):
self.urls = {}
self.usersUpdated.emit(oldplayers)

if self.state != ClientState.DISCONNECTED:
if self.state != ClientState.DISCONNECTED and self.state != ClientState.SHUTDOWN:
self.state = ClientState.DROPPED
if self._connection_attempts < 2:
logger.info("Reconnecting immediately")
Expand Down Expand Up @@ -1118,6 +1118,8 @@ def handle_session(self, message):
@QtCore.pyqtSlot()
def perform_login(self):
self.uniqueId = util.uniqueID(self.login, self.session)
if not self.uniqueId:
return False
self.send(dict(command="hello",
login=self.login,
password=self.password,
Expand Down
6 changes: 4 additions & 2 deletions src/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,10 @@ def uniqueID(user, session):
return baseString

except:
logger.error("UniqueID Failure", exc_info=sys.exc_info())
return None
QtGui.QMessageBox.warning(None, "C++ 2010 Runtime Missing",
"You are missing the Microsoft Visual C++ 2010 Runtime.<br><br>Get it from here: <a href='https://www.microsoft.com/en-us/download/details.aspx?id=5555'>https://www.microsoft.com/en-us/download/details.aspx?id=5555</a>")
logger.warning("UniqueID Failure, user warned", exc_info=sys.exc_info())
QtGui.QApplication.quit()


import datetime
Expand Down

8 comments on commit add45e0

@muellni
Copy link
Contributor

Choose a reason for hiding this comment

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

The game worked without a working call to uid.dll since the server change. Is the UniqueID now required to play?

@Sheeo
Copy link
Member Author

@Sheeo Sheeo commented on add45e0 Mar 30, 2016

Choose a reason for hiding this comment

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

Yes, it is, and that was a bug unfortunately.

@muellni
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to create a native uid library for Linux? Or port it to Python? There's no source code available, right?

@yorick-ne
Copy link
Contributor

Choose a reason for hiding this comment

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

iirc pattogos fork of the client was able to run on linux, so he found a way to make this work. he had a repo on bitbucket https://bitbucket.org/fafafaf/modular-client-linux-fix

@muellni
Copy link
Contributor

Choose a reason for hiding this comment

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

I used that repo before.
He ran the uid.dll through a wrapper uid.exe using wine. I'd like to avoid that if possible.

@Sheeo
Copy link
Member Author

@Sheeo Sheeo commented on add45e0 Mar 30, 2016

Choose a reason for hiding this comment

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

@muellni I'm very open to reimplementing uid.dll in python and getting rid of this dependency, but I can't invest this time myself unfortunately.

@muellni
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm very open to reimplementing uid.dll in python and getting rid of this dependency, but I can't invest this time myself unfortunately.

Great, I'd like to try that.

But assuming that a python-only implementation is possible, the smurf protection could be bypassed by using modified sources.
I don't know how vital smurf protection is for FAF.

@Sheeo
Copy link
Member Author

@Sheeo Sheeo commented on add45e0 Mar 30, 2016

Choose a reason for hiding this comment

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

Can you send me an email at [email protected]? I'll get you on our slack so we can discuss this further.

Please sign in to comment.