diff --git a/.github/mergeable.yml b/.github/mergeable.yml index f9f3cff5d6..b0554b675d 100644 --- a/.github/mergeable.yml +++ b/.github/mergeable.yml @@ -13,11 +13,11 @@ mergeable: enabled: true must_include: regex: '20[0-9][0-9]\.[0-9]+$' - - do: approvals - min: - count: 1 - required: - assignees: true +# - do: approvals +# min: +# count: 1 +# required: +# assignees: true # error: # - do: checks # status: 'failure' diff --git a/.github/workflows/centos.yml b/.github/workflows/centos.yml index b6aacfa955..55db0deb47 100644 --- a/.github/workflows/centos.yml +++ b/.github/workflows/centos.yml @@ -154,6 +154,7 @@ jobs: timeout-minutes: 5 run: | cd ${{ env.BUILD_DIR }} + export TRIK_PYTHONPATH=$(python3 -c "import sys; import os; print(os.pathsep.join(sys.path))") make -k check TESTARGS="-platform offscreen" - name: Download tests diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 55133339db..9d932de9fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -167,6 +167,7 @@ jobs: timeout-minutes: 5 run: | cd ${{ env.BUILD_DIR }} + export TRIK_PYTHONPATH=$(cygpath -w "${pythonLocation}/Lib") mingw32-make -k check - name: Prepare all dlls diff --git a/.gitignore b/.gitignore index a5c7ec8f87..424e7000f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -qrtest/unitTests/**/target_wrapper.sh -qrtest/unitTests/**/moc_wrapper.sh -qrtest/unitTests/**/rcc_wrapper.sh +/**/target_wrapper.sh +/**/moc_wrapper.sh +/**/rcc_wrapper.sh #Qt autgenerated resource file for executable **/*_resource.rc **/object_script.* diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5c01aa17fc..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,142 +0,0 @@ -language: minimal - -git: - depth: 20 - -stages: - - lint - - build - - installer - - test - -env: - global: - - PYENV_ROOT="$HOME/pyenv.root" - - CONFIG=release - - VERA=false - - PROJECT=studio - - TESTS=true - - TRANSLATIONS=false - - INSTALLER=false - - BUILD_TIMEOUT=2400 - - EARLY_START_DOCKER_PULL_PID=$( if [ $TRAVIS_OS_NAME = 'linux' ] ; then time docker pull trikset/linux-builder ; else true ; fi >&2 & echo $!) - - HEARTBEAT=$(while sleep 100; do echo "=====[ $SECONDS seconds, still building... ]====="; done >&2 & echo $! ) - - ALL_TESTS="./run-simulator-tests.sh" - - QMAKE_EXTRA="CONFIG+=tests CONFIG+=noPch CONFIG+=ccache" - - TRIK_QT="$HOME/TRIK_Qt" - - secure: "Djp1JuoB/dDxIQwmYfaJIflulGaZk69djacFE4L/ippcFfcN9As/dzTvBHjHNV2urZoNGAH5iuIGgX0b6aMKIzQRcGbLOrr7yx3SiT/hJ/sh6tnDoiz6kVDiq6Nubf+Mpvgjbm3wuseqcdK4LzHLVv4bZh7cB+JPG4x5PndbD2RyaCoSwdqsZ+fZj0ixteVsGrexSW/w4ZPiAtTfxsRKYJmivLl3jQNm6b0g3AEr37BO/M88xSaECa3WagR6bSgWlNqhftBq51Qk/242LIhLKlLEDLNr4zj04SctO+dZQqT8T99REihHfgbzYg+oFG2/M4fpkxsHykKG8t+Ssgx6iuIMwP8nI/wH6zY68xsmLaMR0rXT8gRxXz2w6z1xwQlXbcRYTWH/PKrLFwIN4d+//GzHHnsh/e6TM6T5pv8t704wmcCer1MbHbHqfRUjK3CAKE62HzsHh4En1PmFsW5kCedmDwTvMvTMiwR7Sru0TrUJ4ldXXbIcfGwisJfhntUQ53eWsN0uZ0FjfZqLQtGEDpn4m+WZwf3cMXKicX18mGXeRsnEOOxK/b62qBTh+hBK+3li69jflVqJJzWqVa4GDkL10OgW5hk/IHCDiTPLqeg/6eCefZFn7FcT4iRdG5CzROfXY5Ep0Gf/ia+uBZBpvlQMQ84/WBLMhgHXGCJGwqU=" - - secure: "Bs6NDzxktMXnE4I8kctP7UZUx+/qaIyxVemruzhRMBrUT3yk68tvyKVmWy3z1/e1tR3Wm1GlJKk+NgdWporksgMJiHKYhkxtwM0GWkfR6lgQyUiZCYubinr4PU9/DsXtPa21lq/bEqXLe3Lz7BDOpWZ5lY8j58tCwZB+OsbmYiGdSsxXr1AtSKsX9t985J+iOG1lzFJT1BWXBnHxIyk24bGo7j1kg4IDD0OE5uxf1Q6COIOOWhOBAx6xCUgpnT/Myv4GPFv0kenlmyXLqB9t3Dndxd+Y4D0v/ak35TjqhCip6uTwJVjMDWX62Twrb2E/YK53nnn2nsSYlcgxKy5CQyKz3x8YmhqkOeXMx9OH4gT5pD1JRSk+4nJ+ht9Y9UCJX0vyDJKiHtWLzKLXP8B8xaABTlmqYAfiqkaEHO3fUst+9AA+0SkuBWsGOIFfQ2R6kVsvUii9Tm73dAc9z1q35zFkYQLoZ9mnXa7al+RxLQPhDeKuPdCa4DyQZS1cDbRJmMCqtoZGbwr/LEWpp0KYsZPlaMRSM1WvUwngG98M7ojZEyF1u6BVYbjnbCQKAM3qVFpGKbSMOoVPRPTU+DeSD5lFWDYn5Rc3Ls4vp/giAPfB7Vxpej6NrNLulMb/DPfC5Z9XdJBg9ZqAuYMogyZo8dgX0OAPOuDTwNZEv156x8g=" - - - -cache: - timeout: 1000 - directories: - - $PYENV_ROOT - - $HOME/.ccache - - $TRIK_QT - -addons: - artifacts: - paths: - - build.log - -branches: - except: - - /dependabot.*/ - -matrix: - include: - - stage: lint - os: linux - services: docker - env: CONFIG=debug VERA=true TESTS=$ALL_TESTS TRANSLATIONS=true QMAKE_EXTRA="$QMAKE_EXTRA CONFIG+=silent CONFIG+=small_debug_info CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address" - name: "Vera and translations" - script: - - $EXECUTOR ./buildScripts/travis/vera_translation.sh - after_script: - - kill $HEARTBEAT - - - stage: build - os: linux - services: docker - name: "Linux release + tests" - env: QMAKE_EXTRA="$QMAKE_EXTRA CONFIG+=no-sanitizers CONFIG+=silent CONFIG+=warn_off" - - os: linux - services: docker - env: CONFIG=debug TESTS=$ALL_TESTS QMAKE_EXTRA="$QMAKE_EXTRA CONFIG+=silent CONFIG+=small_debug_info CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address" - name: "Linux debug + tests" - - os: osx - language: cpp - name: "macOS release + tests" - env: QMAKE_EXTRA="$QMAKE_EXTRA CONFIG+=no-sanitizers" BUILD_TIMEOUT=1800 - - os: osx - language: cpp - name: "macOS debug + tests" - env: CONFIG=debug VERA=false TESTS=$ALL_TESTS QMAKE_EXTRA="$QMAKE_EXTRA CONFIG+=silent CONFIG+=small_debug_info CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address" BUILD_TIMEOUT=1800 - - - stage: installer - os: linux - services: docker - name: "Linux release installer + checker" - env: INSTALLER=true QMAKE_EXTRA="$QMAKE_EXTRA CONFIG+=no-sanitizers CONFIG-=tests CONFIG+=silent CONFIG+=warn_off" - - os: osx - language: cpp - name: "macOS release installer" - env: INSTALLER=true QMAKE_EXTRA="$QMAKE_EXTRA CONFIG+=no-sanitizers CONFIG-=tests" BUILD_TIMEOUT=1800 - - - stage: test - dist: xenial - name: "Linux tests in clean env" - addons: - apt: - sources: - - deadsnakes - packages: - - python3.7 - - p7zip-full - - libxkbcommon-x11-0 - before_install: - install: - script: - - ./buildScripts/travis/run_clean_env_test.sh - after_script: - - os: osx - name: "MacOS tests in clean env" - before_install: - install: - - env HOMEBREW_NO_AUTO_UPDATE=1 brew install p7zip - before_script: - script: - - ./buildScripts/travis/run_clean_env_test.sh - after_script: - -before_install: - - if [[ $TRAVIS_OS_NAME == osx ]] ; then [[ -n ${TRIK_PYTHON3_VERSION_MINOR:-} ]] || export TRIK_PYTHON3_VERSION_MINOR="$(python3 -V | sed 's#^Python [0-9]\.\([0-9]\)\.[0-9]*$#\1#g')" ; fi - - if ./buildScripts/travis/has_only_skipped_files.sh ; then echo "Triggering early terminate..." ; set -xo functrace ; travis_terminate 0 ; fi - - time wait $EARLY_START_DOCKER_PULL_PID || true - - ./buildScripts/travis/before_install.sh - - export CCACHE_CONFIGPATH=$HOME/ccache.conf - -install: - - "./buildScripts/travis/install_${TRAVIS_OS_NAME}.sh" - -before_script: - - if [ "$TRAVIS_OS_NAME" = "linux" ] ; then export EXECUTOR="time docker exec -i builder " ; else export EXECUTOR="time " ;fi - - export CCACHE_DIR="$HOME/.ccache/$TRAVIS_OS_NAME-$CONFIG" - -script: - - ./buildScripts/travis/script.sh & WPID=$! - - sleep $BUILD_TIMEOUT && { kill $WPID || true ; echo "***KILLED ON TIMEOUT***" ; } & KPID=$! - - export TIMEOUT=false - - wait $WPID ; RES=$?; kill -0 $KPID && kill $KPID > /dev/null || export TIMEOUT=true ; ( exit $RES ) - - if $INSTALLER ; then $EXECUTOR ./buildScripts/travis/test.sh ; fi - - if $INSTALLER ; then ./buildScripts/travis/build_installer.sh ; fi - -after_script: - - ./buildScripts/travis/after_script.sh - - kill $HEARTBEAT - - sync ; wc -l build.log ; tail -n 1000 build.log - -after_success: - - true diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 2b525be4ba..0000000000 --- a/appveyor.yml +++ /dev/null @@ -1,272 +0,0 @@ -#version: 999.{branch}-{build} -clone_folder: c:\studio -#test: off - -clone_depth: 1 -#shallow_clone: true - -skip_commits: - files: - - '**/lsan.supp' - - 'buildScripts/travis/*' - - 'buildScripts/azure/*' - - 'buildScripts/docker/*' - - 'azure-pipelines.yml' - - '.cirrus.yml' - - '.travis.yml' - - '.mergify.yml' - - '.github/*' - - 'Brewfile' - - '**/*.html' - - '**/*.txt' - - '**/*.md' - - 'installer/packages/**/meta/prebuild-mac.sh' - - 'installer/packages/**/meta/prebuild-linux-gnu.sh' - - '**/*.dockerfile' - - '**/*.Dockerfile' - - '**/Dockerfile' - - '**/Dockerfile.*' - - 'plugins/robots/checker/scripts/build-checker-installer.sh' - message: /\[NOCI\]/ - -branches: - except: - - /dependabot.*/ - -environment: - global: - PYTHON_VERSION_MINOR: 8 # Default to Python 3.8 - MSYS_DIR: C:\msys64 - APPVEYOR_SAVE_CACHE_ON_ERROR: true - CCACHE_DIR: C:\ccache.cache - BUILD_DIR: '%APPVEYOR_BUILD_FOLDER%\.build' - PROJECT_FILE: studio - APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -m0=lzma -mx=9 - master_ci: - secure: CuoEe+MMcU6PLsinM6SbBsq2QWGiTmpTH/kPfC20g7M= - server: - secure: cSPfeMLOOlPhHRS4eZz337/2X+HUquhXmDZx2OgRSFE= - password: - secure: e2Rwbvcr6Z/YAX4N0/tO3w== - matrix: - - QT: 5.12 - ARCH: 32 - CONFIGURATION: release - QTIFW: C:\Qt\Tools\QtInstallerFramework\3.1 - -# - QT: 5.12 -# ARCH: 64 -# CONFIGURATION: release -# QTIFW: C:\Qt\Tools\QtInstallerFramework\3.1 - -# - QT: 5.12 -# ARCH: 32 -# PYTHON_VERSION_MINOR: 8 -# CONFIGURATION: release -# QTIFW: C:\Qt\Tools\QtInstallerFramework\3.1 - - -# Qt5.14 build takes too long (2x times) and reaches timeout -# - QT: 5.14 -# ARCH: 32 -# PYTHON_VERSION_MINOR: 8 -# CONFIGURATION: release -# QTIFW: C:\Qt\Tools\QtInstallerFramework\3.2 -# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - -matrix: - allow_failures: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 -#cache: -# - '%BUILD_DIR% -> **\*.pr?, appveyor.yml' -# - '%CCACHE_DIR% -> **\*.pr?, appveyor.yml' -# - C:\ProgramData\chocolatey\bin -> appveyor.yml -# - C:\ProgramData\chocolatey\lib -> appveyor.yml -# - '%MSYS_DIR%\var\cache\pacman\pkg -> appveyor.yml' -#for: -# - -# matrix: -# only: -# - QT: 5.14 -# image: Visual Studio 2019 - -init: - # - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - - set PYTHON_PATH=C:\Python3%PYTHON_VERSION_MINOR% - - if "%ARCH%" == "64" (set PYTHON_PATH=%PYTHON_PATH%-x64) - - set PYTHON_LIB=%PYTHON_PATH%\libs - - set QTDIR=C:\Qt\%QT%\mingw73_%ARCH% - - set MINGW=C:\Qt\Tools\mingw730_%ARCH% - - 'dir %PYTHON_PATH% %MINGW% %QTDIR% %QTIFW% %MSYS_DIR% /w' - - set PATH - - set PATH=%APPVEYOR_BUILD_FOLDER%\buildScripts\appveyor;%QTDIR%\bin;%MINGW%\bin;C:\msys64\mingw%ARCH%\bin;C:\msys64\usr\bin;%SystemRoot%;%SystemRoot%\system32;C:\Program Files\7-Zip;%SystemRoot%\system32\WindowsPowerShell\v1.0;C:\Tools\curl\bin;C:\Program Files\AppVeyor\BuildAgent\ - - set PATH - - if "x%appveyor_pull_request_number%" NEQ "x" set APPVEYOR_CACHE_SKIP_SAVE=true - - if "x%appveyor_repo_branch%" NEQ "xmaster" set APPVEYOR_CACHE_SKIP_SAVE=true - - if "%ARCH%" == "32" (set PLATFORM=i686) else (set PLATFORM=x86_64) - - set NEED_AUTOZIP=false - - set NEED_BINZIP=false - - set NEED_INSTALLER=false -#TODO: multiline %APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED% can cause problems - - 'set "FULL_MESSAGE=%APPVEYOR_PULL_REQUEST_TITLE% %APPVEYOR_REPO_COMMIT_MESSAGE%"' - - 'echo #%FULL_MESSAGE%#' - - 'if "%FULL_MESSAGE:[INSTALLER]=%" NEQ "%FULL_MESSAGE%" ( set "NEED_INSTALLER=true" )' - - 'if "%FULL_MESSAGE:[BINZIP]=%" NEQ "%FULL_MESSAGE%" ( set "NEED_BINZIP=true" )' - - 'if "%FULL_MESSAGE:[AUTOZIP]=%" NEQ "%FULL_MESSAGE%" ( set "NEED_AUTOZIP=true" )' -# this is a push/merge for branch (else it is a PR) - - if "x%appveyor_pull_request_number%" EQU "x" (set "NEED_AUTOZIP=true") -#this is a tagged commit build - - if "%APPVEYOR_REPO_TAG%" EQU "true" ( set "NEED_INSTALLER=true" && set "NEED_AUTOZIP=true" ) -#disable artifacts for non-default Python builds - - if "%PYTHON_VERSION_MINOR%" NEQ "8" ( set "NEED_INSTALLER=false" && set "NEED_AUTOZIP=false" ) - - 'echo "Deploy installer executable: %NEED_INSTALLER%"' - - 'echo "Deploy \\bin zip archive: %NEED_BINZIP%"' - - 'echo "Deploy full zipped installer: %NEED_AUTOZIP%"' -# deal with 2020 summer package upgrade problem, when keys changed - - curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz - - curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig - - pacman --noconfirm -U msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz || bash -lc 'pacman --noconfirm -U --config <(echo) msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz' -# Deal with December 2020 MSYS2 update: update core files to migrate to zstd compression - - curl -O http://repo.msys2.org/msys/x86_64/zstd-1.4.7-1-x86_64.pkg.tar.xz # the latest in xz - - curl -O http://repo.msys2.org/msys/x86_64/pacman-5.2.2-5-x86_64.pkg.tar.xz # the latest in xz - - pacman --verbose --noconfirm --disable-download-timeout -U zstd-1.4.7-1-x86_64.pkg.tar.xz pacman-5.2.2-5-x86_64.pkg.tar.xz # Upgrade now (Dec 2020) needs zstd decompressor - - 'del /q %APPVEYOR_BUILD_FOLDER%\*.*' # cleanup before checkout - - cmd /c "pacman --verbose --noconfirm --disable-download-timeout -Syuu" #Full update of core files - - cmd /c "pacman --verbose --noconfirm --disable-download-timeout -Sy" #Update core files if databases list was changed -clone_script: - - cmd: | - "C:\\Program Files\\Git\\cmd\\git" config --global core.symlinks true - "C:\\Program Files\\Git\\cmd\\git" config --global core.autocrlf true - "C:\\Program Files\\Git\\cmd\\git" clone --progress --single-branch --no-checkout --branch=%appveyor_repo_branch% https://github.com/%appveyor_repo_name%.git %appveyor_build_folder% - cd %appveyor_build_folder% - if "x%appveyor_pull_request_number%" == "x" ( "C:\\Program Files\\Git\\cmd\\git" checkout -f %appveyor_repo_commit% ) else ( "C:\\Program Files\\Git\\cmd\\git" fetch origin +refs/pull/%appveyor_pull_request_number%/merge: && "C:\\Program Files\\Git\\cmd\\git" checkout -f FETCH_HEAD ) - "C:\\Program Files\\Git\\cmd\\git" submodule update --init --recursive - - -install: - - 'qmake -v && qmake -query' - - 'dir %PYTHON_PATH% %MINGW% %QTDIR% %QTIFW% %MSYS_DIR% /w' - - curl --output tests.7z "https://dl.trikset.com/edu/.solutions20200701/testing_small.7z" - - cmd /c "pacman --verbose --noconfirm -S dos2unix ccache rsync unzip sshpass mingw%ARCH%/mingw-w64-%PLATFORM%-libusb mingw%ARCH%/mingw-w64-%PLATFORM%-zlib mingw%ARCH%/mingw-w64-%PLATFORM%-pkg-config" - - 7z x tests.7z - - dir /w testing_small - - ccache.exe -V || appveyor DownloadFile "http://alam.srb2.org/ccache.exe" -FileName "ccache.exe" && xcopy /Y /V /I ccache.exe %MINGW%\bin && ccache -V - - ccache -p || echo "Failed to print ccache config (missing -p option)" - - if not exist %BUILD_DIR% mkdir %BUILD_DIR% -# - du -sh %BUILD_DIR% %CCACHE_DIR% - - ccache -M 900M - - which g++ - - g++ --version - - ls - - dir C:\Qt\Tools\ - - dir C:\Qt - - -# before_build: -# - curl https://raw.githubusercontent.com/MestreLion/git-tools/master/git-restore-mtime-bare > .fix-mtime.py -# - python "%PYTHON_PATH%\Tools\scripts\2to3.py" -v -p -w -n -f all .fix-mtime.py -# - sed -ri "s#line.(startswith|split)\(#line.\1\(b#g" .fix-mtime.py -# - python .fix-mtime.py -# - git submodule foreach --recursive python %cd%\.fix-mtime.py - - -build_script: - - cd %BUILD_DIR% - - bash -c "env LC_ALL=C date -u" - - 'git status -vv && git submodule foreach --recursive git status' - - qmake %APPVEYOR_BUILD_FOLDER%\%PROJECT_FILE%.pro -spec win32-g++ CONFIG+=%CONFIGURATION% CONFIG+=tests CONFIG+=silent # QMAKE_CXX="ccache g++" - - bash -c "env LC_ALL=C date -u" - - mingw32-make qmake_all - - bash -c "env LC_ALL=C date -u" - - mingw32-make -k check - -test_script: - - echo %cd% - - cd %BUILD_DIR%\bin\%CONFIGURATION% - - dir - - for %%f in (*.exe) do windeployqt --%CONFIGURATION% %%f - - set PYTHONIOENCODING=utf-8 & python "%APPVEYOR_BUILD_FOLDER%\buildScripts\tests\fieldstest.py" 2D-model.exe %APPVEYOR_BUILD_FOLDER%\testing_small - -after_test: -# zip binaries - - cd %BUILD_DIR%/bin/%CONFIGURATION% - - bash -c "env LC_ALL=C date -u" - - for %%f in (*.exe) do windeployqt --%CONFIGURATION% %%f - - xcopy /I /Y %QTDIR%\plugins\platforms %BUILD_DIR%\bin\%CONFIGURATION%\platforms - - set ZIP_NAME=trik-studio - - set APPVEYOR_REPO_BRANCH_SAFE=%APPVEYOR_REPO_BRANCH:/=-% - - if %APPVEYOR_REPO_TAG%==true (set ZIP_NAME=%ZIP_NAME%_%APPVEYOR_REPO_TAG_NAME%) else (set ZIP_NAME=%ZIP_NAME%-%APPVEYOR_REPO_BRANCH_SAFE%) - - set ZIP_NAME=%ZIP_NAME%_qt%QT%_%PLATFORM%_%CONFIGURATION%.zip - - bash -c "env LC_ALL=C date -u" - - echo "ZipName:%ZIP_NAME%" - - cd %BUILD_DIR%/bin/%CONFIGURATION% - - 7z a -- %APPVEYOR_BUILD_FOLDER%\%ZIP_NAME% . - - cd %APPVEYOR_BUILD_FOLDER% - - if "%NEED_BINZIP%" EQU "true" (appveyor PushArtifact %ZIP_NAME%) - - if "%CONFIGURATION%" NEQ "release" ( exit /b 0 ) -# build installer - - cd %APPVEYOR_BUILD_FOLDER%/installer - - bash -c "env LC_ALL=C date -u" - - 'bash -c "./build-trik-studio.sh %QTDIR:\=/% %QTIFW:\=/%/bin %BUILD_DIR:\=/%"' - - set INSTALLER_NAME=trik-studio - - if %APPVEYOR_REPO_TAG%==true (set INSTALLER_NAME=%INSTALLER_NAME%_%APPVEYOR_REPO_TAG_NAME%) else (set INSTALLER_NAME=%INSTALLER_NAME%-%APPVEYOR_REPO_BRANCH_SAFE%) - - if "%PYTHON_VERSION_MINOR%" NEQ "8" (set INSTALLER_NAME=%INSTALLER_NAME%-Python3%PYTHON_VERSION_MINOR%) - - set INSTALLER_NAME=%INSTALLER_NAME%-%PLATFORM% - - set AUTOINSTALLER_ZIP_NAME=%INSTALLER_NAME%-auto.zip - - set INSTALLER_NAME=%INSTALLER_NAME%-installer.exe - - echo "Installer:%INSTALLER_NAME%" - - ren trik-studio*installer*.exe %INSTALLER_NAME% - - cd %APPVEYOR_BUILD_FOLDER% - - if "%NEED_INSTALLER%" EQU "true" (appveyor PushArtifact installer\%INSTALLER_NAME%) -# pack autoinstaller - - bash -c "env LC_ALL=C date -u" - - cd %APPVEYOR_BUILD_FOLDER%/installer - - 7z a -- %AUTOINSTALLER_ZIP_NAME% %INSTALLER_NAME% trik_studio*.qs reinstall* - - cd %APPVEYOR_BUILD_FOLDER% - - if "%NEED_AUTOZIP%" EQU "true" (appveyor PushArtifact installer\%AUTOINSTALLER_ZIP_NAME%) -# install - - cd %APPVEYOR_BUILD_FOLDER%\installer - - bash -c "env LC_ALL=C date -u" - - cmd /c %INSTALLER_NAME% --script trik_studio_installscript.qs - - dir C:\TRIKStudio - - bash -c "env LC_ALL=C date -u" - # deployment - #- ps: if ( $artifacts.Count -eq 0 ) { exit 1 } - - IF "x%server%" NEQ "x" (sshpass -p %password% rsync -avze 'ssh -o StrictHostKeyChecking=no' %INSTALLER_NAME% %server%:dl/ts/fresh/installer/) - -before_deploy: - - ps: if ( $artifacts.Count -eq 0 ) { exit 1 } - -deploy: - - provider: Environment - name: trik-studio-fresh - on: - ARCH: 32 - APPVEYOR_PROJECT_SLUG: $(master_ci) - - - provider: Environment - name: trik-studio-64 - on: - ARCH: 64 - APPVEYOR_PROJECT_SLUG: $(master_ci) - - - provider: Environment - name: github-release - github_release_artifact: $(AUTOINSTALLER_ZIP_NAME) - on: - ARCH: 32 - QT: 5.12 - CONFIGURATION: release - APPVEYOR_REPO_TAG: true - APPVEYOR_PROJECT_SLUG: $(master_ci) - -on_finish: - - ccache -s - - bash -c "env LC_ALL=C date -u" - # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - - -notifications: - - provider: GitHubPullRequest - on_build_failure: false - template: "{{#passed}}Download:\n{{#jobs}}{{name}}\n{{#artifacts}} [{{fileName}}]({{permalink}}) \n {{/artifacts}}{{/jobs}}{{/passed}}" diff --git a/plugins/robots/interpreters/trikKitInterpreterCommon/src/trikKitInterpreterPluginBase.cpp b/plugins/robots/interpreters/trikKitInterpreterCommon/src/trikKitInterpreterPluginBase.cpp index c1fba5c14c..1ed03b69ee 100644 --- a/plugins/robots/interpreters/trikKitInterpreterCommon/src/trikKitInterpreterPluginBase.cpp +++ b/plugins/robots/interpreters/trikKitInterpreterCommon/src/trikKitInterpreterPluginBase.cpp @@ -64,6 +64,7 @@ void TrikKitInterpreterPluginBase::initKitInterpreterPluginBase mAdditionalPreferences = new TrikAdditionalPreferences({ mRealRobotModel->name() }); bool enablePython = false; +#ifndef TRIK_NOPYTHON if (!friendlyKitName().contains("2014")) { if (!qEnvironmentVariableIsEmpty("TRIK_PYTHONPATH")) { enablePython = true; @@ -82,7 +83,7 @@ void TrikKitInterpreterPluginBase::initKitInterpreterPluginBase } } } - +#endif mTextualInterpreter.reset(new TrikTextualInterpreter(mTwoDRobotModel, enablePython)); connect(mAdditionalPreferences, &TrikAdditionalPreferences::settingsChanged , mTextualInterpreter.data(), &TrikTextualInterpreter::setMailboxHullNumber); diff --git a/plugins/robots/interpreters/trikKitInterpreterCommon/src/trikTextualInterpreter.cpp b/plugins/robots/interpreters/trikKitInterpreterCommon/src/trikTextualInterpreter.cpp index 0e3cce423e..01304831d9 100644 --- a/plugins/robots/interpreters/trikKitInterpreterCommon/src/trikTextualInterpreter.cpp +++ b/plugins/robots/interpreters/trikKitInterpreterCommon/src/trikTextualInterpreter.cpp @@ -61,10 +61,11 @@ trik::TrikTextualInterpreter::TrikTextualInterpreter( using qReal::text::Languages; using trikScriptRunner::ScriptType; Languages::registerLanguage(Languages::javaScript(mScriptRunner.knownMethodNamesFor(ScriptType::JAVASCRIPT))); - +#ifndef TRIK_NOPYTHON if (enablePython) { Languages::registerLanguage(Languages::python(mScriptRunner.knownMethodNamesFor(ScriptType::PYTHON))); } +#endif } trik::TrikTextualInterpreter::~TrikTextualInterpreter() diff --git a/plugins/robots/interpreters/trikKitInterpreterCommon/trikKitInterpreterCommon.pri b/plugins/robots/interpreters/trikKitInterpreterCommon/trikKitInterpreterCommon.pri index b8e39846a8..8d22db35ea 100644 --- a/plugins/robots/interpreters/trikKitInterpreterCommon/trikKitInterpreterCommon.pri +++ b/plugins/robots/interpreters/trikKitInterpreterCommon/trikKitInterpreterCommon.pri @@ -14,6 +14,11 @@ QT += widgets network script xml multimedia CONFIG += trikqscintilla2 + +trik_nopython { + DEFINES += TRIK_NOPYTHON +} + includes( \ plugins/robots/common/kitBase \ plugins/robots/common/twoDModel \ diff --git a/plugins/robots/thirdparty/trikRuntime/trikRuntime b/plugins/robots/thirdparty/trikRuntime/trikRuntime index 4892102d81..c472c084a8 160000 --- a/plugins/robots/thirdparty/trikRuntime/trikRuntime +++ b/plugins/robots/thirdparty/trikRuntime/trikRuntime @@ -1 +1 @@ -Subproject commit 4892102d812553742478fb11bd5901616d15c412 +Subproject commit c472c084a81f1e1e1ff6df975136cb270f0fcc63 diff --git a/plugins/robots/thirdparty/trikRuntime/trikRuntime.pro b/plugins/robots/thirdparty/trikRuntime/trikRuntime.pro index 2c577f6d22..06acfde422 100644 --- a/plugins/robots/thirdparty/trikRuntime/trikRuntime.pro +++ b/plugins/robots/thirdparty/trikRuntime/trikRuntime.pro @@ -13,30 +13,41 @@ # limitations under the License. TEMPLATE = subdirs - include(../../../../global.pri) SUBDIRS += \ - PythonQt \ trikKernel \ trikNetwork \ trikControl \ trikHal \ + trikCommunicator \ trikScriptRunner \ +# translations \ + +tests { + SUBDIRS *= tests + tests.depends = trikScriptRunner trikCommunicator trikKernel + tests.subdir = $$PWD/trikRuntime/tests +} -# qslog.file = $$PWD/../../../../thirdparty/qslog/QsLogSharedLibrary.pro -# qslog.subdir = $$PWD/../../../../thirdparty/qslog/ +!trik_nopython { + SUBDIRS += PythonQt + trikScriptRunner.depends += PythonQt + PythonQt.subdir = $$PWD/trikRuntime/PythonQt +} -PythonQt.subdir = $$PWD/trikRuntime/PythonQt trikScriptRunner.subdir = $$PWD/trikRuntime/trikScriptRunner +trikCommunicator.subdir = $$PWD/trikRuntime/trikCommunicator trikKernel.subdir = $$PWD/trikRuntime/trikKernel trikNetwork.subdir = $$PWD/trikRuntime/trikNetwork trikControl.subdir = $$PWD/trikRuntime/trikControl +translations.subdir = $$PWD/trikRuntime/translations trikHal.subdir = $$PWD/trikRuntime/trikHal trikControl.depends = trikKernel trikHal trikKernel.depends = trikNetwork.depends = trikKernel -trikScriptRunner.depends = trikControl trikKernel trikNetwork PythonQt +trikScriptRunner.depends = trikControl trikKernel trikNetwork trikHal.depends = trikKernel -PythonQt.depends = +trikCommunicator.depends = trikScriptRunner +OTHER_FILES += trikRuntime/trikRuntime.pro diff --git a/qreal.pri b/qreal.pri index 0bb2dc8409..3f12a22a03 100644 --- a/qreal.pri +++ b/qreal.pri @@ -66,6 +66,4 @@ qrtext.depends = qrkernel qrtranslations.depends = initvars OTHER_FILES += \ - $$PWD/.travis.yml \ - $$PWD/appveyor.yml \ $$PWD/global.pri \ diff --git a/qrgui/editor/editor.pro b/qrgui/editor/editor.pro index e502f16aba..7249be3fd2 100644 --- a/qrgui/editor/editor.pro +++ b/qrgui/editor/editor.pro @@ -128,6 +128,3 @@ SOURCES += \ $$PWD/commands/reshapeEdgeCommand.cpp \ $$PWD/commands/expandCommand.cpp \ $$PWD/commands/replaceByCommand.cpp \ - -RESOURCES += \ - $$PWD/contextIcons.qrc \ diff --git a/qrtranslations/fr/plugins/robots/trikKitInterpreterCommon_fr.ts b/qrtranslations/fr/plugins/robots/trikKitInterpreterCommon_fr.ts index eec1035d8c..88a3fd07a3 100644 --- a/qrtranslations/fr/plugins/robots/trikKitInterpreterCommon_fr.ts +++ b/qrtranslations/fr/plugins/robots/trikKitInterpreterCommon_fr.ts @@ -4,7 +4,7 @@ QObject - + Bogus input values @@ -242,7 +242,7 @@ - + TRIK_PYTHONPATH must be set correctly to run Python script. diff --git a/qrtranslations/ru/plugins/robots/trikKitInterpreterCommon_ru.ts b/qrtranslations/ru/plugins/robots/trikKitInterpreterCommon_ru.ts index 390d042700..451802b166 100644 --- a/qrtranslations/ru/plugins/robots/trikKitInterpreterCommon_ru.ts +++ b/qrtranslations/ru/plugins/robots/trikKitInterpreterCommon_ru.ts @@ -4,7 +4,7 @@ QObject - + Bogus input values Неподходящие значения аргументов @@ -307,7 +307,7 @@ Оставновить - + TRIK_PYTHONPATH must be set correctly to run Python script. Для запуска программы на Python доложна быть корректно выставлена переменная окружения TRIK_PYTHONPATH