Hi Tomeu,<div><br></div><div>Thanks for the help, I am able to run FoodForce2 on Soas as well on XO, and I would be making an XO package on this weekend.</div><div><br clear="all">Regards,<br>Mohit Taneja<br>
<br><br><div class="gmail_quote">On Fri, Oct 23, 2009 at 2:53 PM, Tomeu Vizoso <span dir="ltr">&lt;<a href="mailto:tomeu@sugarlabs.org">tomeu@sugarlabs.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On Wed, Oct 21, 2009 at 16:41, Mohit Taneja &lt;<a href="mailto:mohitgenii@gmail.com">mohitgenii@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
</div><div class="im">&gt; I tried running the game on someone else&#39;s laptop using Soas. The problem regarding the graphics was solved but still it is not able to detect if it is running on sugar environment or not?<br>


&gt;<br>
&gt; @ bobby: if not olpcgames.ACTIVITY check is failing it should be able to read olpcgames.ACTIVITY, but it isnt able to do that. Any help regarding how to figure out  the platform will be really helpful.<br>
<br>
</div>Hi Mohit,<br>
<br>
if you want to know whether you are running inside Sugar or not, as<br>
opposed to Sugar being installed or not, I think it&#39;s better that you<br>
check fr the existence of one of these environment variables:<br>
<br>
<a href="http://wiki.laptop.org/go/Low-level_Activity_API#Environment_Variables" target="_blank">http://wiki.laptop.org/go/Low-level_Activity_API#Environment_Variables</a><br>
<br>
Regards,<br>
<br>
Tomeu<br>
<div><div></div><div class="h5"><br>
<br>
&gt; Regards,<br>
&gt; Mohit Taneja<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Oct 21, 2009 at 1:31 AM, Bobby Powers &lt;<a href="mailto:bobbypowers@gmail.com">bobbypowers@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; do you know which statement is failing in that try statement?  is it the import olpcgames, import olpcgames.util, or the olpcgames.ACTIVITY access?<br>
&gt;&gt;<br>
&gt;&gt; bobby<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Oct 20, 2009 at 1:38 PM, Mohit Taneja &lt;<a href="mailto:mohitgenii@gmail.com">mohitgenii@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; One more issue which i figured out after a little more debugging is that the check for Sugar platform is also failing on Soas. I am using the following check on Soas:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; #Flag to check the operating system<br>
&gt;&gt;&gt; FLAG_XO = False<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; try:<br>
&gt;&gt;&gt;    import olpcgames, olpcgames.util<br>
&gt;&gt;&gt;    if not olpcgames.ACTIVITY: raise RuntimeError<br>
&gt;&gt;&gt;    FLAG_XO = True<br>
&gt;&gt;&gt; except (RuntimeError,ImportError):<br>
&gt;&gt;&gt;     FLAG_XO = False<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The same check is working fine on XO1.<br>
&gt;&gt;&gt; Regards,<br>
&gt;&gt;&gt; Mohit Taneja<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Tue, Oct 20, 2009 at 8:25 PM, Mohit Taneja &lt;<a href="mailto:mohitgenii@gmail.com">mohitgenii@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I tried running FoodForce2 on Soas. The game ran fine, but there were some issues regarding the display of the game, it was too much distorted.<br>
&gt;&gt;&gt;&gt; Later I noticed that Soas comes with python 2.6, but I have done most of the development on python 2.5.4. I ran the game through terminal directly from the code itself and the following log was generated:<br>


&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; /usr/lib/python2.6/site-packages/sugar/util.py:25: DeprecationWarning: the sha module is deprecated; use the hashlib module instead<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; import sha<br>
&gt;&gt;&gt;&gt;&gt; ALSA lib pulse.c:272:(pulse_connect) PulseAudio: Unable to connect: Connection refused<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Any ideas about what could be possible reason for the error?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Regards,<br>
&gt;&gt;&gt;&gt; Mohit Taneja<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Sugar-devel mailing list<br>
&gt;&gt;&gt; <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
&gt;&gt;&gt; <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Sugar-devel mailing list<br>
&gt; <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
&gt; <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
&gt;<br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
«Sugar Labs is anyone who participates in improving and using Sugar.<br>
What Sugar Labs does is determined by the participants.» - David<br>
Farning<br>
</font></blockquote></div><br></div>