You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, August 19th 2011, 3:35pm

Standalone Exe - Problem with resolving paths when loading panos dynamically

If I try to convert a functioning tour into a standalone Exe with kprotect, i get a fatal error as big line in the middle of the screen, after starting the generated Exe, in my case saying:

"FATAL: scene1/scene1.xml - loading error (IO Error)".

The crazy thing is that the tour is OK, the loading has happened - only the error message stays permanently.

I have a complicated folder structure - separating common parts and tour dependant parts, with the panoramas of a tour in separate subfolders sceneX. But my problem can be stripped down to the following files:

<swfdir>/proj/Test1/test.xml (the Startup XML)
<swfdir>/proj/Test1/scene1/scene1.xml
<swfdir>/skin/common.xml
<swfdir>/proj/Test1/test.html (the Startup HTML)

I'm working under Windows Vista with the latest beta (krpano.swf 1.0.8.14, build 2011-05-20) and "krpano Protect Tool.exe" from 2011-04-11. The Placeholder paths are set, with BASEDIR to "<swfdir>/proj/Test1"

The files:

<swfdir>/proj/Test1/test.xml:

Source code

1
2
3
<krpano version="1.0.8" onstart="new_pano(scene1);"> 
<include url="%SWFPATH%/skin/common.xml" /> 
</krpano>


<swfdir>/proj/Test1/scene1/scene1.xml:

Source code

1
2
3
<krpano version="1.0.8" onstart="showlog(true);trace('scene1 working');" > 
<preview type="grid(cube,16,16,512);" /> 
</krpano>


<swfdir>/skin/common.xml:

Source code

1
2
3
4
5
6
<krpano version="1.0.8" > 
<action name="new_pano"> 
<!-- loadpano(%HTMLPATH%/%1/%1.xml); --> 
loadpano(%_BASEDIR%/%1/%1.xml); 
</action> 
</krpano>

(I couldn't enter BASEDIR correct in the forum editor)


<swfdir>/proj/Test1/test.html:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<html> 
<head> 
<title>KRPano Protect Problem</title> 
<style> html { height:100%; } body { height:100%; } </style> 
</head> 
<body> 
<div id="krpanoDIV" style="width:100%;height:100%;"> </div> 
<script src="../../swfkrpano.js"></script> 
<script> 
var viewer = createPanoViewer({swf:"../../krpano.swf", id:"krpanoSWFObject", target:"krpanoDIV"}); 
viewer.addVariable("xml", "Test.xml"); 
viewer.embed(); 
</script> 
</body> 
</html>


If kprotect loads and resolves Test.xml, it shows an error in red: "../Test1/%1%1.xml" not found.

I had to add "scene1/scene1.xml" to the embedded Xml files manually, because it is loaded dynamically.

Another distyturbing thing is: if i substitute BASEDIR in common.xml with HTMLPATH, the loading doesn't happen - only the error message is shown.