作为开发人员,我需要在不同的 Firefox 版本中测试我的网站和附加组件,因此我需要一个工具来在特殊的文件夹中创建一个具有自己的配置文件和数据的小工具。
另外,一些客户需要特定的 Firefox 版本来运行一些无法在较新的 Firefox 版本上运行的旧软件。
如何从某个 Linux 版本创建 Firefox 便携版本?
我正在寻找一个可以完成所有任务的安装脚本,这样我就可以轻松地在多台机器上安装所需的版本。
答案1
对于 Linux,我创建了一个脚本,可以下载某个版本的 Firefox 并将其安装在额外的文件夹中。
我也在这里主持:https://gist.github.com/rubo77/b999c1bc6d10ab802536
#!/bin/sh
# Configure the following variables according to your requirements
version="24.0" # chose from http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/
language="en-US" # e.g. "de" or "en-US"
########################################################
application="firefox" # "thunderbird" or "firefox" but file extension, archive extraction, and binary execution needs to be adapted as well see filenames at http://download.cdn.mozilla.net/pub/mozilla.org/
echo This script downloads "${application} Version ${version} If you want to install another version press Ctrl C and edit and configure this file"
read -n1 -r -p "Press space to continue..." key
file="${application}-${version}.tar.bz2"
url="http://download.cdn.mozilla.net/pub/mozilla.org/${application}/releases/${version}/linux-i686/${language}/${file}"
#e.g.
mkdir "${application}-portable"
cd "${application}-portable"
wget $url
echo "Extracting archive, please wait..."
tar xfj $file
rm $file
mv $application app
mkdir data
echo '#!/bin/sh' > "${application}-portable"
echo 'dir=${0%/*}' >> "${application}-portable"
echo 'if [ "$dir" = "$0" ]; then' >> "${application}-portable"
echo ' dir="."' >> "${application}-portable"
echo 'fi' >> "${application}-portable"
echo 'cd "$dir/app"' >> "${application}-portable"
echo './firefox -profile ../data' >> "${application}-portable"
chmod +x "${application}-portable"
echo ... finished
echo "#close all running instances of another ${application} version:"
echo killall ${application}
echo "#change into the directory"
echo "# and start the application there"
echo cd "${application}-portable"
echo ./"${application}-portable"
我使用了这个来源:http://portableapps.com/node/16344
待办事项:也许可以借助此页面添加一个 sterter:http://wiki.ubuntuusers.de/Portable_Firefox