Ubuntu 18.04 install SDL2

Linux作業系統安裝、設定與管理 (CentOS、Ubuntu)
回覆文章
inho
文章: 53
註冊時間: 2017-12-08, 23:00

Ubuntu 18.04 install SDL2

文章 inho » 2018-10-10, 13:01

安裝】】SDL2 時,要特別注意:./configure 的附帶參數 --disable-pulseaudio ........
#==== for Raspberry Pi
$ ./configure --enable-video-opengles2 --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl --host=arm-raspberry-linux-gnueabihf
#============ for ubuntu ???
./configure --enable-video-opengles2 --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl
r
r
參考網站: https://choccyhobnob.com/raspberry-pi/s ... pberry-pi/
#=======================================================================
./autogen.sh
./configure --disable-video-opengl
#### $ ./configure --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-opengl
make
sudo make install
###
# 下載 】SDL 最新套件: SDL2, SDL2_image, SDL2_ttf, SDL2_net, SDL2_mixer,

$ wget
https://www.libsdl.org/release/SDL2-2.0.9.tar.gz https://www.libsdl.org/projects/SDL_ttf ... .14.tar.gz https://www.libsdl.org/projects/SDL_ima ... 0.4.tar.gz https://www.libsdl.org/projects/SDL_mix ... 0.1.tar.gz ## http://www.libsdl.org/projects/SDL_net/ ... 0.1.tar.gz
https://www.libsdl.org/projects/SDL_smp ... 0.0.tar.gz

#============ install SDL2 =========================
解壓縮:
$ tar -zxvf SDL2-2.0.9.tar.gz
$ cd SDL2-2.0.9
$ ./configure --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-opengl
$ make
$ sudo make install
#==============================================================
$ tar -zxvf SDL2_ttf-2.0.14.tar.gz
$ cd SDL2_ttf-2.0.14
$ ./configure
$ make
$ sudo make install

#================= install SDL2_image =============
# Install the libjpeg, libpng, libtiff and libgif packages, needed to convert between JPEG, PNG, TIFF, GIF # and WebP image formats.
$ tar -zxvf SDL2_image-2.0.4.tar.gz
# 安裝以前 先安裝 以下套件 ,否則會造成 不支援 PNG、JPG file
$ sudo apt-get install libwebp-dev libtiff-dev #// or
$ sudo apt-get install libtiff5-dev" #//===or
$ sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libgif-dev # (suggested)
$ cd SDL2_image-2.0.4
$ ./configure
$ make
$ sudo make install

#==========================================
$ tar -zxvf SDL2_mixer-2.0.1.tar.gz
$ tar -zxvf SDL2_net-2.0.1.tar.gz
$ tar -zxvf SDL2_smpeg2-2.0.0.tar.gz

參考網站:http://forum.outpost2.net/index.php?topic=5978.0

回覆文章