Skip to content

Commit

Permalink
Strip the .beam files to make them much smaller
Browse files Browse the repository at this point in the history
Change-Id: I6a1617295f7a4e4adc33695ef49d6f8170719f44
  • Loading branch information
snej committed Aug 2, 2011
1 parent 338610f commit 1540066
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion EmptyApp/Couchbase Empty App.xcodeproj/project.pbxproj
Expand Up @@ -267,7 +267,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# The 'CouchbaseResources' subfolder of the framework contains Erlang code and other resources needed at runtime. Copy it into the app bundle:\nrsync -a \"${TARGET_BUILD_DIR}/../Debug-universal/Couchbase.framework/CouchbaseResources\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"";
shellScript = "# The 'CouchbaseResources' subfolder of the framework contains Erlang code and other resources needed at runtime. Copy it into the app bundle:\nrm -rf \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CouchbaseResources\"\nrsync -a \"${TARGET_BUILD_DIR}/../Debug-universal/Couchbase.framework/CouchbaseResources\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down
5 changes: 5 additions & 0 deletions Framework/Scripts/build_erlang_packages.sh
Expand Up @@ -21,3 +21,8 @@ $COMPILE mochiweb "mochifmt.erl mochifmt_records.erl mochifmt_std.erl mochigloba
$COMPILE ejson "ejson.erl mochijson2.erl mochinum.erl" "$ERLANG_DSTDIR/lib/ejson/ebin"
$COMPILE snappy "snappy.erl" "$ERLANG_DSTDIR/lib/snappy/ebin"
$COMPILE emonk/src "emonk.erl" "$ERLANG_DSTDIR/lib/emonk/ebin"

# Strip debug info & symbols out of the .beam files -- this saves a LOT of disk space:
echo "Stripping .beam files..."
cd "${ERLANG_DSTDIR}"
erl -noinput -eval 'erlang:display(beam_lib:strip_release("."))' -s init stop
2 changes: 1 addition & 1 deletion Framework/Scripts/compile_erlang_dir.sh
Expand Up @@ -12,4 +12,4 @@ set -e # Bail out if any command returns an error

echo "Building $1 into $3"
cd "../../vendor/couchdb/src/$1"
erlc -W0 +compressed -o "$3" -- $2
erlc -W0 +compressed -o "$3" $2

0 comments on commit 1540066

Please sign in to comment.