<?xml version="1.0" encoding="ISO-8859-1"?>
<rdf:RDF
	xmlns="http://purl.org/rss/1.0/"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel rdf:about="http://feeds.garagegames.com/rss/blogs/developer/60581/">
		<title>Blog for Javier Canon at GarageGames.com</title>
		<description>Blog feeds for Gamers and Developers in the GarageGames community.</description>
		<link>http://www.garagegames.com/</link>
		<image rdf:resource="http://www.garagegames.com/images/GarageGames_logo_small_w.gif" />
		<dc:date>2008-11-21T09:52:42+00:00</dc:date>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://www.garagegames.com/blogs/60581/13710"/>
			</rdf:Seq>
		</items>
	</channel>
	<item rdf:about="http://www.garagegames.com/blogs/60581/13710">
		<dc:format>text/html</dc:format>
		<dc:date>2007-10-13T04:18:55+00:00</dc:date>
		<dc:creator>Javier Canon</dc:creator>
		<title>TGE embedded Web Browser</title>
		<link>http://www.garagegames.com/blogs/60581/13710</link>
		<description>This is my first contribution to this great community, some minor bugs need to be fixed...&lt;br&gt;&lt;br&gt;I am based in the work of:&lt;br&gt;&lt;a href='http://www.mmoworkshop.com/trac/mom/wiki/TGBBrowser' target=_blank&gt;www.mmoworkshop.com/trac/mom/wiki/TGBBrowser&lt;/a&gt;&lt;br&gt;&lt;a href='http://ubrowser.com/downloads.php' target=_blank&gt;ubrowser.com/downloads.php&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;You need:&lt;/b&gt;&lt;br&gt;&lt;br&gt;- Compile of mozilla with VC8 download link: &lt;a href='http://www.softcannon.com/llmozlibVC8_ver1.zip' target=_blank&gt;www.softcannon.com/llmozlibVC8_ver1.zip&lt;/a&gt;&lt;br&gt;- guibrowserctrl From &lt;a href='http://www.mmoworkshop.com/trac/mom/wiki/TGBBrowser' target=_blank&gt;www.mmoworkshop.com/trac/mom/wiki/TGBBrowser&lt;/a&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------&lt;br&gt;&lt;br&gt;&lt;b&gt;The instructions for VS 2005 -VC8: &lt;/b&gt;&lt;br&gt;&lt;br&gt;1. Copy llmozlib to your engine/lib folder&lt;br&gt;&lt;br&gt;2. Make a folder called &amp;quot;browser&amp;quot; in your engine/source/gui folder and copy guiBrowserCtrl.h and guiBrowserCtrl.cc into it&lt;br&gt;&lt;br&gt;3. Open up engine/compilers/VisualStudio.net/TGE SDK.sln in Visual Studio .NET 2005&lt;br&gt;&lt;br&gt;4. Add a &amp;quot;browser&amp;quot; folder to the TGE project under Source Files/gui, then add the guiBrowserCtrl.h and guiBrowserCtrl.cc to this folder. (from http://www.mmoworkshop.com/trac/mom/wiki/TGBBrowser )&lt;br&gt;&lt;br&gt;5. Select the Release build of TGE as the active project&lt;br&gt;&lt;br&gt;6. Open the Properties for the TGE project&lt;br&gt;&lt;br&gt;7. Navigate to C++ -&amp;gt; General and add ../../lib/llmozlib/include to Additional Include Directories&lt;br&gt;&lt;br&gt;8. Navigate to C++ -&amp;gt; Preprocessor and add TORQUE_DISABLE_MEMORY_MANAGER to Preprocessor Definitions (see notes in source about this)&lt;br&gt;&lt;br&gt;9. Navigate to Linker-&amp;gt;General and add ../../lib/llmozlib/win32 to Additional Library Directories&lt;br&gt;&lt;br&gt;10. Navigate to Linker-&amp;gt;Input and add llmozlib.lib to Additional Dependencies&lt;br&gt;&lt;br&gt;11. In engine/source/platformWin32/winMemory.cc comment out:&lt;br&gt;&lt;br&gt;/* void* FN_CDECL operator new(dsize_t, void* ptr) {&lt;br&gt;&lt;br&gt;return (ptr);&lt;br&gt;&lt;br&gt;} */&lt;br&gt;&lt;br&gt;12. In engine/source/platform.h make this change:&lt;br&gt;&lt;br&gt;//extern void* FN_CDECL operator new(dsize_t size, void* ptr);&lt;br&gt;#include &amp;lt;new&amp;gt;&lt;br&gt;&lt;br&gt;13. For each project in the TGE SDK solution, change to use Multithreaded DLL Runtime Libraries ( Properties-&amp;gt;C/C++-&amp;gt;Code Generation-&amp;gt;Runtime Library-&amp;gt;Multi-threaded DLL):&lt;br&gt;projects:  zlib, lpng, ljpg, lungif, opengl2d3d, glu2d2d, and your game...&lt;br&gt;&lt;br&gt;&lt;br&gt;14. Clean and then build the TGE project&lt;br&gt;&lt;br&gt;15. Open games/main.cs and add the below to the onStart and onExit functions:&lt;br&gt;&lt;br&gt;function onStart() {&lt;br&gt;&lt;br&gt;initEmbeddedBrowser(&amp;quot;WebBrowser&amp;quot;);&lt;br&gt;&lt;br&gt;}&lt;br&gt;&lt;br&gt;function onExit() {&lt;br&gt;&lt;br&gt;shutdownEmbeddedBrowser();&lt;br&gt;&lt;br&gt;}&lt;br&gt;&lt;br&gt;16. Append to GUI:&lt;br&gt;&lt;br&gt;   new GuiBrowserCtrl(WebBrowser) {&lt;br&gt;      canSaveDynamicFields = &amp;quot;0&amp;quot;;&lt;br&gt;      Profile = &amp;quot;GuiDefaultProfile&amp;quot;;&lt;br&gt;      HorizSizing = &amp;quot;center&amp;quot;;&lt;br&gt;      VertSizing = &amp;quot;center&amp;quot;;&lt;br&gt;      Position = &amp;quot;94 75&amp;quot;;&lt;br&gt;      Extent = &amp;quot;600 400&amp;quot;;&lt;br&gt;      MinExtent = &amp;quot;600 400&amp;quot;;&lt;br&gt;      canSave = &amp;quot;1&amp;quot;;&lt;br&gt;      Visible = &amp;quot;1&amp;quot;;&lt;br&gt;      hovertime = &amp;quot;1000&amp;quot;;&lt;br&gt;      defaultWebPage = &amp;quot;http://www.garagegames.com&amp;quot;;&lt;br&gt;   };&lt;br&gt;&lt;br&gt;17. Copy the mozilla &amp;quot;runtime folder&amp;quot; to your game (dlls and subfolders)&lt;br&gt;&lt;br&gt;18. If you dont have VS 2005 SP1 (better install it...) and you get the error when try to run your game.exe &amp;quot;the app is not configurate correctly&amp;quot;:&lt;br&gt;&lt;br&gt;&lt;br&gt;            18.1. include vcredist_x86.exe (or vcredist_IA64.exe or vcredist_x64.exe, depending on what your application is built for) in your application package, so when the user installs your product this will be installed too;&lt;br&gt;&lt;br&gt;            18.2. in the main project of your VC++ 2005 Express application solution make sure you select &amp;quot;Properties &amp;gt; Configuration Properties &amp;gt; Manifest Tool &amp;gt; Input and Output &amp;gt; Embed Manifest &amp;gt; NO&amp;quot; so that the manifest is not included in the output file, but as separate file so you can edit it; it will look something like &amp;quot;game.exe.manifest&amp;quot;;&lt;br&gt;&lt;br&gt;             18.3. now in most cases the source of this stupid error is that the version of the msvcr80.dll deployed by the vcredist_x86.exe is 8.00.50727.42 while the version required by your application through that manifest is bigger than that (mine was 8.00.50727.762) - when you install VC++ 2005 Express on your system you get the latest msvcr80.dll but it seems that vcredist_x86.exe has not been updated anymore so you have to use the older version instead (8.00.50727.42), by editing that manifest (with Notepad or something);&lt;br&gt;&lt;br&gt;              18.4. next make sure you don't forget to include the manifest file in your application package or it will spit out an error like &amp;quot;msvcr80.dll not found&amp;quot; even if vcredist_x86.exe was installed on that system...&lt;br&gt;------------------------------------------------------------------------&lt;br&gt;&lt;br&gt;&lt;img src='http://www.dark-wind.com/images/gg/ibrowser.jpg'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;img src='http://www.prairiegames.com/tgb_pro_guibrowserctrl.jpg'  alt=&quot;&quot;&gt;</description>
	</item>
</rdf:RDF>
