botfatherio/botfather
حول
Cross-platform automation framework for Android, Browser, and Desktop apps
تطوير الويب والتطبيقاتالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- جارٍ جمع السجل
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلBotfather
With Botfather one can write crossplatform bots for Android, Desktop and Web (browser) applications in JavaScript. For this purpose Botfather provides several JavaScript APIs featuring image matching and more. Furthermore scripts can be turned into crossplatform binaries using the Botfather Binary Generator Tool (bingen for short).
Building on Linux
- Install gcc and cmake (e.g.
sudo pacman -S gcc cmake) - Install
Qt5, including the Qt5Script module (e.g.sudo pacman -S qt5) - Install
libgit2(e.g.sudo pacman -S libgit2) - Install
opencv(e.g.sudo pacman -S opencv) - Download the CEF binary distribution and point
CEF_ROOTto itwget https://cef-builds.spotifycdn.com/cef_binary_3.3578.1861.g1992780_linux64.tar.bz2tar -xvf cef_binary_3.3578.1861.g1992780_linux64.tar.bz2export CEF_ROOT=$(pwd)/cef_binary_3.3578.1861.g1992780_linux64
- Clone the repository and enter the directory
- Build the project
cmake -S . -B build -DCMAKE_BUILD_TYPE=Releasecmake --build build --parallel
Building the nightly Flatpak
We use these builds for testing Flatpak runtimes and to pre-build the binaries we later ship to Flathub.
- Install the runtime and matching SDK:
flatpak install flathub org.kde.Platform//5.15-25.08 org.kde.Sdk//5.15-25.08 - Build the app and put it in a repository:
flatpak-builder --repo=flatpak/repo --force-clean flatpak/build-dir flatpak/io.botfather.Nightly.yaml - Install and run the app for testing:
flatpak --user install ./flatpak/repo io.botfather.Nightlyflatpak run io.botfather.Nightly
Building on Windows
- Install Visual Studio including the
Desktop development with C++option - Install CMake
- Install Qt 5.15.2
- Enable the
Archiveversion filter to list Qt 5 releases - Make sure to install the
Qt Scriptmodule - Add
C:\Qt\5.15.2\msvc2015_64to theCMAKE_PREFIX_PATHenvironment variable
- Enable the
- Set up Chromium Embedded Framework (CEF)
- Download https://cef-builds.spotifycdn.com/cef_binary_3.3578.1861.g1992780_windows64.tar.bz2
- Extract the archive to a persistent location
- Set the
CEF_ROOTenvironment variable to the extracted directory
- Set up OpenCV 5
- Download and run the OpenCV installer for Windows
- Select the OpenCV directory and a build directory in CMake
- Configure and make sure
opencv_worldis selected - Generate and open the project
- Build
ALL_BUILDin the Release configuration - Point the
OPENCV_ROOTenvironment variable to the build directory
- Set up libgit2
- Download and extract the latest libgit2 release
- Build and install it from the extracted directory:
cmake -S . -B build -DBUILD_TESTS=OFF -DBUILD_CLI=OFFcmake --build build --config Releasecmake --install build --config Release --prefix C:\libgit2
- Add
C:\libgit2to theCMAKE_PREFIX_PATHenvironment variable
- Build Botfather
- Clone the
botfatherrepository - Select the
botfatherdirectory and a build directory in CMake - Configure, generate, and open the project
- Build
ALL_BUILDin the Release configuration - Copy
git2.dllandopencv_world5xxx.dllto thebuild/bin/Releasedirectory
- Clone the
VSCode Setup
Install the C/C++ VSCode Extension
Update the extension's IntelliSense configuration
Open the Command Palette (
Ctrl+Shift+P)Search for
>C/C++: Edit Configurations (UI)Add third-party dependencies to the
Include pathsectionOn Arch Linux, the following should be sufficient:
${workspaceFolder}/** /usr/include/qt/** /usr/include/opencv5/** /path/to/cef_binary_3.3578.1861.g1992780_linux64/**On Ubuntu, the paths differ slightly:
${workspaceFolder}/** /usr/include/x86_64-linux-gnu/qt5/** /usr/local/include/opencv5/** /path/to/cef_binary_3.3578.1861.g1992780_linux64/**On Windows, something like this should work:
${workspaceFolder}/** C:\Qt\5.15.2\msvc2015_64\include\** C:\LIBGIT2\libgit2-1.8.2\include\** C:\OPENCV\5.1.0\build\include\** C:\CEF\cef_binary_3.3578.1861.g1992780_windows64\**
Upgrading the flatpak runtime
- Find the latest runtime version branch on the KDE GitLab
- Get the version identifier from the
branchfield in theorg.kde.sdk.json.infile (e.g.,5.15-25-08) - Update the
runtime-versionfield inflatpak/io.botfather.Nightly.yaml - Install the runtime and matching SDK:
flatpak install flathub org.kde.Platform//<runtime-version> org.kde.Sdk//<runtime-version>
Troubleshooting
LaunchProcess: failed to execvp: ./webhelper
This means there's no webhelper binary next to the botfather binary.
Fix this problem by placing a webhelper binary next to the botfather binary matching the platform and build type.
Browser is blank / nothing works after CEF Update
Rebuild the both webhelper and botfather.
How to choose a new CEF version
Look up the latest supported CEF Release Branches and attempt to use it. In case the version appears unstable, use the release CefSharp is based on.
Debugging the Flatpak
Add the following build options to the io.botfather.Nightly.yaml to prevent the builder from stipping debug symbols from the build.
"build-options": {
"no-debuginfo": true,
"strip": false
}
Then start a shell in the sandbox using flatpak-builder --run <build-dir> <manifest> sh.
Now use gdb, strace, ldd and so on to debug.
More infos can be found in the Flatpak documentation on debugging.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…