Skip to content

Commit

Permalink
Fix install/build dependencies. Mac build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuevana committed Apr 25, 2014
1 parent b423ba2 commit 221640a
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 12 deletions.
103 changes: 103 additions & 0 deletions deps/osx/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>12C3006</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Cuevana Storm</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFile</key>
<string>app.icns</string>
<key>CFBundleTypeName</key>
<string>Cuevana Storm App</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.intel.nw.app</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Folder</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>fold</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>None</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>node-webkit</string>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundleIdentifier</key>
<string>com.intel.nw</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Cuevana Storm</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.2 Beta</string>
<key>CFBundleVersion</key>
<string>0.2b</string>
<key>DTSDKBuild</key>
<string>11E52</string>
<key>DTSDKName</key>
<string>macosx10.7</string>
<key>DTXcode</key>
<string>0452</string>
<key>DTXcodeBuild</key>
<string>4G2008a</string>
<key>LSFileQuarantineEnabled</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.6.0</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>SCMRevision</key>
<string>239963</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>com.pkware.zip-archive</string>
</array>
<key>UTTypeDescription</key>
<string>Cuevana Storm</string>
<key>UTTypeIconFile</key>
<string>app.icns</string>
<key>UTTypeIdentifier</key>
<string>com.intel.nw.app</string>
<key>UTTypeReferenceURL</key>
<string>http://www.cuevana.tv</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<string>node-webkit</string>
<key>public.filename-extension</key>
<array>
<string>nw</string>
</array>
<key>public.mime-type</key>
<string>application/x-node-webkit-app</string>
</dict>
</dict>
</array>
</dict>
</plist>
28 changes: 17 additions & 11 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,15 @@ gulp.task('install:ffmpegsumo', function() {
else if (process.arch === 'ia32') platform = 'linux32'
else if (process.arch === 'x64') platform = 'linux64'

// Destination path
var destPath = './node_modules/nodewebkit/nodewebkit/';

// Update path for OSX
if (platform == 'osx') destPath += 'Contents/Frameworks/node-webkit Framework.framework/Libraries';

// Copy lib
return gulp.src('deps/ffmpegsumo/'+platform+'/*')
.pipe(gulp.dest('node_modules/nodewebkit/nodewebkit/'))
return gulp.src('./deps/ffmpegsumo/'+platform+'/*')
.pipe(gulp.dest(destPath))
})

gulp.task('install', ['compile', 'install:ffmpegsumo'])
Expand All @@ -99,7 +105,7 @@ gulp.task('build', ['compile'], function(cb) {
if (!!package.dependencies) {
modules = Object.keys(package.dependencies)
.filter(function(m) { return m != 'nodewebkit' })
.map(function(m) { return 'node_modules/'+m+'/**/*' })
.map(function(m) { return './node_modules/'+m+'/**/*' })
}

// Which platforms should we build
Expand All @@ -122,12 +128,12 @@ gulp.task('build', ['compile'], function(cb) {

// Initialize NodeWebkitBuilder
var nw = new NodeWebkitBuilder({
files: [ 'package.json', 'app/**/*' ].concat(modules),
files: [ './package.json', './app/**/*' ].concat(modules),
version: '0.9.2',
cacheDir: 'build/cache',
cacheDir: './build/cache',
platforms: platforms,
macIcns: 'app/assets/icons/mac.icns',
winIco: 'app/assets/icons/windows.ico',
macIcns: './app/assets/icons/mac.icns',
winIco: './app/assets/icons/windows.ico',
checkVersions: false
})

Expand All @@ -143,31 +149,31 @@ gulp.task('build', ['compile'], function(cb) {

// Handle ffmpeg for Windows
if (platforms.indexOf('win') > -1) {
gulp.src('deps/ffmpegsumo/win/*')
gulp.src('./deps/ffmpegsumo/win/*')
.pipe(gulp.dest(
'./build/Cuevana/win'
))
}

// Handle ffmpeg for Mac
if (platforms.indexOf('osx') > -1) {
gulp.src('deps/ffmpegsumo/osx/*')
gulp.src('./deps/ffmpegsumo/osx/*')
.pipe(gulp.dest(
'./build/Cuevana/osx/node-webkit.app/Contents/Frameworks/node-webkit Framework.framework/Libraries'
))
}

// Handle ffmpeg for Linux32
if (platforms.indexOf('linux32') > -1) {
gulp.src('deps/ffmpegsumo/linux32/*')
gulp.src('./deps/ffmpegsumo/linux32/*')
.pipe(gulp.dest(
'./build/Cuevana/linux32'
))
}

// Handle ffmpeg for Linux64
if (platforms.indexOf('linux64') > -1) {
gulp.src('deps/ffmpegsumo/linux64/*')
gulp.src('./deps/ffmpegsumo/linux64/*')
.pipe(gulp.dest(
'./build/Cuevana/linux64'
))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"magnet-uri": "~1.1.0",
"numeral": "^1.5.3",
"i18n": "~0.4.1",
"nodewebkit": "~0.9.2"
"nodewebkit": "0.9.2-4"
},
"devDependencies": {
"gulp": "~3.5.6",
Expand Down

0 comments on commit 221640a

Please sign in to comment.