clockworkpi / launcher Goto Github PK
View Code? Open in Web Editor NEWThe launcher for GameShell
License: GNU General Public License v3.0
The launcher for GameShell
License: GNU General Public License v3.0
from /tmp/x.log:
Traceback (most recent call last):
File "run.py", line 672, in <module>
big_loop(config.GlobalCanvas)
File "run.py", line 603, in big_loop
main_screen.ReadTheDirIntoPages("/home/cpi/apps/Menu",1,main_screen._Pages[ len(main_screen._Pages) -1])
File "/home/cpi/launcher/sys.py/UI/main_screen.py", line 571, in ReadTheDirIntoPages
self.ReadTheDirIntoPages(_dir+"/"+i,pglevel+1,iconitem._LinkPage)
File "/home/cpi/launcher/sys.py/UI/main_screen.py", line 571, in ReadTheDirIntoPages
self.ReadTheDirIntoPages(_dir+"/"+i,pglevel+1,iconitem._LinkPage)
File "/home/cpi/launcher/sys.py/UI/main_screen.py", line 583, in ReadTheDirIntoPages
if FileExists( MySkinManager.GiveIcon( _dir+"/"+ReplaceSuffix(i2,"png"))):
TypeError: cannot concatenate 'str' and 'NoneType' objects
Please advise on a solution, after the first Loading
and a few seconds in black screen, the launcher won't boot up and it gets stuck on Loading endlessly. After some configuration I've been frustratingly met with this error the past 2 days and trying to figure out why.
Part of it is just me being bad at figuring out how to use it, but RetroArch is a giant pain and only sometimes work. Could we add shortcuts to Higan and VisualBoyAdvance to the "Retro games" menu, or are there problems with those particular emulators? I've only tried to get them to work a little bit and it does not seem straightforward, but shouldn't be that hard, hopefully. Would you accept a PR that does this?
Now that we have the bluetooth driver, it would be nice to be able to pair bluetooth devices from the launcher.
When browsing the list of ROMs, there is no indication that Favorite list is to the right of the Roms list. Maybe add an indication at the bottom of the screen (even tough there is little room).
I know this is not an issue, but as close to the devs as I can get ;)
Is there a way to run the launcher on a desktop/emulator/vm to make development faster?
I was thinking about playing with the code, but sending the files via my (rather slow) wifi, and relaunching it on the cpi is a bit tedious.
Is there a better way to develop stuff for the launcher?
Thanks in advance,
Paul
Since Launcher obviously is aware of when the battery is charging or not, it seems like it would be pretty simple to set it up so that auto-shutdown is disabled during charging. This would be convenient for when someone is doing configuration/server work on the GameShell, instead of having to manually change the power config to "Server" or "Performance" first, and then remember to change it back afterward.
Follow up to #279
When you add games to your favorite list, you need to do more "clicks" to get there. There's probably a better UX for this, for example getting them to the top of the list with some star, instead of having a separate screen ?
Hello guys,
I recently upgraded the launcher from 1.20 to the 1.23 and every time I try to upgrade to 1.24 is shows an error.
Any way to bypass/fix the problem?
Regards.
Can we stash change then pull & reset & stash pop?
Currently pico-8 will not be installable via the pico-8*raspi.zip files if the desired version does not have an entry in compkginfo.json.
example: currently trying to install pico-8_0.1.12c_raspi.zip does not work as it has no entry in compkginfo.json.
I propose that the install process installs ANY version of pico-8 using a pattern match for something like "pico-8*raspi.zip" and if there is not corresponding entry in compkginfo.json with an md5 checksum, it displays the validation warning and lets the user install anyways.
This would make installation of pico-8 easier for the end user without confusion as to why it wont install or work as well as remove the need for always having the latest launcher or modifying launcher files.
So I had to change the usb ip in order to have an internet connection with a Mac, everything is working just fine after changing /etc/network/interfaces
to:
iface usb0 inet static
address 192.168.2.2
netmask 255.255.255.0
gateway 192.168.2.1
dns-nameservers 192.168.2.1
However the Tyny Cloud is showing the wrong ip for the USB-Ethernet because the ip is hardcoded in ~/launcher/Menu/GameShell/98_TinyCloud/__init__.py
.
I wrote a small function to retrieve the IP from USB0, therefor we could replace the hardcoded ip with the result of this function, if no one changes the ip, fine :) If we need to change the TynyCloud will be always updated.
The function:
import socket
import fcntl
import struct
def GetIpAddress(ifname):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
ip = socket.inet_ntoa(fcntl.ioctl(
s.fileno(),
0x8915, # SIOCGIFADDR
struct.pack('256s', ifname[:15])
)[20:24])
except:
ip = 'x.x.x.x'
return ip
print(GetIpAddress('usb0'))
Do you want me to create a PR or do you have anything to add / change?
When using the clockworkpi "offline" without a wifi connection, I think tinycloud could (should?) display instructions when the clockworkpi has been connected using USB ethernet.
Existing :
Wished :
Hello, only power off option is available from the launcher, can you add a reboot option in the poweroff script ?
def KeyDown(self,event):
if event.key == CurKeys["Menu"] or event.key == CurKeys["A"]:
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["B"]:
if self.CheckBattery() < 20:
cmdpath = "feh --bg-center gameshell/wallpaper/gameover.png;"
else:
cmdpath = "feh --bg-center gameshell/wallpaper/seeyou.png;"
cmdpath += "sleep 3;"
#cmdpath += "echo 'halt -p' > /tmp/halt_cmd"
cmdpath += "sudo halt -p"
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
if event.key == CurKeys["X"]:
cmdpath = "sudo reboot"
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
It would be nice if all of the UI pygame.Color parameters came from the skin_manager
I'd like to work on switching it over.
This change should have zero change to the visuals of the system (I'm not going to add any skins)
This will change these types of calls:
pygame.Color(R,G,B)
component.Init("title",font,(R,G,B))
pygame.draw.shape(self._CanvasHWND,(R,G,B),param,0)
component.fill( (R,G,B))
This change won't handle fonts or any other skin elements.
This is just the first step on getting all the UI's unified color-wise
The X and Y button should be equivalent to L and R of the GameBoy Advance.
It would be nice if when restarting the launcher remembered where the user was previously in the menu and restored that setting.
For example when testing a few ROMs in the "MGBA" menu of "Retro Games", when I quit a game, I have to go through "A > Right > Right > Right > A" to go back to where I was.
Hi, I have no issue connecting to my wifi. The only issue I have is that the launcher freezes/locks up in the cases where the wifi connectivity is bad.
I understand, that with the onboard ceramic antenna, the connectivity won't be excellent, and that throughput will be slow.
What puzzles me ist that this affects the launcher to the point where it freezes for a few seconds (or longer) until the signal is good again.
Launcher Version: stable 1.25
OS 0.5
Is this a known issue, or what info can I provide to resolve this :).
I haven't updated in about a month or so. There seems to be a lot of activity in this repo, but when I select "Update" in the GameShell UI it says that there are no updates. Is there anything I need to do? Can I update manually some other way?
I know about the alias trick, but my aliases would primarily be the ROM filename minus the extension. It would be cool if Launcher had an menu option to "Show/Hide filename extensions".
It's a minor thing, but it would provide for a cleaner presentation.
Thanks for your consideration.
When playing through a game, it would be nice for the launcher to have an option where the user can say "on next reboot just go into the game I was playing when I turned the gameshell off".
There is a binary in the launcher to which we dont have the source.
https://github.com/clockworkpi/launcher/blob/master/dwm-mod
I am a game developer using Unity3D
The GameShell background image is the "Loading" image (On HDMI it is actually a full size background image of an exploded gameshell). If and When the UI crashes due to various bugs and issues, it makes the unit look like it is stuck loading something when in actuality nothing is happening, you are just seeing the background image.
The background should be something unique, and the loading image should be shown in times of actual loading, and an error image should be shown for crashes, etc.
Hi,
is it possible to install the launcher on a raspberry pi?
how can be done?
thanks.
Pretty self-explanatory :)
When adding a ROM to Favorites using select, it disappears from the list. I would expect the title to stay in the general list. I can understand other people like this behaviour, if that is the case, could this be made to be an option ?
This was a pain to figure out, but MPD playlistinfo titles are sometimes a list instead of a string.
This will cause the entire UI to lock up and not resolve until the offending track has been removed from the playlist (which is impossible since the playlist will be reloaded even after a reboot).
We can either handle this by scrubbing the playlist list in the libs/MPD/poller playlist method and make sure it only returns a single string (by joining the title list elements together with commas) or handle the playlist title sometimes being a list in the Menus/GameShell/Music Player/play_list_page.py.
If you want to try reproducing you can use the same public domain song I was testing with:
https://ia800307.us.archive.org/34/items/MusopenCollectionAsFlac/Bach_GoldbergVariations/JohannSebastianBach-01-GoldbergVariationsBwv.988-Aria.flac
I was talking to a user on the forum and it was requested that they have the option to enter in the SSID of their hidden network.
After looking through the wifi_list.py code, this will be a bit of work, but I think it should be possible without changing too much.
I think we can re-use the same keyboard/text-area components already used in the wifi pages.
This is somewhat related to #84, but is a bit more in-depth.
Here's the thing: right now, the volume buttons modify the overall system volume when in Launcher, but when in a RetroArch-powered emulator, they modify the volume inside RetroArch. The problem is that these two different volume options "stack" -- the volume inside RetroArch is dependent on the system volume.
This behavior can be demonstrated by turning the volume down very low in Launcher, then launching a RetroArch emulator, and then trying to change the volume inside the emulator. The maximum volume inside the emulator is entirely dependent on the system volume.
IMO, ideally the volume buttons would always do the same thing -- e.g. controlling the volume via @follower46's script when not in Launcher. This would provide the added benefit of being able to control the volume regardless of what happens to be running. One con of this is that you'd have no way to provide graphical feedback when pressing volume buttons outside of Launcher. A future GameShell HW revision incorporating some GPIO-controllable LEDs might alleviate this problem.
Could you please follow the PEP-8 coding styles?
Most Python editor have options to reformat code and/or display when the code is not following the official coding style.
If you add a custom emulator, like SNES for instance, and define a custom action.config file, pointing to a valid core, and core URL. The Launcher will download and extract the core, but not set the permissions correctly. This results in the Launcher not being able to properly run the core, or the game, and causes a loop (where the screen returns to the menu).
By default the core permissions are set to 0644, they need to be set to 0775.
Once permissions are manually fixed, the launcher is able to launch the core, and the game.
See details here: https://forum.clockworkpi.com/t/how-to-add-icons-on-the-homescreen-that-link-to-emulators/580/29
Please see this thread https://www.cavestory.org/forums/threads/illegal-copy-of-cave-story-on-raspberry-pi-need-your-help.5063/
TL;DR: NiCALIS is hostile against anything, that uses "Cave Story" as it's name.
While i could care less, Tyrone still have a valid point: nxengine is not perfect. Especially retroarch version of it.
When trying to run launcher with python3 I get :
python run.py
Traceback (most recent call last):
File "run.py", line 6, in <module>
import commands
ModuleNotFoundError: No module named 'commands'
2to3 says :
-import commands
+import subprocess
With #297 #296 #298 in general the setup of a dev environment is not easy with launcher. To get new contributors it would be nice to have this become a bit easier.
One of the things is to remove the dependency to /home/cpi
and have a "relative paths" mode or a configurable though $HOME/.config/clockworkpi config.
python sys.py/run.py
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
../skin/default/truetype/VarelaRound-Regular.ttf
Traceback (most recent call last):
File "sys.py/run.py", line 39, in <module>
from UI.page import PageStack,PageSelector,Page
File "/home/arthur/local/clockworkpi/launcher/sys.py/UI/page.py", line 22, in <module>
from icon_pool import MyIconPool
File "/home/arthur/local/clockworkpi/launcher/sys.py/UI/icon_pool.py", line 9, in <module>
from skin_manager import MySkinManager
File "/home/arthur/local/clockworkpi/launcher/sys.py/UI/skin_manager.py", line 163, in <module>
InitMySkinManager()
File "/home/arthur/local/clockworkpi/launcher/sys.py/UI/skin_manager.py", line 160, in InitMySkinManager
MySkinManager = SkinManager()
File "/home/arthur/local/clockworkpi/launcher/sys.py/UI/skin_manager.py", line 30, in __init__
self.Init()
File "/home/arthur/local/clockworkpi/launcher/sys.py/UI/skin_manager.py", line 41, in Init
self.SetFonts()
File "/home/arthur/local/clockworkpi/launcher/sys.py/UI/skin_manager.py", line 56, in SetFonts
self._Fonts["varela%d"%i] = pygame.font.Font(fonts_path["varela"],i)
IOError: [Errno 2] No such file or directory: '../skin/default/truetype/VarelaRound-Regular.ttf'
This can be closed out if you like, it's just a suggestion.
I discovered while using PICO-8 that the game has no build in volume controls. It expects the host system to have either hardware volume controls or system controls.
Because of this it's not possible to adjust the volume in-game without some script to manage the gameshell keybindings.
I wrote a script to do this here: https://gist.github.com/follower46/69cdc41d9dc09cf9fe97b48ec4036158
We could add the option in the launcher so if an application needed it, bindings could be given to manage the volume.
This could be extended in the future to also map menu to terminate the process.
It would be nice to have the option to set the system timezone in the settings menu.
I copied the /usr/share/zoneinfo/America/Chicago
file to /etc/localtime
on my GS and it updated accordingly.
We could have a vertical list of string options by listing the options in zoneinfo
and drilling down to the timezone of each location.
I'd like to work on this one 😄
Hi,
I'm on a Wifi with a very long password (yes, I know). I can not enter the whole password, so of course I can not join the Wifi
Of course I know, that you textarea thing is a little more complicated
It seems that the footbar when using SNES layout shows the XBOX actions and when using XBOX layout show the SNES actions.
I have created a pull request to fix this, #246.
I love that gameshell can connect to wifi to setup retroarch cores, and some games that get assets from the internet.
But I would really like having the option of not automatically connecting to wifi (power saving, privacy, only on a need-to-use basis). I would argue this could a be default, but I can understand that it isn't, so it would be nice to be able to configure that as an option for the gameshell, or even just by wifi setting (for example, auto connect at home, but manual connect at work).
Every time you "reload" the launcher GUI (running and then exiting an application), it uses up more file descriptors (fd's). Once it uses up 1000+ fd's, the launcher can no longer open any new files and crashes when it tries to load a font from file (it loads all fonts every reload). It creates a LOT of fonts and is loading the file for the font for every size it needs (about 72 fonts/sizes, from sys.py/UI/fonts.py), but it never frees their fd's.
Instead the font files should be loaded into python once and reused for creating the fonts/sizes. Use the second constructor with object instead of filename: https://www.pygame.org/docs/ref/font.html#pygame.font.Font
Additionally, why are the fonts being recreated on reload at all anyways? At the very least, if the fonts need to be refreshed, the above should be used and combined with closing the files to free the descriptors, then reloaded, again only once, before re-creating the fonts/sizes.
You can use the following command to count the fd's being used by the launcher GUI at any given moment:
ps aux | grep [r]un.py | awk '{system("ls /proc/"$2"/fd")}' | wc -l
Run the above command, then on the GameShell reload the launcher, then run the command after the launcher fully reloads. It will have an additional 72 fd's being used. Repeat and watch the fd count climb until it crashes when it reaches over 1000. It takes only 13 launcher reloads to crash (starts with 82 fd's, adding 72 each reload (72 + 13 = 936 + 82 = 1018).
Setting up a wireless network with multiple networks around is a pain in the a$$.
Usually the first network you pick is wrong after entering your password, then after scanning it pops up the password and connects to the correct network.
If it doesn't connect and says "connecting", pressing B will cause Launcher to crash and stay on the loading screen indefinitely (needs a reset).
This seems to happen in both Launcher and LauncherGo especially after switching launchers.
Hi,
Could you use "rebase" instead of merging between the cuu branch and the main branch? It make the repository history really clunky and hard to follow.
It is too late for the existing history, but could you please use the rebase strategy for future pull requests?
Thanks
(that makes merging on my branch unnecessarily complicated)
i think it is interesting to play a video in gameshell,i hope it will be real
The button layout selected used to reflect the setting under settings, but doesn't do do anymore.
I use the SNES layout, but the UI still shows B as enter while A needs to be pressed.
The release notes for 1.22 says:
Auto detect retroarch-local.cfg under launcher/20_Retro\ Games/[MGBA,MAME,NESTOPIA,etc...] to use as custom seperated retroarch config file, so that we can feel free to define retroarch's behaviour,like key mapping
But it doesn't look like this was ever merged.
Can we get wrapping icon movement in the launcher? Wrapping to the beginning and end of the icons provides better usability.
Hey guys,
Having great fun playing with the gameshell however just got a little miffed when I just completed a boss fight and was about to save when the battery gave out. Arrrg
So is there a chance that there can be some sort of audible warning or a quick flash on screen when the battery is say 10% or 5% and needs charging sooner not later?
Would certainly cut down on frustration , trust me. :)
Thanks for such a compelling product.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.