Last active
December 22, 2015 16:29
-
-
Save narlynephi/6499516 to your computer and use it in GitHub Desktop.
Script that tests the flash development setup. Assumes fcsh-wrap, flashplayer, and flashplayerdebugger is in $PATH. Downloads, compiles and runs AdamAtomic's Flixel framework and EZPlatformer example game
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script made by @narlynephi (narlyproductions.com) | |
# | |
# Download, compile, and run AdamAtomic's Flixel example game "EZPlatformer" | |
# | |
# create | |
mkdir flash_test | |
cd flash_test | |
# download EZPlatformer code | |
wget https://github.com/AdamAtomic/EZPlatformer/archive/master.zip | |
mv master.zip EZPlatformer.zip | |
# download flixel code | |
wget https://github.com/AdamAtomic/flixel/archive/master.zip | |
mv master.zip flixel.zip | |
# unzips to flixel-master | |
unzip flixel.zip | |
# unzips to EZPlatformer-master | |
unzip EZPlatformer.zip | |
cd EZPlatformer-master | |
cat <<MAKEFILE_CONTENTS > makefile | |
MAIN=src/EZPlatformer.as | |
OUTPUT_NAME=EZPlatformer.swf | |
FLIXEL=../flixel-master/ | |
SOURCE_PATHS=-compiler.source-path+=\$(FLIXEL) | |
CC=fcsh-wrap | |
CC_OPTS=-incremental=true -static-link-runtime-shared-libraries=true -default-frame-rate=60 \$(SOURCE_PATHS) | |
RELEASE_FOLDER=release | |
RELEASE_OUTPUT=\$(RELEASE_FOLDER)/\$(OUTPUT_NAME) | |
DEBUG_FOLDER=debug | |
DEBUG_OUTPUT=\$(DEBUG_FOLDER)/\$(OUTPUT_NAME) | |
all: \$(RELEASE_OUTPUT) \$(DEBUG_OUTPUT) | |
real: \$(RELEASE_OUTPUT) | |
dbg: \$(DEBUG_OUTPUT) | |
\$(RELEASE_OUTPUT): \$(RELEASE_FOLDER) src/*.as | |
\$(CC) \$(CC_OPTS) -output=\$(RELEASE_OUTPUT) \$(MAIN) | |
\$(RELEASE_FOLDER): | |
mkdir -p \$(RELEASE_FOLDER) | |
\$(DEBUG_OUTPUT): \$(DEBUG_FOLDER) src/*.as | |
\$(CC) \$(CC_OPTS) -debug=true -output=\$(DEBUG_OUTPUT) \$(MAIN) | |
\$(DEBUG_FOLDER): | |
mkdir -p \$(DEBUG_FOLDER) | |
clean: | |
rm -rf \$(DEBUG_FOLDER) | |
rm -rf \$(RELEASE_FOLDER) | |
run: \$(RELEASE_OUTPUT) | |
flashplayer \$(RELEASE_OUTPUT) | |
run_debug: \$(DEBUG_OUTPUT) | |
flashplayerdebugger \$(DEBUG_OUTPUT) | |
MAKEFILE_CONTENTS | |
# compile and run the swf | |
make run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment