[Sugar-devel] Query regarding development setup for sugar activiities

Srevin Saju srevinsaju at sugarlabs.org
Mon Jun 8 13:33:11 EDT 2020


Hello Tushar,

Great to hear you have setup the development environment

To port stick-hero-activity, you may follow these steps if you are not 
using a VM. These steps are pretty simple, (there might be other 
methods, but if you are beginning development, you may prefer this method)

* Clone a local copy of stick-hero-activity: `git clone 
https://github.com/sugarlabs/stick-hero-activity`

* Create a `branch` so that you can revert any time, in case you make a 
mistake, and also reviews would be easier, and your patch could get 
merged faster. `git branch tushar-fixes`

* Checkout the branch : `git checkout tushar-fixes`

* Now, there are many different ways to do this step, i.e setting it up 
for development, but I prefer this: `python setup.py dev`, or `python3 
setup.py dev`; In case you are porting it to python3, port the setup.py 
first so that you can test it. This will create 'symlinks' to the 
'~/Activities' folder, so if you make changes to the cloned activity, 
then your changes will get reflected (almost) immediately

* Log out your system, Log In to sugar: see 
https://github.com/sugarlabs/sugar-docs/blob/master/src/sugar-logging-in.md

* You are likely to see your activity in the spiral view. (do not see it?)

* You can check the logs your activity produces using the Log.Activity 
(https://github.com/sugarlabs/log-activity)  , alternatively, use the 
Terminal Activity (https://github.com/sugarlabs/terminal-activity), 
change your directory to `~/Activities/StickHero.Activity` and then run 
`sugar-activity3`, this will launch your activity. After you close your 
activity, you can see the logs in the Terminal itself.

Hope I did not complicate things. if you have any more questions, you 
can join #sugar on IRC 
(https://wiki.sugarlabs.org/go/Internet_Relay_Chat) . we will try to 
help you out,

-- 
V/r
Srevin Saju

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x1007816766D390D7.asc
Type: application/pgp-keys
Size: 4849 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20200608/cbaddb83/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20200608/cbaddb83/attachment-0001.sig>


More information about the Sugar-devel mailing list