diff --git a/.github/workflows/builder-workflow.yaml b/.github/workflows/builder-workflow.yaml new file mode 100644 index 00000000..1d23a032 --- /dev/null +++ b/.github/workflows/builder-workflow.yaml @@ -0,0 +1,34 @@ +name: macOS build + +on: [push] + +jobs: + buildMacOS: + name: macOS + runs-on: macos-10.15 + steps: + - name: Check out repository code + uses: actions/checkout@v2 + - run: echo "QT_SHORT_VERSION=5.8" >> $GITHUB_ENV + - run: echo "QT_LONG_VERSION=5.8.0" >> $GITHUB_ENV + - run: echo "QT_INSTALLER_ROOT=qt-opensource-mac-x64-clang-${QT_LONG_VERSION}" >> $GITHUB_ENV + - run: echo "QT_INSTALLER_FILENAME=${QT_INSTALLER_ROOT}.dmg" >> $GITHUB_ENV + - run: echo "QT_PATH=$HOME/qt" >> $GITHUB_ENV + - run: echo "QT_MACOS=$QT_PATH/$QT_SHORT_VERSION/clang_64" >> $GITHUB_ENV + - run: echo "$QT_MACOS/bin" >> $GITHUB_PATH + - run: echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH + - run: ./build/travis/job_macos/install.sh + - run: ./build/travis/job_macos/build.sh + - name: Release + uses: softprops/action-gh-release@v1 + with: + body: | + MachinekitClient_Development for + x64 (64-bit Intel/AMD) Linux systems (Portable AppImages) + Windows 32bit and 64bit + x64 (64-bit Intel/AMD) MacOSX systems + FOR TESTING PURPOSES ONLY! + files: | + MachinekitClient_Development-*-x64.dmg + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build/travis/job_macos/build.sh b/build/travis/job_macos/build.sh index f0519abe..c2f100b3 100755 --- a/build/travis/job_macos/build.sh +++ b/build/travis/job_macos/build.sh @@ -4,7 +4,7 @@ set -e set -x # do not build mac for PR -if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then +if [ ! -z "${TRAVIS_PULL_REQUEST}" ] && [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then exit 0 fi @@ -88,7 +88,7 @@ if [ "${upload}" != "true" ]; then fi platform=x64 # skip pull requests - if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then + if [ ! -z "${TRAVIS_PULL_REQUEST}" ] && [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then upload= fi fi @@ -102,7 +102,7 @@ if [ "${upload}" ]; then target="QtQuickVcp_Development" fi mv build.release/QtQuickVcp.tar.gz ${target}-${version}-MacOSX-${platform}.tar.gz - ./build/travis/job_macos/bintray_lib.sh ${target}-${version}*.tar.gz +# ./build/travis/job_macos/bintray_lib.sh ${target}-${version}*.tar.gz if [ $release -eq 1 ]; then target="MachinekitClient" @@ -110,7 +110,7 @@ if [ "${upload}" ]; then target="MachinekitClient_Development" fi mv build.release/MachinekitClient.dmg ${target}-${version}-${platform}.dmg - ./build/travis/job_macos/bintray_app.sh ${target}*.dmg +# ./build/travis/job_macos/bintray_app.sh ${target}*.dmg else echo "On branch '$branch' so dmg will not be uploaded." >&2 fi diff --git a/build/travis/job_macos/install.sh b/build/travis/job_macos/install.sh index 7451d829..02d01d70 100755 --- a/build/travis/job_macos/install.sh +++ b/build/travis/job_macos/install.sh @@ -3,7 +3,7 @@ set -x # do not build mac for PR -if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then +if [ ! -z "${TRAVIS_PULL_REQUEST}" ] && [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then exit 0 fi @@ -21,14 +21,14 @@ fi brew update brew install libtool automake autoconf pkg-config bash coreutils -brew install gnu-sed --with-default-names +brew install gnu-sed # install zeromq git clone https://github.com/zeromq/zeromq4-x.git cd zeromq4-x git checkout v4.0.8 sh autogen.sh -./configure --disable-static --enable-shared --prefix=/opt/local CC=clang CXX=clang++ CFLAGS="-arch x86_64" CXXFLAGS="-std=c++11 -stdlib=libstdc++ -O3 -arch x86_64" LDFLAGS="-stdlib=libstdc++" +./configure --disable-static --enable-shared --prefix=/opt/local CC=clang CXX=clang CFLAGS="-arch x86_64" CXXFLAGS="-std=c++11 -stdlib=libc++ -O3 -arch x86_64" LDFLAGS="-stdlib=libc++" make sudo make install cd .. @@ -76,7 +76,7 @@ echo "QT_LONG_VERSION QT_LONG_VERSION" if [[ "$QMAKE_VERSION" != "${QT_LONG_VERSION}" ]]; then rm -rf $QT_PATH echo "Downloading Qt" - wget -c --no-check-certificate -nv https://download.qt.io/archive/qt/${QT_SHORT_VERSION}/${QT_LONG_VERSION}/${QT_INSTALLER_FILENAME} + wget -c --no-check-certificate -nv https://download.qt.io/new_archive/qt/${QT_SHORT_VERSION}/${QT_LONG_VERSION}/${QT_INSTALLER_FILENAME} hdiutil mount ${QT_INSTALLER_FILENAME} cp -rf /Volumes/${QT_INSTALLER_ROOT}/${QT_INSTALLER_ROOT}.app $HOME/${QT_INSTALLER_ROOT}.app QT_INSTALLER_EXE=$HOME/${QT_INSTALLER_ROOT}.app/Contents/MacOS/${QT_INSTALLER_ROOT} diff --git a/src/pathview/glpathitem.cpp b/src/pathview/glpathitem.cpp index a5a3f9f1..2fc9c60f 100644 --- a/src/pathview/glpathitem.cpp +++ b/src/pathview/glpathitem.cpp @@ -803,58 +803,58 @@ GLPathItem::Position GLPathItem::calculateNewPosition(const machinetalk::Positio if (newPosition.has_x()) { position.x = m_activeOffsets.g92Offset.x; position.x += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).x; - position.x += m_activeOffsets.toolOffset.x; +// position.x += m_activeOffsets.toolOffset.x; position.x += newPosition.x(); } if (newPosition.has_y()) { position.y = m_activeOffsets.g92Offset.y; position.y += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).y; - position.y += m_activeOffsets.toolOffset.y; +// position.y += m_activeOffsets.toolOffset.y; position.y += newPosition.y(); } if (newPosition.has_z()) { position.z = m_activeOffsets.g92Offset.z; position.z += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).z; - position.z += m_activeOffsets.toolOffset.z; +// position.z += m_activeOffsets.toolOffset.z; position.z += newPosition.z(); } if (newPosition.has_a()) { position.a = m_activeOffsets.g92Offset.a; position.a += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).a; - position.a += m_activeOffsets.toolOffset.a; +// position.a += m_activeOffsets.toolOffset.a; position.a += newPosition.a(); } if (newPosition.has_b()) { position.b = m_activeOffsets.g92Offset.b; position.b += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).b; - position.b += m_activeOffsets.toolOffset.b; +// position.b += m_activeOffsets.toolOffset.b; position.b += newPosition.b(); } if (newPosition.has_c()) { position.c = m_activeOffsets.g92Offset.c; position.c += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).c; - position.c += m_activeOffsets.toolOffset.c; +// position.c += m_activeOffsets.toolOffset.c; position.c += newPosition.c(); } if (newPosition.has_u()) { position.u = m_activeOffsets.g92Offset.u; position.u += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).u; - position.u += m_activeOffsets.toolOffset.u; +// position.u += m_activeOffsets.toolOffset.u; position.u += newPosition.u(); } if (newPosition.has_v()) { position.v = m_activeOffsets.g92Offset.v; position.v += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).v; - position.v += m_activeOffsets.toolOffset.v; +// position.v += m_activeOffsets.toolOffset.v; position.v += newPosition.v(); } if (newPosition.has_w()) { position.w = m_activeOffsets.g92Offset.w; position.w += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).w; - position.w += m_activeOffsets.toolOffset.w; +// position.w += m_activeOffsets.toolOffset.w; position.w += newPosition.w(); }