Hi, please I need some help here, I'm pulling my hair off because I can't proced with my development if I can't fix this.
I have my perpetual license and I can't make any demo or example to work!
Am I missing something? I just added my licence in the StarforceTD.def file as the readme explains: "If you are using the ShippingMobile player, add the path to your key (Bin/sf_consumer_license_android_mobile.txt) to the “RESOURCES” section of your project’s “def” file"
But the black screen reading ""Failed to open the license file. Please see the readme for licensing instructions. Error: 101" is the only thing I see.
Why is that? Is there anything else I have to do?
Who can I email to ask if nobody here knows?
Thanks
Here is my StarforceTD.def file:
# This file defines an app based on FxShippingPlayer. The files that normally need to be changed # will go in a directory named after this file in LocalApps. Each supported mobile platform will # have its own icons and manifest. The Flash content and other resources are shared. # # Run make for the desired platforms once to setup the app. # # On Android, build the app by running make after making your changes. # On iOS, an Xcode project will be created. Use this project to build and deploy the app; make does not # actually build these apps. # The display name of your app (visible to users) DISPLAY_NAME := Starforce TD # The package prefix. Often a reverse URL. # If the package prefix is com.scaleform, then the # Android package will be: com.scaleform.<APP_NAME> # Android main activity will be: com.scaleform.<APP_NAME>.MainActivity PACKAGE := com.test # The Flash file to load at startup. This will be copied to flash.swf in this App's development # directory (only during setup for iOS). STARTUP_FLASH := Bin/Data/AS3/Kits/StarforceTD/StarforceTD.swf # Other files needed by the app (extra swfs, image files, etc.) # If the file list is too long for one line, you can put a backslash, followed immediately by a return (newline) # List every individual file explicitly or include an entire directory by listing it with no trailing slash RESOURCES := Bin/Data/AS3/Kits/StarforceTD/StarforceMenu.swf \ Bin/Data/AS3/Kits/StarforceTD/LoadingView.swf \ Bin/Data/AS3/Kits/StarforceTD/gameware_logo.swf \ Bin/sf_consumer_license_android_mobile.txt \ Bin/Data/AS3/Kits/StarforceTD/audio \ Bin/Data/AS3/Kits/StarforceTD/conf # List the orientations that the app will use. If only one is specified then the user cannot # rotate the app. If none are specified then the behavior is arbitrary (normally based on sensor). # If more than one is specified some platforms may allow any supported orientation, not just those in the list. #ORIENTATIONS := portrait landscape reversePortrait reverseLandscape ORIENTATIONS := landscape # EdgeAA (0: off; 1: on) EDGEAA := 1 # Enable to avoid clearing the screen each frame (0: clear, 1: don't clear). Useful in # cases where the SWF's backdrop is completely opaque and covers the entire screen, as # in such a case, clearing the screen at the beginning of each frame is redundant. NO_CLEAR := 0 # # Online Game System (GameKit: Use Game Center; blank: Don't Use Game Center) ONLINE_GAME_SYSTEM := # FMOD Sound support USE_FMOD := 1 # # Android Deployment # Uncomment to automatically install on all connected devices (only when something was just built) # AUTODEPLOY := 1 # Uncomment to automatically launch the app after installing # AUTORUN := 1
Not sure about for Android, but for iOS we edited the bottom of Src/Platform/Platform_IPhone_GL.mm:
void GFx_SetEvalKey(const char* key); int main(int argc, char *argv[]) { signal(SIGPIPE, SIG_IGN); // FOR EVAL/CONSUMER CUSTOMERS ONLY: The eval/consumer key must be set before the // loader is initialized. GFx_SetEvalKey("OurKeyHere"); NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; }
Documentation is all over the place on how to actually set your key, but this worked for us. Good luck!
In Src/Platform/Platform_Android.h I see a line that makes a call to GFx_SetEvalKey on line 204. Should give that a shot.
Huge thanks to you FrankFloor84. It's working now.
BUT...
1- I can't understand why it's not working the other way (License in resources)
2- I can't believe the readme is WRONG, no one reads it before publishing??
3- My key is not an Eval key, is a Perpetual one, isn't there other function rather than GFx_SetEvalKey (I'm asking because its name suggests EVALUATION)
Thanks again
The comment above it about eval/consumer customers only was there before, so I assume it's just a poorly named function. We actually have a few Scaleform apps published this way with a perpetual (consumer) key and they are doing fine for over a month.
Hello,
I'm not too familiar with the Android mobile sdk, but adding this to resources makes it compile as part of the APK. It looks as if the sdcard is the location which is checked for the license. So you should be able to work around that by pushing it to the device.
adb push Bin/sf_consumer_license_android_mobile.txt /sdcard
EDIT:
Whoops, that's what happens when I get side-tracked composing a message. Thanks for the fix, Frank!
I'm having a similar issue "Failed to open the license file" on iOS.
I've got a an sf_consumer_license.txt for Android at Scaleform/Bin/PC_Tools/sf_consumer_license.txt working fine for android.
I've added necessary keys to Bin/Mac_Tools/sf_consumer_license.txt but no luck. I'm registering the keys in MyCamera.
I'm seeing conflicting license file names when addressing this in the forums:
sf_consumer_license_android_unity.txt vs sf_consumer_license.txt as noted in the readme
Which is it? Do I need a file named sf_consumer_license_ios.txt?
I see a fix by editing Src/Platform/Platform_IPhone_GL.mm, but I don't know where that's located.
Maybe an updated readme noting "known" issues (things like RTTs don't work after app switching on mobile, so don't waste time with them) would be a good idea?
Thanks again!
On my mac it's at Macintosh HD/Users/frank/scaleform_4.2.24_iphone_consumer/Src/Platform/Platform_IPhone_GL.mm. Also, I believe that the file is actually added to your Xcode project by default if I remember correctly. The very bottom of my file looks like this:
void GFx_SetEvalKey(const char* key); int main(int argc, char *argv[]) { signal(SIGPIPE, SIG_IGN); // FOR EVAL/CONSUMER CUSTOMERS ONLY: The eval/consumer key must be set before the // loader is initialized. GFx_SetEvalKey("PUT_YOUR_LICENSE_KEY_HERE"); NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; }
Also what are the RTT's that you are referring to?
Frank,
I dont have this file or folder on my HD
/scaleform_4.2.24_iphone_consumer/Src/Platform/Platform_IPhone_GL.mm
Can someone from Autodesk give some hints?