placing files into Userdata
#1
Hello,

I am developing a skin to better leverage the Xbox 360 controller. While creating it, I noticed the default keymaps for X360 were off compared to an Xbox interface. (X for backspace for example).

I wanted to populate the userdata folder with the custom keymap when the skin is installed. I could not figure a way to do this at install time, so I created an addon to run a python script that unzip a package to put the files in there place. Less than ideal.

Questions:
1: is there a way to install these files when I install the skin?
2: if the skin cannot place these files in place, is there a way to run the add-on at time of install? (I have it as a requirement of the skin.)
3: baring 1 & 2 is there a means to set an add-on to run as a service but only run once?
4: any better ways to accomplish this task?

Thanks for any advice.
Reply
#2
Plenty of skins use the Startup.xml as an initialisation process to set various strings (have a look at xperience1080 or Eminence). Usually it is an onload condition in the Home.xml to launch the startup.xml if the init hasnt been done yet
Code:
<onload condition="!Skin.HasSetting(skin.init)">AlarmClock(Skin.Initialization,ReplaceWindow(startup),00:01,silent)</onload>

Then at the end of the startup.xml it sets that skin setting so that it wont run on subsequent loads

That being said, I really don't think it is wise that skins go messing around with people's file systems. At the very least, I hope your addon backups their old keyboard.xml and provides an easy way to restore. Also, I hope it asks permission before doing this.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#3
Another thing to consider, what if the user already has a custom keymap for their setup? Yours should not just overwrite theirs blindly.
Reply
#4
Right. Guess that's why a skin is called skin and a keymap .. keymap Wink
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#5
Probably should have provided more context for this but Jurialmunkey's suggestion was spot on.

This is for the Alienware Alpha. We've built a custom skin on top of Kodi and we are aiming to make it 100% turn key. I am in the middle of making massive improvements to the skin and one of the biggest request has been to map the controller as an xbox customer would expect. The keymap we are putting in place has .aw appended to it to avoid overwriting any existing maps from the customer.

More details on this reddit post:
http://www.reddit.com/r/Alienware/commen...dated_321/

Once complete, the skin will be available under CC. More details to come once we get closer to officially launching it.

Thanks for the quick responses.
Reply

Logout Mark Read Team Forum Stats Members Help
placing files into Userdata0