One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| var readline = require('readline'), | |
| fs = require('fs'); | |
| var LinkMap = function(filePath) { | |
| this.files = [] | |
| this.filePath = filePath | |
| } | |
| LinkMap.prototype = { | |
| start: function(cb) { |
Installation procedure for pre-build actions to automatically populate Xcode Info.plist with dynamic data.
Edit Xcode Scheme and add a pre-action script.
Copy the contents of preaction.sh into the pre-action script box.
| // | |
| // JAZMusician.h | |
| // JazzyApp | |
| // | |
| #import <Foundation/Foundation.h> | |
| /** | |
| JAZMusician models, you guessed it... Jazz Musicians! | |
| From Ellington to Marsalis, this class has you covered. |
| # Ways to execute a shell script in Ruby | |
| # Example Script - Joseph Pecoraro | |
| cmd = "echo 'hi'" # Sample string that can be used | |
| # 1. Kernel#` - commonly called backticks - `cmd` | |
| # This is like many other languages, including bash, PHP, and Perl | |
| # Returns the result of the shell command | |
| # Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Open App</title> | |
| <!-- | |
| URL Params: | |
| customSchemeURL: Your custom scheme app |
| # This script is based on Jacob Van Order's answer on apple dev forums https://devforums.apple.com/message/971277 | |
| # See also http://spin.atomicobject.com/2011/12/13/building-a-universal-framework-for-ios/ for the start | |
| # To get this to work with a Xcode 6 Cocoa Touch Framework, create Framework | |
| # Then create a new Aggregate Target. Throw this script into a Build Script Phrase on the Aggregate | |
| ###################### | |
| # Options |
| #!/bin/sh | |
| set -eo pipefail | |
| IFS=$'\n\t' | |
| # Constants | |
| NOW=$(date +%s) | |
| BUILD_FILE_NAME="MyApp-${NOW}" | |
| SCHEME="MyApp" | |
| WORKSPACE="MyApp" | |
| PROJECT="MyApp" |
| #Thanks to http://spin.atomicobject.com/2011/12/13/building-a-universal-framework-for-ios/ for the start | |
| #To get this to work with a Xcode 6 Cocoa Touch Framework, create Framework | |
| #Then create a new Aggregate Target. Throw this script into a Build Script Phrase on the Aggregate | |
| #Tip: if you want the resulting framework to be the same name as your Framework, change the Aggregate's product name | |
| SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${PRODUCT_NAME}.framework" | |
| DEVICE_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PRODUCT_NAME}.framework" | |
| UNIVERSAL_LIBRARY_DIR="${BUILD_DIR}/${CONFIGURATION}-iphoneuniversal" | |
| FRAMEWORK="${UNIVERSAL_LIBRARY_DIR}/${PRODUCT_NAME}.framework" |
| # ruby convert-to-ipad.rb video1.avi video2.avi video3.avi | |
| # | |
| # Prereq: brew install ffmpeg | |
| ARGV.each do |input_file| | |
| output_file = input_file.gsub('.avi', '.ipad.mp4') | |
| cmd = "ffmpeg -i #{input_file} -acodec aac -ac 2 -strict experimental -ab 160k -s 1024x768 -vcodec libx264 -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -b 1200k -f mp4 -threads 0 #{output_file}" | |
| puts cmd | |
| system cmd | |
| end |