From 066da1664778dc2f097bad9439febfdd03ab1668 Mon Sep 17 00:00:00 2001 From: Georgiy Belyanin <33698739+S007sayer@users.noreply.github.com> Date: Sat, 3 Feb 2024 14:05:02 +0300 Subject: [PATCH] Fix Mac OS python setup and add LE fixes (#1701) * Fix macOS Python's dylib-s setup path * Use LF as line endings on different platforms --------- Co-authored-by: iakov --- .../ru.qreal.root.trik.core/meta/prebuild-mac.sh | 4 ++-- qrgui/textEditor/qscintillaTextEdit.cpp | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/installer/packages/trik-studio/ru.qreal.root.trik.core/meta/prebuild-mac.sh b/installer/packages/trik-studio/ru.qreal.root.trik.core/meta/prebuild-mac.sh index ccebe42d54..1a29d9d1da 100755 --- a/installer/packages/trik-studio/ru.qreal.root.trik.core/meta/prebuild-mac.sh +++ b/installer/packages/trik-studio/ru.qreal.root.trik.core/meta/prebuild-mac.sh @@ -44,7 +44,7 @@ pyinstaller --clean --noconfirm --log-level DEBUG --debug noarchive --onedir --n deactivate # exit python's venv -rsync -avR --remove-source-files dist/trik/_internal/./{*.dylib,Python} "$BUNDLE_CONTENTS/Lib" +rsync -avR --remove-source-files dist/trik/_internal/./*.dylib "$BUNDLE_CONTENTS/Lib" # Remove before copying other files rm dist/trik/trik rsync -avRm --delete --delete-after dist/trik/_internal/./* "$BUNDLE_CONTENTS/Lib/python-runtime" @@ -52,7 +52,7 @@ rsync -avRm --delete --delete-after dist/trik/_internal/./* "$BUNDLE_CONTENTS/Li #Add Python runtime libraries PYTHON_LIBNAME=$("python3.${TRIK_PYTHON3_VERSION_MINOR}-config" --prefix)/Python #rsync -a "$PYTHON_LIBNAME" "$BUNDLE_CONTENTS/Lib" -find "$BUNDLE_CONTENTS/Lib" -type f -name '*.dylib' -print0 | xargs -0n1 install_name_tool -change "$PYTHON_LIBNAME" @rpath/../Lib/Python +find "$BUNDLE_CONTENTS/Lib" -type f -name '*.dylib' -print0 | xargs -0n1 install_name_tool -change "$PYTHON_LIBNAME" @rpath/../Lib/python-runtime/Python fix_qreal_dependencies "$BUNDLE_CONTENTS/Lib/plugins/editors/libtrikMetamodel.dylib" fix_qreal_dependencies "$BUNDLE_CONTENTS/Lib/librobots-trik-qts-generator-library.1.0.0.dylib" diff --git a/qrgui/textEditor/qscintillaTextEdit.cpp b/qrgui/textEditor/qscintillaTextEdit.cpp index 753a40d01a..9e35c05114 100644 --- a/qrgui/textEditor/qscintillaTextEdit.cpp +++ b/qrgui/textEditor/qscintillaTextEdit.cpp @@ -201,14 +201,10 @@ void QScintillaTextEdit::setDefaultSettings() setMatchedBraceBackgroundColor(Qt::yellow); setUnmatchedBraceForegroundColor(Qt::blue); - // EOL symbol -#if defined Q_OS_LINUX + // EOL symbol, always use LF for all platforms + // Because TRIK robot is linux based + // we hope other tools (for NXT and EV3) accept it setEolMode(QsciScintilla::EolUnix); -#elif defined Q_OS_WIN - setEolMode(QsciScintilla::EolWindows); -#elif defined Q_OS_MAC - setEolMode(QsciScintilla::EolMac); -#endif // Input encoding setUtf8(true);