Skip to content

Instantly share code, notes, and snippets.

@narlynephi
Last active December 22, 2015 16:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save narlynephi/6499490 to your computer and use it in GitHub Desktop.
Save narlynephi/6499490 to your computer and use it in GitHub Desktop.
Script that sets up a Ubuntu box for flash development. Tested only on Ubuntu 12.04.3 x64 and Ubuntu 12.10 x86
#!/bin/bash
# Script made by @narlynephi (narlyproductions.com)
#
# This script will setup Ubuntu for flash development by:
# 1 - download/install normal and debugger flash projectors
# 2 - download/install flex 4.6 sdk (and fcsh-wrap)
# 3 - install dependencies
# 4 - add flash projectors and flex sdk binaries to PATH
#
mkdir -p /tmp/flash_setup/players
cd /tmp/flash_setup/players
# download/install flash projectors (normal and debug) to /opt/flash/11
wget http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_sa.i386.tar.gz
wget http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_sa_debug.i386.tar.gz
for file in *.gz ; do tar -xzvf $file ; done
sudo mkdir -p /opt/flash/11
sudo mv flashplayerdebugger /opt/flash/11
sudo mv install_flash_player_linux_sa/flashplayer /opt/flash/11
# download/install the flex sdk to /opt/flex
cd /tmp/flash_setup
wget http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip
sudo mkdir -p /opt/flex
sudo unzip -d /opt/flex flex_sdk_4.6.zip
sudo chmod -R a+rx /opt/flex
# fetch fcsh-wrap and stash in /opt/flex/bin
wget https://raw.github.com/Draknek/fcsh-wrap/master/fcsh-wrap
chmod 755 fcsh-wrap
sudo mv fcsh-wrap /opt/flex/bin
# make sure package lists are up-to-date
sudo apt-get update
# needed to run mxmlc and other tools in /opt/flex/bin
sudo apt-get install -y openjdk-7-jre
# needed to be able to run flashplayer and flashplayerdebugger if running an x64 system
sudo apt-get install -y libc6-i386
# needed to resolve error:
# ./flashplayer: error while loading shared libraries:
# libgthread-2.0.so.0: cannot open shared object file:
# No such file or directory
sudo apt-get install -y ia32-libs-gtk
# add /opt/flex/bin and /opt/flash/11 to the $PATH env var in ~/.bashrc
echo -e '\n\n#LINUX FLASH DEV\nPATH="$PATH:/opt/flash/11:/opt/flex/bin"' >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment