1st you need to edit /var/etc/init.d/rcS starting here
add this line after the # If appropriate, load ide drivers and file system drivers
Code: Alles auswählen
if [ -e /var/etc/.hdd ]; then
Code: Alles auswählen
# If appropriate, load ide drivers and file system drivers
if [ -e /var/etc/.hdd ];
fi
so it looks like this
Code: Alles auswählen
fi
# Mount file systems in /etc/fstabthe
neutrino.cpp
add the following to the top of your neutrino.cpp after all of the includes
Code: Alles auswählen
//int for ide
int active_ide=0;
void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu,
Code: Alles auswählen
// define IDE select
#define IDESEL_OPTION_COUNT 2
const CMenuOptionChooser::keyval IDESEL_OPTIONS[IDESEL_OPTION_COUNT] = {
{ 0, LOCALE_IDEON },
{ 1, LOCALE_IDEOFF }
};
Code: Alles auswählen
mainMenu.addItem(GenericMenuSeparator);
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_TVMODE, true, NULL, this, "tv", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED), true);
and after
Code: Alles auswählen
CMenuWidget &streamingSettings,
CMenuWidget &moviePlayer)
{
dprintf(DEBUG_DEBUG, "init mainmenue\n");
Code: Alles auswählen
//ide Menu
isopen = fopen("/var/etc/.hdd", "r");
if(isopen){
fclose(isopen);
active_ide = 0;
}
isopen = fopen("/var/etc/.hddoff", "r");
if(isopen){
fclose(isopen);
active_ide = 1;
}
CMenuWidget* ideMenu = new CMenuWidget(LOCALE_IDEMENU, "softupdate.raw");
ideMenu->addItem(GenericMenuSeparator);
ideMenu->addItem(GenericMenuBack);
ideMenu->addItem(GenericMenuSeparatorLine);
ideMenu->addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_SAVESETTINGSNOW , true, NULL, this, "applyidemenu", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
ideMenu->addItem(GenericMenuSeparatorLine);
CMenuOptionChooser *ide_sel = ( new CMenuOptionChooser(LOCALE_IDEMENU_SELIDE, &active_ide, IDESEL_OPTIONS, IDESEL_OPTION_COUNT, true));
ideMenu->addItem(ide_sel);
// End IDE Menu
Code: Alles auswählen
if (g_PluginList->hasPlugin(CPlugins::P_TYPE_SCRIPT))
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, true, NULL, new CPluginList(LOCALE_MAINMENU_SCRIPTS,CPlugins::P_TYPE_SCRIPT), "",
CRCInput::convertDigitToKey(shortcut++)));
//add dwmenu and submenu's
mainMenu.addItem(new CMenuForwarder(LOCALE_DWMENU, true, NULL, dwMenu, NULL, CRCInput::convertDigitToKey(shortcut++)));
dwMenu->addItem(new CMenuForwarder(LOCALE_IDEMENU, true, NULL, ideMenu, NULL, CRCInput::convertDigitToKey(dwshortcut++)));
//end dwmenu and submenu's
} //End userlevel 1+2
mainMenu.addItem(GenericMenuSeparatorLine);
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, &mainSettings, NULL,
Code: Alles auswählen
//end ucode menu
//ide code
else if(actionKey == "applyidemenu"){
if(active_ide == 0){
remove("/var/etc/.hddoff");
system("touch /var/etc/.hdd");
}
else if(active_ide == 1){
remove("/var/etc/.hdd");
system("touch /var/etc/.hddoff");
}
}
//end ide code
to add these items
LOCALE_IDEMENU_SELIDE,
LOCALE_DEFAULTIDE,
LOCALE_IDEON,
LOCALE_IDEOFF,
LOCALE_IDEMENU,
LOCALE_IDE_INFO,