ShiVa3D
Plugin signing + Web player plugin
ShiVa Plugin DevelopmentPlugin signing + Web player plugin
by eragon » 20 Sep 2011, 09:57
Hi all,
I have problems signing my custom plugin. I have bought the Verisign certificate,
export it as Base-64-encoded X.509 from the internet explorer, and convert the .cer file
to .pem file through the openssl, using this command,
" openssl x509 -in mycert.cer -outform PEM -out mycert.pem "
But when I try to sign my plugin using the "test method" the plugin has been successfully exported, any idea what steps I'm missing out here?
Another question is, I tried to create an internet application, using the .stk file that I've been successfully exported using the signed plugin(test method), the program did work when I tested it in my browser but unfortunately, the methods that I have been created in my plugin did not work/execute. I included the required dlls to the contents folder, but no luck. Any ideas what are the steps that I've missed out? Thanks
I have problems signing my custom plugin. I have bought the Verisign certificate,
export it as Base-64-encoded X.509 from the internet explorer, and convert the .cer file
to .pem file through the openssl, using this command,
" openssl x509 -in mycert.cer -outform PEM -out mycert.pem "
But when I try to sign my plugin using the "test method" the plugin has been successfully exported, any idea what steps I'm missing out here?
Another question is, I tried to create an internet application, using the .stk file that I've been successfully exported using the signed plugin(test method), the program did work when I tested it in my browser but unfortunately, the methods that I have been created in my plugin did not work/execute. I included the required dlls to the contents folder, but no luck. Any ideas what are the steps that I've missed out? Thanks
- eragon
- Fresh Boarder

- Posts: 9
Re: Plugin signing + Web player plugin
by Yopia » 20 Sep 2011, 12:30
Hi,
To create the pem file use the following command :
openssl.exe pkcs12 -in [the .pfx file] -nocerts -nodes -out [the .pem file]
Check in the log reporter if you have any warning or error while the export process.
Verisign certification has recently changed so, for now, you will have to use the beta webplayer using stkobject_beta.js instead of stkobject.js or use the uat 1.2 for standalone players.
To create the pem file use the following command :
openssl.exe pkcs12 -in [the .pfx file] -nocerts -nodes -out [the .pem file]
Check in the log reporter if you have any warning or error while the export process.
Verisign certification has recently changed so, for now, you will have to use the beta webplayer using stkobject_beta.js instead of stkobject.js or use the uat 1.2 for standalone players.
-

Yopia - Platinum Boarder

- Posts: 625
Re: Plugin signing + Web player plugin
by eragon » 20 Sep 2011, 14:08
Hey I solved the plugin signing problem already
Thank you so much for your valuable and fast reply, but problem number 2 still persist, am using stkobject_beta.js now.
Basically what I intended to do is an AR plugin, I have lots of opencv dlls that need to be included into the project, as well as a couple of marker image, but it seem that the web player doesn't seem to load them up, any guides will be very very appreciated, thanks
Basically what I intended to do is an AR plugin, I have lots of opencv dlls that need to be included into the project, as well as a couple of marker image, but it seem that the web player doesn't seem to load them up, any guides will be very very appreciated, thanks
- eragon
- Fresh Boarder

- Posts: 9
Re: Plugin signing + Web player plugin
by NiCoX » 20 Sep 2011, 14:37
Hi,
This tool may help identifying the missing DLLs if any:
http://www.dependencywalker.com/
Also, assuming the DLLs are loaded correctly, you have to use the plugin's GetContentsDirectory method to get the right path to the markers.
This tool may help identifying the missing DLLs if any:
http://www.dependencywalker.com/
Also, assuming the DLLs are loaded correctly, you have to use the plugin's GetContentsDirectory method to get the right path to the markers.
-

NiCoX - Platinum Boarder

- Posts: 5626
- Location: France
Re: Plugin signing + Web player plugin
by eragon » 20 Sep 2011, 14:59
Hi,
Thanks, but I'm sorry, I try to find the GetsContentPackage in the native code
side, but I couldn't found one, anything that I missed out? Thanks
Thanks, but I'm sorry, I try to find the GetsContentPackage in the native code
side, but I couldn't found one, anything that I missed out? Thanks
- eragon
- Fresh Boarder

- Posts: 9
Re: Plugin signing + Web player plugin
by NiCoX » 20 Sep 2011, 15:57
It should be a member of you plugin class. The one that inherits from S3DX::Plugin.
-

NiCoX - Platinum Boarder

- Posts: 5626
- Location: France
Re: Plugin signing + Web player plugin
by eragon » 20 Sep 2011, 17:04
Hi, sorry I should be more clear about this, yea, actually I did try to search
from the class of Plugin, attached is the print screen of it, weird is I found SetContentsDirectory but not GetContentsDirectory. By the way,
thanks for your patience on this
from the class of Plugin, attached is the print screen of it, weird is I found SetContentsDirectory but not GetContentsDirectory. By the way,
thanks for your patience on this
- test.png (4.6 KiB) Viewed 1318 times
- eragon
- Fresh Boarder

- Posts: 9
Re: Plugin signing + Web player plugin
by NiCoX » 20 Sep 2011, 22:59
Ok maybe we added this in the 1.9.1... what version of ShiVa are you using?
Anyways, there is SetContentsDirectory in the S3DX::Plugin class, and GetContentsDirectory should have been added at plug-in creation time to your class that inherits from S3DX::Plugin. But it's a utility function, if you don't have it you can just implement SetContentsDirectory and store the string argument. This function will be called by the engine at plug-in initialization time, passing the right directory. So something like that:
Anyways, there is SetContentsDirectory in the S3DX::Plugin class, and GetContentsDirectory should have been added at plug-in creation time to your class that inherits from S3DX::Plugin. But it's a utility function, if you don't have it you can just implement SetContentsDirectory and store the string argument. This function will be called by the engine at plug-in initialization time, passing the right directory. So something like that:
- Code: Select all
// Declare a global variable to store the directory path
// Note: ok, globals are evil I know, it's just easier for the example ;)
//
char g_sMyPluginContentsDirectory [1024] = "" ;
// Implement the method:
//
void MyPlugin::SetContentsDirectory ( const char *_pDir )
{
strncpy ( g_sMyPluginContentsDirectory, 1023, pDir ) ;
g_sMyPluginContentsDirectory[1023] = ' ' ;
}
-

NiCoX - Platinum Boarder

- Posts: 5626
- Location: France
Re: Plugin signing + Web player plugin
by eragon » 21 Sep 2011, 08:03
Hi,
I'm using 1.9.0.1 version,
but, this is getting confuse, I am sorry as I'm quite new to shiVa 3D, 3 questions:-
1. I've created the plugin, and I try to export it to the PC version and the game is working and running flawlessly, but when I export the SAME game for the web version, the game did run, but just pure video capture, the processing which suppose to be done inside the plugin is not executing, hence my question is, will the game continue to execute in the web though there are errors occurs inside the plugin itself ?
2. Could the problems in the web version occurred because the program can't find the markers and it may solved by the SetContentsDirectory as we had discussed ?
3. Do I need to put all the DLLs to my server directory?
Thanks
I'm using 1.9.0.1 version,
but, this is getting confuse, I am sorry as I'm quite new to shiVa 3D, 3 questions:-
1. I've created the plugin, and I try to export it to the PC version and the game is working and running flawlessly, but when I export the SAME game for the web version, the game did run, but just pure video capture, the processing which suppose to be done inside the plugin is not executing, hence my question is, will the game continue to execute in the web though there are errors occurs inside the plugin itself ?
2. Could the problems in the web version occurred because the program can't find the markers and it may solved by the SetContentsDirectory as we had discussed ?
3. Do I need to put all the DLLs to my server directory?
Thanks
- eragon
- Fresh Boarder

- Posts: 9
Re: Plugin signing + Web player plugin
by NiCoX » 21 Sep 2011, 08:29
Hi,
1. Yes
2. Yes
3. No
But I think your are still having a signature problem...
1. what export profile are you using? (the DefaultExportProfile?)
2. are there any warnings at STK export time in the editor?
3. could you send us a test URL by PM so we can test and spot the problem?
1. Yes
2. Yes
3. No
But I think your are still having a signature problem...
1. what export profile are you using? (the DefaultExportProfile?)
2. are there any warnings at STK export time in the editor?
3. could you send us a test URL by PM so we can test and spot the problem?
-

NiCoX - Platinum Boarder

- Posts: 5626
- Location: France
Re: Plugin signing + Web player plugin
by eragon » 30 Sep 2011, 13:26
Hi guys,
Anyone can guide me on how to get the content from the cache ? I am doing an AR application, and I saw the template image been downloaded into client side cache folder, but for some reasons, it doesn't load the image. Earlier on I tried to set the content
directory using SetContentsDirectory, but still unable to locate the image. Any help is very much appreciated.
Anyone can guide me on how to get the content from the cache ? I am doing an AR application, and I saw the template image been downloaded into client side cache folder, but for some reasons, it doesn't load the image. Earlier on I tried to set the content
directory using SetContentsDirectory, but still unable to locate the image. Any help is very much appreciated.
- eragon
- Fresh Boarder

- Posts: 9
Re: Plugin signing + Web player plugin
by eragon » 10 Oct 2011, 04:32
Solved
Thanks to NiCox
For those who are interested, you can grab the content of your plugin by (assuming MyPlugin is your plugin name )
cheers
Thanks to NiCox
For those who are interested, you can grab the content of your plugin by (assuming MyPlugin is your plugin name )
- Code: Select all
char aMyFileFullPath [1024] ;
strcpy ( aMyFileFullPath, MyPlugin::GetInstance ( )->GetContentsDirectory ( ) ) ;
strcat ( aMyFileFullPath, "/MyFileName.ext" ) ;
cheers
- eragon
- Fresh Boarder

- Posts: 9
12 posts
• Page 1 of 1