编译和安装

这篇文档解释如何从源文件代码构建和安装Gambas。

虽然这不是在系统上安装Gambas的最简单方法(因为大多数发行版都提供Gambas包), 如果您想要最新的Gambas版本,或者您想使用开发中的版本,那么就会需要这篇文档。

需要准备

软件开发包

为了编译Gambas,必需安装下面的依赖库及其对应的“开发”包。

包含这些依赖关系的软件包的实际名称可能取决于你的发行版,所以,请参阅下面具体指定的发行版页面以了解更多详细信息。

组件 依赖(库或'pkg-config'模块)
编译 gcc g++ automake autoconf libtool >= 2.0
解释器 libffi
gb.compress.bzlib2 libbz2.so
gb.compress.zlib libz.so
gb.cairo cairo >= 1.6.0 cairo-ft >= 1.6.0
gb.crypt libcrypt.so
gb.db.mysql libmysqlclient.so, libz.so
gb.db.odbc libodbc.so
gb.db.postgresql libpq.so
gb.db.sqlite2 libsqlite.so
gb.db.sqlite3 libsqlite3.so
gb.dbus dbus-1
gb.desktop libXtst.so
gb.desktop.gnome gnome-keyring-1
gb.gmp libgmp.so
gb.gsl libgsl.so libgslcblas.so
gb.gtk gtk+-2.0 >= 2.16 cairo >= 1.6.0 cairo-ft >= 1.6.0 gtk+-unix-print-2.0 >= 2.10 librsvg-2.0 >= 2.14.3
gb.gtk.opengl gtkglext-1.0
gb.image.io gdk-pixbuf
gb.image.imlib imlib
gb.libxml libxml-2.0
gb.media gstreamer-0.10 >= 0.10.31 gstreamer-interfaces-0.10 >= 0.10.31 适于 Gambas <= 3.4

gstreamer-1.0 gstreamer-video-1.0 适于 Gambas >= 3.5
gb.mime gmime-2.4gmime-2.6
gb.ncurses ncurses.so panel.so
gb.net.curl libcurl >= 7.13
gb.openal openal >= 1.13 alure
gb.opengl gb.opengl.glsl libGL.so libGLEW.so
gb.opengl.glu libGLU.so
gb.openssl openssl
gb.pcre libpcre.so
gb.pdf poppler >= 0.5
gb.poppler poppler >= 0.5 poppler-glib
gb.qt4 gb.qt4.ext gb.qt4.opengl gb.qt4.webkit 所有的Qt4库 >= Qt 4.5
gb.qt5 Qt5Core >= 5.3.0 Qt5Gui Qt5Widgets Qt5Svg Qt5PrintSupport Qt5X11Extras
gb.qt5.opengl Qt5Core >= 5.3.0 Qt5Gui Qt5Widgets Qt5OpenGL

注意: 如果你的Qt版本 >= 5.4.0,就不需要Qt5OpenGL。
gb.qt5.webkit Qt5Core >= 5.3.0 Qt5Gui Qt5Widgets Qt5Network Qt5Xml Qt5WebKit
Qt5WebKitWidgets Qt5PrintSupport
gb.sdl libSDL.so libSDL_ttf.so libGL.so libGLEW.so
gb.sdl2 libSDL2-2.0.so libSDL2_image-2.0 libSDL2_ttf-2.0 libGL.so libGLEW.so
gb.sdl.sound libSDL.so libSDL_mixer.so
gb.sdl2.audio libSDL2-2.0.so libSDL2_mixer-2.0.so
gb.v4l libjpeg.so libpng.so Video4Linux >= 2.0
gb.xml.xslt libxml-2.0 libxslt

其它相关准备

必需对'/tmp'目录有写入权限,否则Gambas将会不工作。

为了完成编译下列版本的GNU工具也是需要的:
  • automake 1.11.1

  • autoconf 2.68

  • libtool 2.4

用低版本的来编译可能会不工作!

下载源代码

有两种方法可以获取Gambas源代码:下载发布的tar归档文件,或者从“git”存储库获取它。

下载发布的tar归档文件

最新版本的tar档案可以直接从网站的 在 Download 项下载。

从“git”存储库下载

如果要使用开发中的版本,则需要从git下载源代码。 需要安装“git”以使用以下命令。有关使用Gitlab Gambas存储库的更多信息,请参阅关于Gambas的Git开发手册

输入以下命令在新的“gambas”目录中检索开发版本的最新版本:

git clone --depth=1 https://gitlab.com/gambas/gambas.git

“--depth=1”参数使“git”只下载最新版本。如果你忽略它,它会下载整个历史源代码中所做的更改, 如果您不打算对Gambas做出贡献,那么这是没用的。

因此,对于大多数用户来说,最好保留此选项, 因为这将减少下载的大小,以及磁盘的占用。

一旦完成,将创建一个包含源代码的“gambas”目录。

要检查和下载更新,请进入“gambas”目录,然后使用以下命令:

git pull

然后,源代码将被更新,您必须按顺序重新启动编译和安装过程 将更改应用于系统。

来自 GitLab 的最新版本的包的依赖项列表和配置命令

这些指令直接来自 GitLab 持续集成配置文件。它们可以工作,除非出现故障,您可以直接在 status of the GitLab pipelines 状态中检查。

Arch Linux

pacman -Syu --needed --noconfirm alure autoconf automake bzip2 zstd coreutils curl dbus gcc gdk-pixbuf2 git glew glib2 gmime3 gsl gst-plugins-base gstreamer gtk2 gtk3 imlib2 intltool libffi libgl libgnome-keyring mariadb-libs librsvg libsm libxcursor libxml2 libxslt libxtst mariadb make mesa ncurses pcre

pacman -Syu --needed --noconfirm pkg-config poppler poppler-glib postgresql postgresql-libs qt5-svg qt5-x11extras sdl2 sdl2_gfx sdl2_image sdl2_mixer sdl2_net sdl2_ttf sdl_mixer sdl_ttf smpeg sqlite unixodbc v4l-utils xdg-utils zlib gettext qt5-webengine webkit2gtk qt6-svg qt6-webengine mongo-c-driver

./reconf-all

./configure -C --disable-sqlite2 --disable-qt4 --disable-pdf --disable-qt5webkit --disable-gtkopengl

Debian Bullseye (11)

apt-get update && apt-get install -y build-essential g++ automake autoconf libbz2-dev libzstd-dev default-libmysqlclient-dev unixodbc-dev libpq-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libpoppler-cpp-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-3.0-dev libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev qtwebengine5-dev libwebkit2gtk-4.0-dev git libssl-dev libmongoc-dev

./reconf-all

./configure -C --disable-keyring --disable-sqlite2 --disable-qt4 --disable-qt6

Debian Bookworm (12)

apt-get update && apt-get install -y build-essential g++ automake autoconf libbz2-dev libzstd-dev default-libmysqlclient-dev unixodbc-dev libpq-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libpoppler-cpp-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-3.0-dev libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev qtwebengine5-dev libwebkit2gtk-4.0-dev git libssl-dev qt6-base-dev qt6-webengine-dev qt6-svg-dev libmongoc-dev

./reconf-all

./configure -C --disable-keyring --disable-sqlite2 --disable-qt4

Debian Trixie (13)

apt-get update && apt-get install -y build-essential g++ automake autoconf libbz2-dev libzstd-dev default-libmysqlclient-dev unixodbc-dev libpq-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libpcre2-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libpoppler-cpp-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf-xlib-2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-3.0-dev libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev qtwebengine5-dev libwebkit2gtk-4.1-dev git libssl-dev qt6-base-dev qt6-webengine-dev qt6-svg-dev libmongoc-dev

./reconf-all

./configure -C --disable-keyring --disable-sqlite2 --disable-qt4 --disable-gtkopengl

Debian Sid (unstable)

apt-get update && apt-get install -y build-essential g++ automake autoconf libbz2-dev libzstd-dev default-libmysqlclient-dev unixodbc-dev libpq-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libpoppler-cpp-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf-xlib-2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses-dev libgmime-3.0-dev libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev qtwebengine5-dev libwebkit2gtk-4.1-dev git libssl-dev qt6-base-dev qt6-webengine-dev qt6-svg-dev libmongoc-dev

./reconf-all

./configure -C --disable-keyring --disable-qt4 --disable-sqlite2

Ubuntu Kinetic (22.10)

Unable to find build configuration for ubuntu-kinetic

Ubuntu Jammy (22.04)

apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential git g++ automake autoconf libtool libbz2-dev libzstd-dev libmysqlclient-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-private-dev libpoppler-glib-dev libpoppler-cpp-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-3.0-dev llvm-dev llvm libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libssl-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev qtwebengine5-dev libwebkit2gtk-4.0-dev libfribidi-dev libmongoc-dev

./reconf-all

./configure -C --disable-keyring --disable-qt4 --disable-qt6

Ubuntu Focal (20.04)

apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential git g++ automake autoconf libtool libbz2-dev libzstd-dev libmysqlclient-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-private-dev libpoppler-glib-dev libpoppler-cpp-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-2.6-dev llvm-dev llvm libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libssl-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev qtwebengine5-dev libwebkit2gtk-4.0-dev libfribidi-dev libmongoc-dev

./reconf-all

./configure -C --disable-keyring --disable-qt4 --disable-qt6

Ubuntu Bionic (18.04)

apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential git g++ automake autoconf libtool libbz2-dev libzstd-dev libmysqlclient-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-private-dev libpoppler-glib-dev libpoppler-cpp-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libqt4-dev libqtwebkit-dev libqt4-opengl-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-2.6-dev llvm-dev llvm libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libssl-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev qtwebengine5-dev libwebkit2gtk-4.0-dev libfribidi-dev libmongoc-dev

./reconf-all

./configure -C --disable-keyring --disable-qt6

Ubuntu Xenial (16.04)

apt-get update && apt-get install -y build-essential g++ git automake autoconf libtool libbz2-dev libmysqlclient-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libpoppler-cpp-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libqt4-dev libqtwebkit-dev libqt4-opengl-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgnome-keyring-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl-dev libncurses5-dev libgmime-2.6-dev llvm-dev llvm libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libssl-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev qtbase5-dev libwebkit2gtk-3.0-dev libfribidi-dev

./reconf-all

./configure -C --disable-gtk3webview --disable-qt5webview --disable-qt5wayland --disable-zstd --disable-qt6 --disable-mongodb

Ubuntu Trusty (14.04)

apt-get update && apt-get install -y build-essential git g++ automake autoconf libtool libbz2-dev libmysqlclient-dev unixodbc-dev libpq-dev libsqlite0-dev libsqlite3-dev libglib2.0-dev libgtk2.0-dev libcurl4-gnutls-dev libgtkglext1-dev libpcre3-dev libsdl-sound1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libxml2-dev libxslt1-dev librsvg2-dev libpoppler-dev libpoppler-glib-dev libpoppler-private-dev libpoppler-cpp-dev libasound2-dev libdirectfb-dev libxtst-dev libffi-dev libqt4-dev libqtwebkit-dev libqt4-opengl-dev libglew-dev libimlib2-dev libv4l-dev libsdl-ttf2.0-dev libgnome-keyring-dev libgdk-pixbuf2.0-dev linux-libc-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libcairo2-dev libgsl0-dev libncurses5-dev libgmime-2.6-dev llvm-dev llvm libalure-dev libgmp-dev libgtk-3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-image-dev sane-utils libdumb1-dev libssl-dev libglu1-mesa-dev libglu1-mesa-dev libglew1.10 libglu1-mesa libgles2-mesa-dev libwebkit2gtk-3.0-dev libfribidi-dev

./reconf-all

./configure -C --disable-qt5 --disable-gtk3webview --disable-gtk3opengl --disable-zstd --disable-qt6 --disable-mongodb

Note: For the Ubuntu/LinuxMint PPA install method of the latest stable build
or daily build that does not need compiling See the Ubuntu page.

Alpine

apk add --no-progress -q autoconf automake libtool curl-dev dbus-dev g++ gdk-pixbuf-dev git gmp-dev glew-dev glib-dev gmime-dev gsl-dev gst-plugins-base-dev gstreamer-dev gtk+2.0-dev gtk+3.0-dev imlib2-dev gettext-dev libffi-dev mesa-dev mariadb-dev librsvg-dev libsm-dev libxcursor-dev libxml2-dev libxslt-dev libxtst-dev make ncurses-dev pcre-dev pkgconf poppler-dev postgresql-dev qt5-qtsvg-dev qt5-qtx11extras-dev qt5-qtwebengine-dev sdl2-dev sdl2_image-dev sdl2_mixer-dev sdl2_ttf-dev sqlite-dev unixodbc-dev xdg-utils zlib-dev webkit2gtk-4.1-dev qt6-qtsvg-dev qt6-qtwebengine-dev mongo-c-driver-dev

./reconf-all

./configure -C --disable-openal --disable-qt4 --disable-sdl --disable-sdlsound --disable-sqlite2 --disable-v4l --disable-gtkopengl --disable-zstd  --disable-qt5webkit --disable-pdf --disable-keyring

Fedora Latest

dnf install -y libtool libtool-ltdl-devel gcc make autoconf dumb-devel gmime-devel gmime30-devel libffi-devel mariadb-devel postgresql-devel unixODBC-devel sqlite2-devel libsqlite3x-devel libxslt-devel libv4l-devel glew-devel poppler-devel poppler-glib-devel poppler-cpp-devel qt-devel qt5-qtbase-devel qt5-qtbase-private-devel qt5-qtwebengine-devel qt5-qtx11extras-devel qt5-qtsvg-devel SDL_ttf-devel SDL_mixer-devel SDL-devel SDL2_ttf-devel SDL2_mixer-devel SDL2_image-devel SDL2-devel cairo-devel gtk2-devel gtk3-devel imlib2-devel librsvg2-devel qt-webkit-devel qt5-qtwebkit qt5-qtwebkit-devel openal-soft-devel libjpeg-turbo-devel gtkglext-devel gmp-devel libxml2-devel libXtst-devel gsl-devel pcre-devel dbus-devel libcurl-devel alure-devel gstreamermm-devel libgnome-keyring-devel bzip2-devel libzstd-devel webkit2gtk3-devel ncurses-devel qt6-qtbase-devel qt6-qtwebengine-devel qt6-qtsvg-devel mongo-c-driver-devel

./reconf-all

./configure -C --disable-pdf

OpenSuse Leap/Tumbleweed

zypper update -y && zypper install -y libtool gawk gcc glew-devel gmime-devel gtk2-devel gtk3-devel libqt5-qtx11extras-devel libqt5-qtwebengine-devel libQt5Xml-devel libQt5Sql-devel libqt5-qtsvg-devel libQt5Gui-devel libQt5Core-devel libQt5Sql5-postgresql libQt5Sql5-unixODBC libQt5Sql5-mysql libQt5Sql5-sqlite webkit2gtk3-devel libICE-devel libSM-devel unixODBC-devel libzip-devel libzstd-devel libmariadb-devel gsl-devel libopenssl-devel alure-devel postgresql-devel libcurl-devel libSDL_ttf-devel libSDL_mixer-devel libSDL-devel libSDL2_ttf-devel libSDL2_mixer-devel libSDL2_image-devel libSDL2-devel libxslt-devel libv4l-devel librsvg-devel gtkglext-devel libgnome-keyring-devel libjpeg62-devel libpoppler-devel libpoppler-glib-devel imlib2-devel gmp-devel gstreamermm-devel qt6-webenginewidgets-devel qt6-svg-devel qt6-gui-devel qt6-core-devel qt6-openglwidgets-devel

./reconf-all

./configure -C --disable-qt4 --disable-sqlite2 --disable-qt5webkit --disable-pdf --disable-mongodb

编译并安装Gambas 3

配置源代码包

无论是下载tar归档还是从git下载源代码,编译过程都是相同的。

当确定已经安装了相关库或包并下载了源代码,在终端中输入下面的命令。

'$' 代表你的终端提示符, '...' 代表配置和编译期间打印的信息。

首先进入源代码顶层目录。

$ cd <源代码目录路径>

然后,用下面的命令创建配置脚本。

$ ./reconf-all

下面的命令检查你的操作系统,并且配置安装包:

$ ./configure -C
...

如果某个库或者开发包错漏, 会得到某些组件不能使用的警告提示。

注意. 让 ./configure 仅输出错误消息而不输出所有检查信息,请使用 -q (安静)标志

$ ./configure -C -q

但如果将安装输出发送给 gambas 团队寻求帮助,请勿使用 -q。

关于 configure 命令的具体说明在位于源代码顶层目录的 INSTALL 文件中, 建议阅读它。

编译

如果配置没有发生错误,执行下面的命令进行编译:

$ make -j $(nproc)
...

参数 -j 设置一次执行多少个“作业”,是您的计算机可以利用的所有 CPU 核数。语句 $(nproc) 返回您的核心数。

安装

如果编译没有发生错误,执行下面的命令进行安装:

安装Gambas到你的操作系统,必须以 root 权限进行。

$ su -c "make install"
Password: <在这里输入root口令>
...

或者

$ sudo make install
Password: <在这里输入用户口令>
...

故障处理

假如从存储库升级源代码之后, 在其后进行的编译中出现错误, 可以通过下面的命令尝试重建配置脚本。

$ ./reconf-all

然后,可以重新执行 ./configure -C -q

如果它没有工作,我需要确切的知道发生了什么。 所以,键入下面的命令:

$ ( ./configure -C; make; make install ) > output.txt 2>&1

然后通过电子邮件将文件 "output.txt" 发送给我, 同时尽力提供你的计算机和操作系统配置的 详细信息。

另一种可能性是存在一些 文件/库 未 更新/重新编译,如果您有一个现有的源文件夹已编译但在更新后未编译(即使在运行 ./reconf-all 后)。

您可以尝试运行“make clean”或“make distclean”来清理源文件夹中所有创建的文件,以便所有文件都从新的重新编译。

$ make clean
$ make distclean

开发环境

Gambas的IDE是用Gambas编写而成。为了编译和使用它,必须编译下列组件:

用户制作来帮助完成安装过程的工具

编译/安装最新 Gambas3 的帮助工具

对特定发行版的指导说明

A
Arch and Manjaro Linux Arm64
Arch Linux
C
Cygwin
D
Debian
F
Fedora
FreeBSD
L
Linux Mint
M
Mageia
O
OpenSUSE
P
Pardus
R
Raspbian
U
Ubuntu
编译/安装最新 Gambas3 的帮助工具