![在 ubuntu 20.04 上构建 gnash](https://linux22.com/image/931658/%E5%9C%A8%20ubuntu%2020.04%20%E4%B8%8A%E6%9E%84%E5%BB%BA%20gnash.png)
要播放一些旧的 Flash 动画,我需要一个适用于 Ubuntu 20.04 的 Flash 播放器。我以前使用咬牙切齿,但 ubuntu 不再提供此功能。因此,我尝试自己编译它,即克隆 git 存储库,然后./autogen.sh
尝试./configure
安装所有缺少的库。除了以下情况外,其他方法都有效:
ERROR: GST media handling requested but gstreamer-0.10+ not found
Install it from http://www.gstreamer.net
or .deb users: apt-get install libgstreamer0.10-dev
or .rpm users: yum install gstreamer-devel
or yast users: yast install gstreamer010-devel
ERROR: Base plugins are required for gstreamer media!
Install gstreamer-plugins-base from http://www.gstreamer.net
or .deb users: apt-get install
libgstreamer-plugins-base0.10-dev
or .rpm users: yum install gstreamer-plugins-base-devel
ERROR: No xulrunner development package is installed!
Install it from
http://releases.mozilla.org/pub/mozilla.org/xulrunner
or .deb users: apt-get install xulrunner-dev
or maybe : apt-get install npapi-sdk-dev
or maybe : apt-get install firefox-dev
or .rpm users: yum install xulrunner-devel
or specify --disable-npapi
对于最后一个,我在 ubuntu 存储库中找不到xulrunner-dev
或包,但安装了。这不起作用,所以我使用了。npapi-dev
firefox-dev
--disable-npapi
对于gstreamer
插件,我安装了 1.0 版本。但如果我这样做,make
我会收到以下错误消息:
make all-recursive
make[1]: Entering directory '/home/myuser/build/gnash'
Making all in desktop
make[2]: Entering directory '/home/myuser/build/gnash/desktop'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/myuser/build/gnash/desktop'
Making all in libdevice
make[2]: Entering directory '/home/myuser/build/gnash/libdevice'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/myuser/build/gnash/libdevice'
Making all in libbase
make[2]: Entering directory '/home/myuser/build/gnash/libbase'
sed -e 's|@DEFAULT_FLASH_PLATFORM_ID[@]|LNX|g' -e 's|@DEFAULT_FLASH_MAJOR_VERSION[@]|10|g' -e 's|@DEFAULT_FLASH_MINOR_VERSION[@]|1|g' -e 's|@DEFAULT_FLASH_REV_NUMBER[@]|999|g' -e 's|@DEFAULT_STREAMS_TIMEOUT[@]|60|g' -e 's|@DEFAULT_SOL_SAFEDIR[@]|~/.gnash/SharedObjects|g' './gnashrc.in' >gnashrc
make[2]: Leaving directory '/home/myuser/build/gnash/libbase'
Making all in libmedia
make[2]: Entering directory '/home/myuser/build/gnash/libmedia'
CXX libgnashmedia_la-AudioDecoderGst.lo
In file included from gst/AudioDecoderGst.cpp:20:
gst/AudioDecoderGst.h:27:10: fatal error: gst/gst.h: No such file or directory
27 | #include <gst/gst.h>
| ^~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:1126: libgnashmedia_la-AudioDecoderGst.lo] Error 1
make[2]: Leaving directory '/home/myuser/build/gnash/libmedia'
make[1]: *** [Makefile:1163: all-recursive] Error 1
make[1]: Leaving directory '/home/myuser/build/gnash'
make: *** [Makefile:1071: all] Error 2
那么我如何gnash
在 ubuntu 20.04 上工作呢?
答案1
由于 API 发生变化,因此无法在 20.04 LTS 等现代系统上编译 Gnash。
但你可以使用施鲁特安装了 Gnash 的 Ubuntu 18.04 LTS 容器如下所示:
sudo apt-get install schroot debootstrap -y
cat <<EOF | sudo tee /etc/schroot/chroot.d/bionic.conf
[bionic]
description=Ubuntu 18.04 bionic
directory=/srv/chroot/bionic
root-users=$USER
type=directory
users=$USER
EOF
sudo mkdir -p /srv/chroot/bionic
sudo debootstrap bionic /srv/chroot/bionic
cat <<EOF | sudo tee /srv/chroot/bionic/etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu bionic main universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
EOF
schroot -c bionic -u root apt-get update
schroot -c bionic -u root apt-get install gnash
要运行它,请使用以下命令:
schroot -c bionic -u $USER env DISPLAY=:0.0 gnash path/to/file.swf