rknell / cordova-media-generator Goto Github PK
View Code? Open in Web Editor NEWCLI Utility that generates Cordova / Phonegap image assets required for app store submission, icons, and splash screens.
License: Apache License 2.0
CLI Utility that generates Cordova / Phonegap image assets required for app store submission, icons, and splash screens.
License: Apache License 2.0
My source icon has a transparent background. The generated icons does not.
Is there any possibility to get the background transparent?
Little issue in the docs.
C:\cb\td\win8\shell\86bea9f8-d2af-457b-8a54-c017ae1b8364>mediagen
Error getting iOS path { [Error: ENOENT, readdir 'C:\cb\td\win8\shell\86bea9f8-d2af-457b-8a54-c017ae1b8364\platforms\ios']
errno: 34,
code: 'ENOENT',
path: 'C:\\cb\\td\\win8\\shell\\86bea9f8-d2af-457b-8a54-c017ae1b8364\\platforms\\ios' }
------------------------------
cordova-media-generator
------------------------------
Generating 85 images so you don't have to
------------------------------
Args: fff icon.png [email protected] ios/undefined/Resources/icons
Args: fff icon.png icon-40.png ios/undefined/Resources/icons
Args: fff icon.png [email protected] ios/undefined/Resources/icons
Args: fff icon.png icon-50.png ios/undefined/Resources/icons
Args: fff icon.png [email protected] ios/undefined/Resources/icons
Args: fff icon.png icon-60.png ios/undefined/Resources/icons
Args: fff icon.png icon-72.png ios/undefined/Resources/icons
Args: fff icon.png [email protected] ios/undefined/Resources/icons
Args: fff icon.png icon-76.png ios/undefined/Resources/icons
Args: fff icon.png [email protected] ios/undefined/Resources/icons
Args: fff icon.png icon-small.png ios/undefined/Resources/icons
Args: fff icon.png [email protected] ios/undefined/Resources/icons
Args: fff icon.png icon.png ios/undefined/Resources/icons
Args: fff icon.png [email protected] ios/undefined/Resources/icons
Args: fff splash.png Default-568h@2x~iphone.png ios/undefined/Resources/splash
Args: fff splash.png Default-Landscape@2x~ipad.png ios/undefined/Resources/splash
Args: fff splash.png Default-Landscape~ipad.png ios/undefined/Resources/splash
Args: fff splash.png Default-Portrait@2x~ipad.png ios/undefined/Resources/splash
Args: fff splash.png Default-Portrait~ipad.png ios/undefined/Resources/splash
Args: fff splash.png Default@2x~iphone.png ios/undefined/Resources/splash
Args: fff splash.png Default~iphone.png ios/undefined/Resources/splash
Args: fff icon.png icon.png android/res/drawable
Args: fff icon.png icon.png android/res/drawable-hdpi
Args: fff splash.png screen.png android/res/drawable-land-hdpi
Args: fff splash.png screen.png android/res/drawable-land-ldpi
Args: fff splash.png screen.png android/res/drawable-land-mdpi
Args: fff splash.png screen.png android/res/drawable-land-xhdpi
Args: fff icon.png icon.png android/res/drawable-ldpi
Args: fff icon.png icon.png android/res/drawable-mdpi
Installed mediagen by running npm install -g mediagen
I get this error when I run mediagen
in my phonegap project folder.
GM Error [Error: Could not execute GraphicsMagick/ImageMagick: gm "identify" "-ping"
"-format" "%wx%h" "file.png" this most likely means the gm/convert binaries can't be
found]
Even though I have identify and convert binaries installed, I went ahead and installed GM module with npm install -g gm
, but still this error won't go away.
Images are created in platforms/ios/NAME/Resources/icons and platforms/ios/NAME/Resources/spash.
New XCode needs images in platforms/ios/NAME/Images.xcassets/AppIcon.appiconset and platforms/ios/NAME/Images.xcassets/LaunchImage.launchimage
Also some image sizes are not needed anymore (icon-40@3x, icon-60) but other sizes are needed now (icon-83.5@2x).
Here is what i see in my terminal:
$ npm install -g cordova-media-generator
npm WARN deprecated [email protected]: v1 is no longer maintained, please upgrade to v2.0+ as soon possible.
npm WARN deprecated [email protected]: use cross-spawn or cross-spawn-async instead.
/usr/local/bin/mediagen -> /usr/local/lib/node_modules/cordova-media-generator/media-gen.js
[email protected] install /usr/local/lib/node_modules/cordova-media-generator/node_modules/dnode/node_modules/weak
node-gyp rebuild
CXX(target) Release/obj.target/weakref/src/weakref.o
SOLINK_MODULE(target) Release/weakref.node
[email protected] install /usr/local/lib/node_modules/cordova-media-generator/node_modules/weak
node-gyp rebuild
CXX(target) Release/obj.target/weakref/src/weakref.o
In file included from ../src/weakref.cc:19:
In file included from ../node_modules/nan/nan.h:74:
In file included from ../node_modules/nan/nan_new.h:181:
../node_modules/nan/nan_implementation_12_inl.h:172:66: error: too many arguments to function call, expected at most 2, have 4
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~
/Users/rogovm/.node-gyp/6.2.2/include/node/v8.h:4798:3: note: 'New' declared here
static Local New(
^
In file included from ../src/weakref.cc:19:
../node_modules/nan/nan.h:165:25: error: redefinition of '_NanEnsureLocal'
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:160:25: note: previous definition is here
NAN_INLINE v8::Local _NanEnsureLocal(v8::Handle val) {
^
../node_modules/nan/nan.h:253:12: error: no matching function for call to '_NanEnsureLocal'
return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:239:43: note: expanded from macro 'NanEscapeScope'
^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:165:25: note: candidate template ignored: substitution failure [with T = v8::Primitive]
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:258:12: error: no matching function for call to '_NanEnsureLocal'
return NanEscapeScope(NanNew(v8::Null(v8::Isolate::GetCurrent())));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:239:43: note: expanded from macro 'NanEscapeScope'
^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:165:25: note: candidate template ignored: substitution failure [with T = v8::Primitive]
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:263:12: error: no matching function for call to '_NanEnsureLocal'
return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:239:43: note: expanded from macro 'NanEscapeScope'
^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:165:25: note: candidate template ignored: substitution failure [with T = v8::Boolean]
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:268:12: error: no matching function for call to '_NanEnsureLocal'
return NanEscapeScope(NanNew(v8::False(v8::Isolate::GetCurrent())));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:239:43: note: expanded from macro 'NanEscapeScope'
^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:165:25: note: candidate template ignored: substitution failure [with T = v8::Boolean]
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:312:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:318:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback) {
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:323:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
v8::Isolate::GCPrologueCallback callback
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:329:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
v8::Isolate::GCPrologueCallback callback) {
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:500:13: error: no member named 'smalloc' in namespace 'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../node_modules/nan/nan.h:511:12: error: no matching function for call to 'New'
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^~~~~~~~~~~~~~~~~
/Users/rogovm/.node-gyp/6.2.2/include/node/node_buffer.h:46:40: note: candidate function not viable: 2nd argument ('const char ')
would lose const qualifier
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate,
^
/Users/rogovm/.node-gyp/6.2.2/include/node/node_buffer.h:34:40: note: candidate function not viable: no known conversion from
'const char ' to 'v8::Localv8::String' for 2nd argument
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate,
^
/Users/rogovm/.node-gyp/6.2.2/include/node/node_buffer.h:31:40: note: candidate function not viable: requires 2 arguments, but 3 were
provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate, size_t length);
^
/Users/rogovm/.node-gyp/6.2.2/include/node/node_buffer.h:39:40: note: candidate function not viable: requires 5 arguments, but 3 were
provided
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
In file included from ../src/weakref.cc:19:
../node_modules/nan/nan.h:515:12: error: no viable conversion from returned value of type 'v8::MaybeLocalv8::Object' to function
return type 'v8::Localv8::Object'
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rogovm/.node-gyp/6.2.2/include/node/v8.h:216:7: note: candidate constructor (the implicit copy constructor) not viable: no
known conversion from 'v8::MaybeLocalv8::Object' to 'const v8::Localv8::Object &' for 1st argument
class Local {
^
/Users/rogovm/.node-gyp/6.2.2/include/node/v8.h:216:7: note: candidate constructor (the implicit move constructor) not viable: no
known conversion from 'v8::MaybeLocalv8::Object' to 'v8::Localv8::Object &&' for 1st argument
/Users/rogovm/.node-gyp/6.2.2/include/node/v8.h:220:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
V8_INLINE Local(Local that)
^
In file included from ../src/weakref.cc:19:
../node_modules/nan/nan.h:522:26: error: no member named 'Use' in namespace 'node::Buffer'
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
~~~~~~~~~~~~~~^
../node_modules/nan/nan.h:1339:12: error: no matching function for call to '_NanEnsureLocal'
return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:239:43: note: expanded from macro 'NanEscapeScope'
^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:165:25: note: candidate template ignored: substitution failure [with T = v8::Function]
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:1354:12: error: no matching function for call to '_NanEnsureLocal'
return NanEscapeScope(node::MakeCallback(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:239:43: note: expanded from macro 'NanEscapeScope'
^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:165:25: note: candidate template ignored: substitution failure [with T = v8::Value]
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../node_modules/nan/nan.h:1427:12: error: no matching function for call to '_NanEnsureLocal'
return NanEscapeScope(handle->Get(NanNew(key)).Asv8::Object());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:239:43: note: expanded from macro 'NanEscapeScope'
^~~~~~~~~~~~~~~
../node_modules/nan/nan.h:165:25: note: candidate template ignored: substitution failure [with T = v8::Object]
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
17 errors generated.
make: *** [Release/obj.target/weakref/src/weakref.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 15.4.0
gyp ERR! command "/usr/local/Cellar/node/5.7.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/cordova-media-generator/node_modules/weak
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
/usr/local/lib
└── (empty)
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/Cellar/node/5.7.0/bin/node" "/usr/local/bin/npm" "install" "-g" "cordova-media-generator"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the weak package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs weak
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls weak
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/rogovm/Projects/reverse/npm-debug.log
npm ERR! code 1
Would be great if the project could support xxxhdpi icons :)
Hi!
I was getting a (usual) strange error from node, with a lot of details like spawn EACCESS
when trying to generate set of icons for the app. I had both GM and imagemagick, so that was not the case.
The stack suggested that it was about the Phantom, so once I've installed it, things gone better.
Probably worth adding that to the readme.md
just in case? Or make it optional?
Cheers,
Alex.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.