From 08099d4409d4699825670ac6027a1910df9530bb Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Wed, 16 Feb 2022 22:16:41 +0200 Subject: [PATCH 1/7] Revert arguments renaming in bitmessageqt.settings --- src/bitmessageqt/settings.py | 82 ++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/src/bitmessageqt/settings.py b/src/bitmessageqt/settings.py index 501b2114..237d14e1 100644 --- a/src/bitmessageqt/settings.py +++ b/src/bitmessageqt/settings.py @@ -16,7 +16,7 @@ import paths import queues import state import widgets -from bmconfigparser import config +from bmconfigparser import config as config_obj from helper_sql import sqlExecute, sqlStoredProcedure from helper_startup import start_proxyconfig from network import knownnodes, AnnounceThread @@ -24,11 +24,11 @@ from network.asyncore_pollchoose import set_rates from tr import _translate -def getSOCKSProxyType(config_): +def getSOCKSProxyType(config): """Get user socksproxytype setting from *config*""" try: result = ConfigParser.SafeConfigParser.get( - config_, 'bitmessagesettings', 'socksproxytype') + config, 'bitmessagesettings', 'socksproxytype') except (ConfigParser.NoSectionError, ConfigParser.NoOptionError): return None else: @@ -45,7 +45,7 @@ class SettingsDialog(QtGui.QDialog): self.parent = parent self.firstrun = firstrun - self.config = config + self.config = config_obj self.net_restart_needed = False self.timer = QtCore.QTimer() @@ -80,7 +80,7 @@ class SettingsDialog(QtGui.QDialog): ) QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self)) - def adjust_from_config(self, config_): + def adjust_from_config(self, config): """Adjust all widgets state according to config settings""" # pylint: disable=too-many-branches,too-many-statements if not self.parent.tray.isSystemTrayAvailable(): @@ -89,31 +89,31 @@ class SettingsDialog(QtGui.QDialog): "MainWindow", "Tray (not available in your system)")) for setting in ( 'minimizetotray', 'trayonclose', 'startintray'): - config_.set('bitmessagesettings', setting, 'false') + config.set('bitmessagesettings', setting, 'false') else: self.checkBoxMinimizeToTray.setChecked( - config_.getboolean('bitmessagesettings', 'minimizetotray')) + config.getboolean('bitmessagesettings', 'minimizetotray')) self.checkBoxTrayOnClose.setChecked( - config_.safeGetBoolean('bitmessagesettings', 'trayonclose')) + config.safeGetBoolean('bitmessagesettings', 'trayonclose')) self.checkBoxStartInTray.setChecked( - config_.getboolean('bitmessagesettings', 'startintray')) + config.getboolean('bitmessagesettings', 'startintray')) self.checkBoxHideTrayConnectionNotifications.setChecked( - config_.getboolean( + config.getboolean( 'bitmessagesettings', 'hidetrayconnectionnotifications')) self.checkBoxShowTrayNotifications.setChecked( - config_.getboolean('bitmessagesettings', 'showtraynotifications')) + config.getboolean('bitmessagesettings', 'showtraynotifications')) self.checkBoxStartOnLogon.setChecked( - config_.getboolean('bitmessagesettings', 'startonlogon')) + config.getboolean('bitmessagesettings', 'startonlogon')) self.checkBoxWillinglySendToMobile.setChecked( - config_.safeGetBoolean( + config.safeGetBoolean( 'bitmessagesettings', 'willinglysendtomobile')) self.checkBoxUseIdenticons.setChecked( - config_.safeGetBoolean('bitmessagesettings', 'useidenticons')) + config.safeGetBoolean('bitmessagesettings', 'useidenticons')) self.checkBoxReplyBelow.setChecked( - config_.safeGetBoolean('bitmessagesettings', 'replybelow')) + config.safeGetBoolean('bitmessagesettings', 'replybelow')) if state.appdata == paths.lookupExeFolder(): self.checkBoxPortableMode.setChecked(True) @@ -142,57 +142,57 @@ class SettingsDialog(QtGui.QDialog): # On the Network settings tab: self.lineEditTCPPort.setText(str( - config_.get('bitmessagesettings', 'port'))) + config.get('bitmessagesettings', 'port'))) self.checkBoxUPnP.setChecked( - config_.safeGetBoolean('bitmessagesettings', 'upnp')) + config.safeGetBoolean('bitmessagesettings', 'upnp')) self.checkBoxUDP.setChecked( - config_.safeGetBoolean('bitmessagesettings', 'udp')) + config.safeGetBoolean('bitmessagesettings', 'udp')) self.checkBoxAuthentication.setChecked( - config_.getboolean('bitmessagesettings', 'socksauthentication')) + config.getboolean('bitmessagesettings', 'socksauthentication')) self.checkBoxSocksListen.setChecked( - config_.getboolean('bitmessagesettings', 'sockslisten')) + config.getboolean('bitmessagesettings', 'sockslisten')) self.checkBoxOnionOnly.setChecked( - config_.safeGetBoolean('bitmessagesettings', 'onionservicesonly')) + config.safeGetBoolean('bitmessagesettings', 'onionservicesonly')) - self._proxy_type = getSOCKSProxyType(config_) + self._proxy_type = getSOCKSProxyType(config) self.comboBoxProxyType.setCurrentIndex( 0 if not self._proxy_type else self.comboBoxProxyType.findText(self._proxy_type)) self.comboBoxProxyTypeChanged(self.comboBoxProxyType.currentIndex()) self.lineEditSocksHostname.setText( - config_.get('bitmessagesettings', 'sockshostname')) + config.get('bitmessagesettings', 'sockshostname')) self.lineEditSocksPort.setText(str( - config_.get('bitmessagesettings', 'socksport'))) + config.get('bitmessagesettings', 'socksport'))) self.lineEditSocksUsername.setText( - config_.get('bitmessagesettings', 'socksusername')) + config.get('bitmessagesettings', 'socksusername')) self.lineEditSocksPassword.setText( - config_.get('bitmessagesettings', 'sockspassword')) + config.get('bitmessagesettings', 'sockspassword')) self.lineEditMaxDownloadRate.setText(str( - config_.get('bitmessagesettings', 'maxdownloadrate'))) + config.get('bitmessagesettings', 'maxdownloadrate'))) self.lineEditMaxUploadRate.setText(str( - config_.get('bitmessagesettings', 'maxuploadrate'))) + config.get('bitmessagesettings', 'maxuploadrate'))) self.lineEditMaxOutboundConnections.setText(str( - config_.get('bitmessagesettings', 'maxoutboundconnections'))) + config.get('bitmessagesettings', 'maxoutboundconnections'))) # Demanded difficulty tab self.lineEditTotalDifficulty.setText(str((float( - config_.getint( + config.getint( 'bitmessagesettings', 'defaultnoncetrialsperbyte') ) / defaults.networkDefaultProofOfWorkNonceTrialsPerByte))) self.lineEditSmallMessageDifficulty.setText(str((float( - config_.getint( + config.getint( 'bitmessagesettings', 'defaultpayloadlengthextrabytes') ) / defaults.networkDefaultPayloadLengthExtraBytes))) # Max acceptable difficulty tab self.lineEditMaxAcceptableTotalDifficulty.setText(str((float( - config_.getint( + config.getint( 'bitmessagesettings', 'maxacceptablenoncetrialsperbyte') ) / defaults.networkDefaultProofOfWorkNonceTrialsPerByte))) self.lineEditMaxAcceptableSmallMessageDifficulty.setText(str((float( - config_.getint( + config.getint( 'bitmessagesettings', 'maxacceptablepayloadlengthextrabytes') ) / defaults.networkDefaultPayloadLengthExtraBytes))) @@ -203,21 +203,21 @@ class SettingsDialog(QtGui.QDialog): self.comboBoxOpenCL.addItems(openclpow.vendors) self.comboBoxOpenCL.setCurrentIndex(0) for i in range(self.comboBoxOpenCL.count()): - if self.comboBoxOpenCL.itemText(i) == config_.safeGet( + if self.comboBoxOpenCL.itemText(i) == config.safeGet( 'bitmessagesettings', 'opencl'): self.comboBoxOpenCL.setCurrentIndex(i) break # Namecoin integration tab - nmctype = config_.get('bitmessagesettings', 'namecoinrpctype') + nmctype = config.get('bitmessagesettings', 'namecoinrpctype') self.lineEditNamecoinHost.setText( - config_.get('bitmessagesettings', 'namecoinrpchost')) + config.get('bitmessagesettings', 'namecoinrpchost')) self.lineEditNamecoinPort.setText(str( - config_.get('bitmessagesettings', 'namecoinrpcport'))) + config.get('bitmessagesettings', 'namecoinrpcport'))) self.lineEditNamecoinUser.setText( - config_.get('bitmessagesettings', 'namecoinrpcuser')) + config.get('bitmessagesettings', 'namecoinrpcuser')) self.lineEditNamecoinPassword.setText( - config_.get('bitmessagesettings', 'namecoinrpcpassword')) + config.get('bitmessagesettings', 'namecoinrpcpassword')) if nmctype == "namecoind": self.radioButtonNamecoinNamecoind.setChecked(True) @@ -232,9 +232,9 @@ class SettingsDialog(QtGui.QDialog): # Message Resend tab self.lineEditDays.setText(str( - config_.get('bitmessagesettings', 'stopresendingafterxdays'))) + config.get('bitmessagesettings', 'stopresendingafterxdays'))) self.lineEditMonths.setText(str( - config_.get('bitmessagesettings', 'stopresendingafterxmonths'))) + config.get('bitmessagesettings', 'stopresendingafterxmonths'))) def comboBoxProxyTypeChanged(self, comboBoxIndex): """A callback for currentIndexChanged event of comboBoxProxyType""" From 161a0b2059b5f3f3b62cb36f5239d8a87f2f7eab Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Wed, 16 Feb 2022 22:55:17 +0200 Subject: [PATCH 2/7] Return use of BMConfigParser._temp dict, also empty _temp in BMConfigParser._reset(). --- src/bmconfigparser.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/bmconfigparser.py b/src/bmconfigparser.py index 312a6f97..16d217e8 100644 --- a/src/bmconfigparser.py +++ b/src/bmconfigparser.py @@ -36,6 +36,15 @@ class BMConfigParser(SafeConfigParser): raise ValueError("Invalid value %s" % value) return SafeConfigParser.set(self, section, option, value) + def get(self, section, option, **kwargs): + """Try returning temporary value before using parent get()""" + try: + return self._temp[section][option] + except KeyError: + pass + return SafeConfigParser.get( + self, section, option, **kwargs) + def setTemp(self, section, option, value=None): """Temporary set option to value, not saving.""" try: @@ -91,8 +100,11 @@ class BMConfigParser(SafeConfigParser): return SafeConfigParser.items(self, section, True, variables) def _reset(self): - """Reset current config. There doesn't appear to be a built in - method for this""" + """ + Reset current config. + There doesn't appear to be a built in method for this. + """ + self._temp = {} sections = self.sections() for x in sections: self.remove_section(x) From 7d2b13e4ac52ebdfbfa6a7528a1e355ac4e6c941 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Wed, 16 Feb 2022 23:04:52 +0200 Subject: [PATCH 3/7] Format bmconfigparser: - remove meaningless comments, rename strange args, fix line lengths, - revert BMConfigParser.addresses() entanglement, - revert BMConfigParser read_file -> readfp alias. --- src/bmconfigparser.py | 51 ++++++++++++++-------------------------- src/tests/test_config.py | 2 +- 2 files changed, 19 insertions(+), 34 deletions(-) diff --git a/src/bmconfigparser.py b/src/bmconfigparser.py index 16d217e8..0a2ec558 100644 --- a/src/bmconfigparser.py +++ b/src/bmconfigparser.py @@ -4,7 +4,6 @@ BMConfigParser class definition and default configuration settings import os import shutil -import sys # FIXME: bad style! write more generally from threading import Event from datetime import datetime @@ -52,41 +51,36 @@ class BMConfigParser(SafeConfigParser): except KeyError: self._temp[section] = {option: value} - def safeGetBoolean(self, section, field): + def safeGetBoolean(self, section, option): """Return value as boolean, False on exceptions""" try: - # Used in the python2.7 - # return self.getboolean(section, field) - # Used in the python3.5.2 - # print(config, section, field) - return self.getboolean(section, field) + return self.getboolean(section, option) except (configparser.NoSectionError, configparser.NoOptionError, ValueError, AttributeError): return False - def safeGetInt(self, section, field, default=0): + def safeGetInt(self, section, option, default=0): """Return value as integer, default on exceptions, 0 if default missing""" try: - # Used in the python2.7 - # return self.getint(section, field) - # Used in the python3.7.0 - return int(self.get(section, field)) + return int(self.get(section, option)) except (configparser.NoSectionError, configparser.NoOptionError, ValueError, AttributeError): return default - def safeGetFloat(self, section, field, default=0.0): + def safeGetFloat(self, section, option, default=0.0): """Return value as float, default on exceptions, 0.0 if default missing""" try: - return self.getfloat(section, field) + return self.getfloat(section, option) except (configparser.NoSectionError, configparser.NoOptionError, ValueError, AttributeError): return default def safeGet(self, section, option, default=None): - """Return value as is, default on exceptions, None if default missing""" + """ + Return value as is, default on exceptions, None if default missing + """ try: return self.get(section, option) except (configparser.NoSectionError, configparser.NoOptionError, @@ -111,26 +105,14 @@ class BMConfigParser(SafeConfigParser): def read(self, filenames=None): self._reset() - SafeConfigParser.read(self, os.path.join(os.path.dirname(__file__), 'default.ini')) + SafeConfigParser.read( + self, os.path.join(os.path.dirname(__file__), 'default.ini')) if filenames: SafeConfigParser.read(self, filenames) - if sys.version_info[0] == 3: - @staticmethod - def addresses(hidden=False): - """Return a list of local bitmessage addresses (from section labels)""" - return [x for x in config.sections() if x.startswith('BM-') and ( - hidden or not config.safeGetBoolean(x, 'hidden'))] - - def readfp(self, fp, filename=None): - # pylint: disable=no-member - SafeConfigParser.read_file(self, fp) - else: - @staticmethod - def addresses(): - """Return a list of local bitmessage addresses (from section labels)""" - return [ - x for x in config.sections() if x.startswith('BM-')] + def addresses(self): + """Return a list of local bitmessage addresses (from section labels)""" + return [x for x in self.sections() if x.startswith('BM-')] def save(self): """Save the runtime config onto the filesystem""" @@ -173,4 +155,7 @@ class BMConfigParser(SafeConfigParser): return True -config = BMConfigParser() +if not getattr(BMConfigParser, 'read_file', False): + BMConfigParser.read_file = BMConfigParser.readfp + +config = BMConfigParser() # TODO: remove this crutch diff --git a/src/tests/test_config.py b/src/tests/test_config.py index cb725369..f2574522 100644 --- a/src/tests/test_config.py +++ b/src/tests/test_config.py @@ -81,7 +81,7 @@ class TestConfig(unittest.TestCase): """safeGetInt retuns provided default for bitmessagesettings option or 0""" config = BMConfigParser() test_config_object = StringIO(test_config) - config.readfp(test_config_object) + config.read_file(test_config_object) self.assertEqual( config.safeGetInt('bitmessagesettings', 'maxaddrperstreamsend'), 100) # pylint: disable=protected-access From 858705357a7367c655a019078e4e108bc40d5d50 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Wed, 16 Feb 2022 23:51:12 +0200 Subject: [PATCH 4/7] Format test_config - for PEP8 compatibility, rewrite copypasted docstring, - remove unused configfile slot, move pylint hint, - define TestConfig.setUp(), creating BMConfigParser obj, --- src/tests/test_config.py | 56 +++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/src/tests/test_config.py b/src/tests/test_config.py index f2574522..26624996 100644 --- a/src/tests/test_config.py +++ b/src/tests/test_config.py @@ -1,4 +1,3 @@ -# pylint: disable=no-member, no-self-use """ Various tests for config """ @@ -36,63 +35,60 @@ maxnodes = 15000 maxsize = 1048576""" +# pylint: disable=protected-access class TestConfig(unittest.TestCase): """A test case for bmconfigparser""" - configfile = StringIO('') + + def setUp(self): + self.config = BMConfigParser() + self.config.add_section('bitmessagesettings') def test_safeGet(self): """safeGet retuns provided default for nonexistent option or None""" - config = BMConfigParser() self.assertIs( - config.safeGet('nonexistent', 'nonexistent'), None) + self.config.safeGet('nonexistent', 'nonexistent'), None) self.assertEqual( - config.safeGet('nonexistent', 'nonexistent', 42), 42) + self.config.safeGet('nonexistent', 'nonexistent', 42), 42) def test_safeGetBoolean(self): """safeGetBoolean returns False for nonexistent option, no default""" - config = BMConfigParser() self.assertIs( - config.safeGetBoolean('nonexistent', 'nonexistent'), - False - ) + self.config.safeGetBoolean('nonexistent', 'nonexistent'), False) # no arg for default # pylint: disable=too-many-function-args with self.assertRaises(TypeError): - config.safeGetBoolean( - 'nonexistent', 'nonexistent', True) + self.config.safeGetBoolean('nonexistent', 'nonexistent', True) def test_safeGetInt(self): """safeGetInt retuns provided default for nonexistent option or 0""" - config = BMConfigParser() self.assertEqual( - config.safeGetInt('nonexistent', 'nonexistent'), 0) + self.config.safeGetInt('nonexistent', 'nonexistent'), 0) self.assertEqual( - config.safeGetInt('nonexistent', 'nonexistent', 42), 42) + self.config.safeGetInt('nonexistent', 'nonexistent', 42), 42) def test_safeGetFloat(self): - """safeGetFloat retuns provided default for nonexistent option or 0.0""" - config = BMConfigParser() + """ + safeGetFloat retuns provided default for nonexistent option or 0.0 + """ self.assertEqual( - config.safeGetFloat('nonexistent', 'nonexistent'), 0.0) + self.config.safeGetFloat('nonexistent', 'nonexistent'), 0.0) self.assertEqual( - config.safeGetFloat('nonexistent', 'nonexistent', 42.0), 42.0) + self.config.safeGetFloat('nonexistent', 'nonexistent', 42.0), 42.0) def test_reset(self): - """safeGetInt retuns provided default for bitmessagesettings option or 0""" - config = BMConfigParser() + """Some logic for testing _reset()""" test_config_object = StringIO(test_config) - config.read_file(test_config_object) + self.config.read_file(test_config_object) self.assertEqual( - config.safeGetInt('bitmessagesettings', 'maxaddrperstreamsend'), 100) - # pylint: disable=protected-access - config._reset() - self.assertEqual(config.sections(), []) + self.config.safeGetInt( + 'bitmessagesettings', 'maxaddrperstreamsend'), 100) + self.config._reset() + self.assertEqual(self.config.sections(), []) def test_defaults(self): """Loading defaults""" - config = BMConfigParser() - config.add_section('bitmessagesettings') - config.set("bitmessagesettings", "maxaddrperstreamsend", "100") - config.read() + self.config.set('bitmessagesettings', 'maxaddrperstreamsend', '100') + self.config.read() self.assertEqual( - config.safeGetInt('bitmessagesettings', 'maxaddrperstreamsend'), 500) + self.config.safeGetInt( + 'bitmessagesettings', 'maxaddrperstreamsend'), 500) From e778ee923137e0c4b28f44e353fa3bd7c441ebe9 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Thu, 17 Feb 2022 00:39:48 +0200 Subject: [PATCH 5/7] Add a test for BMConfigParser.setTemp() --- src/tests/test_config.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/tests/test_config.py b/src/tests/test_config.py index 26624996..0d5d03b8 100644 --- a/src/tests/test_config.py +++ b/src/tests/test_config.py @@ -75,6 +75,18 @@ class TestConfig(unittest.TestCase): self.assertEqual( self.config.safeGetFloat('nonexistent', 'nonexistent', 42.0), 42.0) + def test_setTemp(self): + """Set a temporary value and ensure it's returned by get()""" + self.config.setTemp('bitmessagesettings', 'connect', 'true') + self.assertIs( + self.config.safeGetBoolean('bitmessagesettings', 'connect'), True) + written_fp = StringIO('') + self.config.write(written_fp) + self.config._reset() + self.config.read_file(written_fp) + self.assertIs( + self.config.safeGetBoolean('bitmessagesettings', 'connect'), False) + def test_reset(self): """Some logic for testing _reset()""" test_config_object = StringIO(test_config) From 3b5c239c73bd6d83b4336bed43433220a7931296 Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Fri, 18 Feb 2022 19:34:49 +0530 Subject: [PATCH 6/7] Add get_platform to kivy live --- src/bitmessagekivy/get_platform.py | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/bitmessagekivy/get_platform.py diff --git a/src/bitmessagekivy/get_platform.py b/src/bitmessagekivy/get_platform.py new file mode 100644 index 00000000..654b31f4 --- /dev/null +++ b/src/bitmessagekivy/get_platform.py @@ -0,0 +1,31 @@ +# pylint: disable=no-else-return, too-many-return-statements + +"""To check the platform""" + +from sys import platform as _sys_platform +from os import environ + + +def _get_platform(): + kivy_build = environ.get("KIVY_BUILD", "") + if kivy_build in {"android", "ios"}: + return kivy_build + elif "P4A_BOOTSTRAP" in environ: + return "android" + elif "ANDROID_ARGUMENT" in environ: + return "android" + elif _sys_platform in ("win32", "cygwin"): + return "win" + elif _sys_platform == "darwin": + return "macosx" + elif _sys_platform.startswith("linux"): + return "linux" + elif _sys_platform.startswith("freebsd"): + return "linux" + return "unknown" + + +platform = _get_platform() + +if platform not in ("android", "unknown"): + environ["KIVY_CAMERA"] = "opencv" From 5e5f136c5eece1353483b729271baa23f6de69aa Mon Sep 17 00:00:00 2001 From: BeholdersEye Date: Tue, 22 Feb 2022 09:18:26 -0500 Subject: [PATCH 7/7] Update winbuild.sh --- buildscripts/winbuild.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/buildscripts/winbuild.sh b/buildscripts/winbuild.sh index 66a2f7aa..c26766f6 100755 --- a/buildscripts/winbuild.sh +++ b/buildscripts/winbuild.sh @@ -134,13 +134,13 @@ function build_dll(){ cd src/bitmsghash || exit 1 if [ "${MACHINE_TYPE}" == 'x86_64' ]; then echo "Create dll" - x86_64-w64-mingw32-g++ -D_WIN32 -Wall -O3 -march=native \ + x86_64-w64-mingw32-g++ -D_WIN32 -Wall -O3 -march=x86-64 \ "-I$HOME/.wine64/drive_c/OpenSSL-Win64/include" \ -I/usr/x86_64-w64-mingw32/include \ "-L$HOME/.wine64/drive_c/OpenSSL-Win64/lib" \ -c bitmsghash.cpp x86_64-w64-mingw32-g++ -static-libgcc -shared bitmsghash.o \ - -D_WIN32 -O3 -march=native \ + -D_WIN32 -O3 -march=x86-64 \ "-I$HOME/.wine64/drive_c/OpenSSL-Win64/include" \ "-L$HOME/.wine64/drive_c/OpenSSL-Win64" \ -L/usr/lib/x86_64-linux-gnu/wine \ @@ -148,13 +148,13 @@ function build_dll(){ -o bitmsghash64.dll -Wl,--out-implib,bitmsghash.a else echo "Create dll" - i686-w64-mingw32-g++ -D_WIN32 -Wall -m32 -O3 -march=native \ + i686-w64-mingw32-g++ -D_WIN32 -Wall -m32 -O3 -march=i686 \ "-I$HOME/.wine32/drive_c/OpenSSL-Win32/include" \ -I/usr/i686-w64-mingw32/include \ "-L$HOME/.wine32/drive_c/OpenSSL-Win32/lib" \ -c bitmsghash.cpp i686-w64-mingw32-g++ -static-libgcc -shared bitmsghash.o \ - -D_WIN32 -O3 -march=native \ + -D_WIN32 -O3 -march=i686 \ "-I$HOME/.wine32/drive_c/OpenSSL-Win32/include" \ "-L$HOME/.wine32/drive_c/OpenSSL-Win32/lib/MinGW" \ -fPIC -shared -lcrypt32 -leay32 -lwsock32 \