undefined var in gulpfile
gangstaJS opened this issue · comments
undefined var in gulpfile http://screenshot.su/show.php?img=a67972439d20ed11c606040d840d0197.jpg / How fix it?
Are you using Windows? if yes try to change the var in this line to point to the exe of flex sdk instead
https://github.com/MailOnline/VPAIDFLASHClient/blob/master/gulpfile.js#L25
if doesn't work then try to console.log the argument filePath
in line:
https://github.com/MailOnline/VPAIDFLASHClient/blob/master/gulpfile.js#L97
so I can help you to debug
I tried to enter the path directly
{
templateData: {
fileOutput: function (filePath) {
return files[0].fileOutputPath;
// return _.find(files, function(file) {
// return filePath.indexOf(file.path) > -1;
// }).fileOutputPath;
},
mxmlc: flexSDK,
srcPath: flashSrcPath,
flashVersion: '10.1.0'
}
}
Then gulp output
[12:06:02] Error in plugin 'gulp-shell'
Message:
Command `./vendor/bin/mxmlc.exe -output ./bin/VPAIDFlash.swf D:\projects\VPAIDFLASHClient\flash\src\com\dailymail\vp
aid\VPAIDFlash.as -compiler.source-path flash/src -target-player=10.1.0` failed with exit code 1
Then I tried to enter directly:
./vendor/bin/mxmlc.exe -output ./bin/VPAIDFlash.swf D:\projects\VPAIDFLASHClient\flash\src\com\dailymail\vpaid\VPAIDFlash.as -compiler.source-path flash/src -target-player=10.1.0
Compiler output:
Error loading: C:\Program Files\Java\jdk1.7.0_60\jre\bin\server\jvm.dll
I solved this problem by adjusting jvm.сonfig file, appending to it
java.home = C: / Program Files (x86) / Java / jre7
Then I tried again to enter the command:
./vendor/bin/mxmlc.exe -output ./bin/VPAIDFlash.swf D:\projects\VPAIDFLASHClient\flash\src\com\dailymail\vpaid\VPAIDFlash.as -compiler.source-path flash/src -target-player=10.1.0
Compiler output:
command line: Error: unknown configuration variable 'compiler'
How to solve this problem with mxmlc?
Try this:
./vendor/bin/mxmlc.exe -output ./bin/VPAIDFlash.swf D:\projects\VPAIDFLASHClient\flash\src\com\dailymail\vpaid\VPAIDFlash.as -source-path flash/src -target-player=10.1.0
If doesn't work try this: (I got issues with flexsdk not supporting 64 bit, so maybe that is the issue)
java.home=C:/Program Files (x86)/Java/jre6
If still is a no, try to check a newer version of flexsdk (you will probably need to change the -target-player
to a newer version)
If you manage to make it working in Windows, please share, so I can update the script
If you still have issue please open again