Skip to content

Commit

Permalink
Fix Mac OS python setup and add LE fixes (#1701)
Browse files Browse the repository at this point in the history
* Fix macOS Python's dylib-s setup path
* Use LF as line endings on different platforms
---------

Co-authored-by: iakov <[email protected]>
  • Loading branch information
georgiy-belyanin and iakov authored Feb 3, 2024
1 parent a06c22a commit 066da16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ 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"

#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"
Expand Down
10 changes: 3 additions & 7 deletions qrgui/textEditor/qscintillaTextEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 066da16

Please sign in to comment.