mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-25 18:05:20 +02:00
Add initial support for the GCW Zero
This commit is contained in:
parent
77046f3553
commit
d4c086a64d
@ -40,6 +40,11 @@ case "$GMENU2X_PLATFORM" in
|
||||
PLATFORM="dingux"
|
||||
SCREEN_RES="320x240"
|
||||
;;
|
||||
gcw0)
|
||||
AC_DEFINE(PLATFORM_GCW0)
|
||||
PLATFORM="gcw0"
|
||||
SCREEN_RES="320x240"
|
||||
;;
|
||||
nanonote)
|
||||
AC_DEFINE(PLATFORM_NANONOTE)
|
||||
PLATFORM="nanonote"
|
||||
|
19
data/platform/gcw0/about.txt
Normal file
19
data/platform/gcw0/about.txt
Normal file
@ -0,0 +1,19 @@
|
||||
GMenu2X has been created by Massimiliano "Ryo" Torromeo, and is released under the GPL-v2 license.
|
||||
|
||||
This version is maintained by the Qi-Hardware and OpenDingux crew. The credits, as well as the latest source code can be found here:
|
||||
http://projects.qi-hardware.com/index.php/p/gmenu2x
|
||||
|
||||
Credits for the translations:
|
||||
-----
|
||||
English & Italian by Massimiliano Torromeo
|
||||
French by Yodaz
|
||||
Danish by claus
|
||||
Dutch by superfly
|
||||
Spanish by pedator
|
||||
Portuguese (Portugal) by NightShadow
|
||||
Slovak by Jozef
|
||||
Swedish by Esslan and Micket
|
||||
German by fusion_power, johnnysnet and Waldteufel
|
||||
Finnish by Jontte and Atte
|
||||
Norwegian by cowai
|
||||
Russian by XaMMaX90
|
4
data/platform/gcw0/gmenu2x.conf
Normal file
4
data/platform/gcw0/gmenu2x.conf
Normal file
@ -0,0 +1,4 @@
|
||||
videoBpp=32
|
||||
menuClock=192
|
||||
maxClock=1020
|
||||
backlightTimeout=60
|
10
data/platform/gcw0/input.conf
Normal file
10
data/platform/gcw0/input.conf
Normal file
@ -0,0 +1,10 @@
|
||||
accept=keyboard,306
|
||||
cancel=keyboard,308
|
||||
altleft=keyboard,9
|
||||
altright=keyboard,8
|
||||
menu=keyboard,27
|
||||
settings=keyboard,13
|
||||
up=keyboard,273
|
||||
down=keyboard,274
|
||||
left=keyboard,276
|
||||
right=keyboard,275
|
0
data/platform/gcw0/sections/applications/.empty
Normal file
0
data/platform/gcw0/sections/applications/.empty
Normal file
6
data/platform/gcw0/sections/applications/30_terminal
Normal file
6
data/platform/gcw0/sections/applications/30_terminal
Normal file
@ -0,0 +1,6 @@
|
||||
title=Terminal
|
||||
description=Disable graphic mode
|
||||
icon=skin:icons/utilities-terminal.png
|
||||
exec=/bin/busybox
|
||||
params=sh -c 'clear; echo "The graphic mode is now disabled."; echo ""; echo "This is only useful for developers who want to test their graphical apps from telnet."; echo ""; echo "(Press START to exit to the launcher)"; read'
|
||||
consoleapp=true
|
0
data/platform/gcw0/sections/settings/.empty
Normal file
0
data/platform/gcw0/sections/settings/.empty
Normal file
5
data/platform/gcw0/sections/settings/10_poweroff
Normal file
5
data/platform/gcw0/sections/settings/10_poweroff
Normal file
@ -0,0 +1,5 @@
|
||||
title=Power Off
|
||||
description=Shut down the system
|
||||
icon=skin:icons/poweroff.png
|
||||
exec=/sbin/poweroff
|
||||
editable=false
|
5
data/platform/gcw0/sections/settings/20_reboot
Normal file
5
data/platform/gcw0/sections/settings/20_reboot
Normal file
@ -0,0 +1,5 @@
|
||||
title=Reboot
|
||||
description=Reboot the dingoo
|
||||
icon=skin:icons/reboot.png
|
||||
exec=/sbin/reboot
|
||||
editable=false
|
6
data/platform/gcw0/sections/settings/40_alsamixer
Normal file
6
data/platform/gcw0/sections/settings/40_alsamixer
Normal file
@ -0,0 +1,6 @@
|
||||
title=Sound Mixer
|
||||
description=Configure sound settings
|
||||
icon=skin:icons/alsamixer.png
|
||||
exec=/usr/bin/alsamixer
|
||||
consoleapp=true
|
||||
editable=false
|
7
data/platform/gcw0/sections/settings/50_system_info
Normal file
7
data/platform/gcw0/sections/settings/50_system_info
Normal file
@ -0,0 +1,7 @@
|
||||
title=System Info
|
||||
description=Info about the system
|
||||
icon=skin:icons/about.png
|
||||
exec=/usr/bin/dialog
|
||||
params=--ok-label "Press START to exit" --no-shadow --msgbox "`/usr/bin/system_info`" 240 320
|
||||
consoleapp=true
|
||||
editable=false
|
BIN
data/platform/gcw0/skins/Default/imgs/buttons/accept.png
Normal file
BIN
data/platform/gcw0/skins/Default/imgs/buttons/accept.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
BIN
data/platform/gcw0/skins/Default/imgs/buttons/cancel.png
Normal file
BIN
data/platform/gcw0/skins/Default/imgs/buttons/cancel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
@ -61,7 +61,7 @@
|
||||
|
||||
#include <sys/fcntl.h> //for battery
|
||||
|
||||
#ifdef PLATFORM_DINGUX
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
||||
# define UNLOCK_VT
|
||||
# include <sys/ioctl.h>
|
||||
# include <linux/vt.h>
|
||||
@ -101,7 +101,7 @@ using namespace fastdelegate;
|
||||
|
||||
#ifdef _CARD_ROOT
|
||||
const char *CARD_ROOT = _CARD_ROOT;
|
||||
#elif defined(PLATFORM_DINGUX)
|
||||
#elif defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
||||
const char *CARD_ROOT = "/media/";
|
||||
#else
|
||||
const char *CARD_ROOT = "/card/"; //Note: Add a trailing /!
|
||||
@ -348,7 +348,7 @@ void GMenu2X::initBG() {
|
||||
Surface *sd = Surface::loadImage("imgs/sd.png", confStr["skin"]);
|
||||
if (sd) sd->blit(bgmain, 3, bottomBarIconY);
|
||||
|
||||
#ifdef PLATFORM_DINGUX
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
||||
string df = getDiskFree("/boot");
|
||||
#else
|
||||
string df = getDiskFree(CARD_ROOT);
|
||||
@ -735,7 +735,7 @@ void GMenu2X::main() {
|
||||
s->rectangle( 12,52,296,helpBoxHeight,
|
||||
skinConfColors[COLOR_MESSAGE_BOX_BORDER] );
|
||||
s->write( font, tr["CONTROLS"], 20, 60 );
|
||||
#ifdef PLATFORM_DINGUX
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
||||
s->write( font, tr["A: Launch link / Confirm action"], 20, 80 );
|
||||
s->write( font, tr["B: Show this help menu"], 20, 95 );
|
||||
s->write( font, tr["L, R: Change section"], 20, 110 );
|
||||
@ -1215,7 +1215,7 @@ void GMenu2X::editLink() {
|
||||
sd.addSetting(new MenuSettingDir(this, ts, tr["Selector Screenshots"], tr["Directory of the screenshots for the selector"], &linkSelScreens));
|
||||
sd.addSetting(new MenuSettingFile(this, ts, tr["Selector Aliases"], tr["File containing a list of aliases for the selector"], &linkSelAliases));
|
||||
sd.addSetting(new MenuSettingBool(this, ts, tr["Don't Leave"], tr["Don't quit GMenu2X when launching this link"], &menu->selLinkApp()->runsInBackgroundRef()));
|
||||
#ifdef PLATFORM_DINGUX
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
||||
sd.addSetting(new MenuSettingBool(this, ts, tr["Display Console"], tr["Must be enabled for console-based applications"], &menu->selLinkApp()->consoleApp));
|
||||
#endif
|
||||
#ifdef HAVE_LIBOPK
|
||||
@ -1431,7 +1431,7 @@ void GMenu2X::scanPath(string path, vector<string> *files) {
|
||||
scanPath(filepath, files);
|
||||
if (statRet != -1) {
|
||||
ext = filepath.substr(filepath.length()-4,4);
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_NANONOTE)
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE)
|
||||
if (ext==".dge")
|
||||
#else
|
||||
if (ext==".pxml")
|
||||
@ -1452,7 +1452,7 @@ unsigned short GMenu2X::getBatteryLevel() {
|
||||
FILE *batteryHandle = NULL,
|
||||
*usbHandle = NULL;
|
||||
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_NANONOTE)
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE)
|
||||
usbHandle = fopen("/sys/class/power_supply/usb/online", "r");
|
||||
#endif
|
||||
if (usbHandle) {
|
||||
@ -1463,7 +1463,7 @@ unsigned short GMenu2X::getBatteryLevel() {
|
||||
return 6;
|
||||
}
|
||||
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_NANONOTE)
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE)
|
||||
batteryHandle = fopen("/sys/class/power_supply/battery/capacity", "r");
|
||||
#endif
|
||||
if (batteryHandle) {
|
||||
@ -1487,7 +1487,7 @@ void GMenu2X::setInputSpeed() {
|
||||
|
||||
void GMenu2X::setClock(unsigned mhz) {
|
||||
mhz = constrain(mhz, cpuFreqMin, confInt["maxClock"]);
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_NANONOTE)
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0) || defined(PLATFORM_NANONOTE)
|
||||
jz_cpuspeed(mhz);
|
||||
#endif
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
#ifdef PLATFORM_DINGUX
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
||||
#include <linux/vt.h>
|
||||
#endif
|
||||
|
||||
@ -75,7 +75,7 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
||||
selectorbrowser = true;
|
||||
editable = true;
|
||||
edited = false;
|
||||
#ifdef PLATFORM_DINGUX
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
||||
consoleApp = false;
|
||||
#endif
|
||||
|
||||
@ -161,7 +161,7 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_DINGUX
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
||||
param = opk_read_param(pdata, "Terminal");
|
||||
if (param)
|
||||
consoleApp = !strcmp(param, "true");
|
||||
@ -245,7 +245,7 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
||||
manual = value;
|
||||
} else if (name == "dontleave") {
|
||||
if (value=="true") dontleave = true;
|
||||
#ifdef PLATFORM_DINGUX
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
||||
} else if (name == "consoleapp") {
|
||||
if (value == "true") consoleApp = true;
|
||||
#endif
|
||||
@ -330,7 +330,7 @@ bool LinkApp::save() {
|
||||
if (params!="" ) f << "params=" << params << endl;
|
||||
if (manual!="" ) f << "manual=" << manual << endl;
|
||||
if (dontleave ) f << "dontleave=true" << endl;
|
||||
#ifdef PLATFORM_DINGUX
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
||||
if (consoleApp ) f << "consoleapp=true" << endl;
|
||||
#endif
|
||||
if (selectorfilter!="" ) f << "selectorfilter=" << selectorfilter << endl;
|
||||
@ -623,7 +623,7 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
|
||||
} // else, well.. we are no worse off :)
|
||||
|
||||
if (params!="") command += " " + params;
|
||||
#ifdef PLATFORM_DINGUX
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
||||
if (gmenu2x->confInt["outputLogs"] && !consoleApp)
|
||||
command += " &> " + cmdclean(gmenu2x->getHome()) + "/log.txt";
|
||||
#else
|
||||
@ -671,7 +671,7 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
|
||||
signal(SIGTTOU, SIG_IGN);
|
||||
tcsetpgrp(STDOUT_FILENO, pgid);
|
||||
|
||||
#ifdef PLATFORM_DINGUX
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
||||
if (consoleApp) {
|
||||
/* Enable the framebuffer console */
|
||||
char c = '1';
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
|
||||
virtual const std::string &searchIcon();
|
||||
|
||||
#ifdef PLATFORM_DINGUX
|
||||
#if defined(PLATFORM_DINGUX) || defined(PLATFORM_GCW0)
|
||||
bool consoleApp;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user