Scripting news

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

User avatar
remowilliams
Captain Atari
Captain Atari
Posts: 237
Joined: Mon Apr 02, 2007 1:49 am

Re: Scripting news

Postby remowilliams » Wed May 29, 2019 10:57 pm

kitrinx wrote:A graphical dialog wrapper would probably be a good stop-gap. I think in the long run, scripts should only serve the role of very niche/special purpose actions. If something needs to be done by a user all the time (updating, ini settings) a dedicated graphical method is the only sensible choice.


Agreed. Tactical solutions (such as scripting) are useful and have their place - but if there is functionality that is (forgive the pun) core to a given system, then it should be an integral part of that system and treated and handled as a strategic integrated component for several reasons.

User avatar
BitsNStuff
Atari freak
Atari freak
Posts: 54
Joined: Tue Oct 16, 2018 7:55 am
Contact:

Re: Scripting news

Postby BitsNStuff » Thu May 30, 2019 12:17 am

Definitely for me.

It's not that the settings can't be changed already but simplifying that for people would actually be transformative for many people and if there are people who are able and willing to do this then it really makes no sense for it not to happen. I think at the moment the user experience in this area is the difference between it staying where it is and becoming a mass market, in classic circles, product.

Locutus73
Captain Atari
Captain Atari
Posts: 480
Joined: Wed Feb 07, 2018 6:13 pm

Re: Scripting news

Postby Locutus73 » Thu May 30, 2019 4:38 pm

Scripting news:
===========================
Scripts_MiSTer: 2019-05-30
- core_manager.sh - Version 0.9 - 2019-05-30 - First commit, lacking any MiSTer Updater configuration capability.
===========================
A core manager GUI taking advantage of the new framebuffer terminal. You can install/update cores, delete cores, update the whole MiSTer.
It still lacks a MiSTer Updater configuration GUI I will add in the next days...
...but you can watch Star Wars in the meantime.
CoreManager.png


https://github.com/MiSTer-devel/Scripts_MiSTer

Regards.

Locutus73
You do not have the required permissions to view the files attached to this post.

amadama
Atariator
Atariator
Posts: 29
Joined: Fri Jun 27, 2014 12:00 am
Location: USA

Re: Scripting news

Postby amadama » Thu May 30, 2019 5:39 pm

Very cool Locutus73.
The ASCII Star Wars is a great touch!

SegaMan
Atari freak
Atari freak
Posts: 74
Joined: Sat Oct 27, 2018 12:59 pm

Re: Scripting news

Postby SegaMan » Thu May 30, 2019 6:19 pm

Sry i dont get it. :shrug:
How can i run/see this manager GUI?

When starting the manager Script on MiSTer Menü i get black user/pw screen.
Login with user "root" and pw "1" nothing spezial happens.

Locutus73
Captain Atari
Captain Atari
Posts: 480
Joined: Wed Feb 07, 2018 6:13 pm

Re: Scripting news

Postby Locutus73 » Thu May 30, 2019 6:24 pm

SegaMan wrote:Sry i dont get it. :shrug:
How can i run/see this manager GUI?

When starting the manager Script on MiSTer Menü i get black user/pw screen.
Login with user "root" and pw "1" nothing spezial happens.


Type /media/fat/Scripts/core_manager.sh or wait just a few time and you'll be able to use it directly from the Scripts menu using a joypad.
The script is intended to be used that way, it's just out there in order to be ready for the next MiSTer update.

Regards.

Locutus73

SegaMan
Atari freak
Atari freak
Posts: 74
Joined: Sat Oct 27, 2018 12:59 pm

Re: Scripting news

Postby SegaMan » Thu May 30, 2019 6:49 pm

thx.... i am not confused anymore :)

User avatar
kitrinx
Captain Atari
Captain Atari
Posts: 164
Joined: Wed Sep 26, 2018 6:03 am

Re: Scripting news

Postby kitrinx » Sat Jun 01, 2019 11:24 pm

Sorgelig wrote:trying to add mouse support in terminal.
added gpm package - now mouse works but completely ignores the application. It always selects the part of screen by cursor regardless if it's menu or not. So both MC and Dialog apps don't react on mouse clicks.
Cannot find solution for this problem.
Anyone?


Did you figure this out? In SDL, alan discovered in that SDL_GetGlobalMouseState would always return (0,0) in wayland, while SDL_GetMouseState would return the correct coordinates. The difference between the two functions is that GetGlobalMouseState quieries the system for the absolute coordinate of the cursor, while GetMouseState uses SDL's internal coordinates which are based on relative motion. Maybe the system is not adjusting internal absolute coord correctly.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scripting news

Postby Sorgelig » Sun Jun 02, 2019 2:07 am

kitrinx wrote:Did you figure this out? In SDL, alan discovered in that SDL_GetGlobalMouseState would always return (0,0) in wayland, while SDL_GetMouseState would return the correct coordinates. The difference between the two functions is that GetGlobalMouseState quieries the system for the absolute coordinate of the cursor, while GetMouseState uses SDL's internal coordinates which are based on relative motion. Maybe the system is not adjusting internal absolute coord correctly.

I didn't. I couldn't make GPM interact with any app besides screen select and copy/paste.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scripting news

Postby Sorgelig » Tue Jun 04, 2019 9:42 am

I'm still wondering why black bar appear on the left of dialog windows.
My FB driver doesn't process any drawing - it relays on a simple FB functions. Before i've used cfb_* versions of fillrect/copy/blit. Now i've switched to sys_* versions since the buffer (latest linux release) is in simple system memory, but bug is still there.
So i'm still not sure where exactly this bug is laying.. When i switch to other tty then go back to tty with ini_settings then black bar disappear. So, at least virtual terminal receives the correct data but somehow doesn't draw (or flush) to FB.
So, may be it's virtual terminal bug?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scripting news

Postby Sorgelig » Tue Jun 04, 2019 1:40 pm

I think On/Off options can be changed directly without entering another dialog.
Is there a drop-down feature in dialog app? It would be good to choose the options from drop-down menu in-place without switching to another dialog.

Locutus73
Captain Atari
Captain Atari
Posts: 480
Joined: Wed Feb 07, 2018 6:13 pm

Re: Scripting news

Postby Locutus73 » Wed Jun 05, 2019 8:28 am

Sorgelig wrote:So, may be it's virtual terminal bug?

I really don't know...

Sorgelig wrote:Is there a drop-down feature in dialog app? It would be good to choose the options from drop-down menu in-place without switching to another dialog.

I don't think there's a dropdown dialog widget, but I have to check the documentation (I'm pretty sure tho).
There are dropdowns in Zenity
Image
and Yad
Image
which are graphical drop in replacements (with added features) of dialog.
They obviously require some form of desktop environment, maybe Weston GUI is enough, I will fiddle with that.



Sorgelig wrote:I think On/Off options can be changed directly without entering another dialog.

That's an easy implementation, but IMHO we should evaluate the pros and cons: it would give a quicker UI for power users who know the settings, but it would offer less explanations to newcomers, let me explain with three images:
ini_settings3.png
Here I explain the general use of the ypbr setting

ini_settings2.png
Here I explain the off value and what to do with the SOG switch

ini_settings3.png
Here I explain the on value and again what to do with the SOG switch

I believe (I'll double check that) I have just one row for the help text, so we would loose the opportunity to deeply explaing each option value to users.
In the end I don't think the ini_settings.sh will be used very frequently. I mean, if you're a power user continuosly switching settings, maybe you should make 2 or 3 presets scripts based on https://github.com/MiSTer-devel/Scripts ... ibility.sh which can be customized, changing its name and making an ini file. On the other side new users will spend some more time entering each setting page, but will benefit the detailed explanations of each and every value.

I think we should think about that.

Regards.

Locutus73
You do not have the required permissions to view the files attached to this post.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scripting news

Postby Sorgelig » Wed Jun 05, 2019 1:59 pm

Locutus73 wrote:I believe (I'll double check that) I have just one row for the help text, so we would loose the opportunity to deeply explaing each option value to users.
In the end I don't think the ini_settings.sh will be used very frequently. I mean, if you're a power user continuosly switching settings, maybe you should make 2 or 3 presets scripts based on https://github.com/MiSTer-devel/Scripts ... ibility.sh which can be customized, changing its name and making an ini file. On the other side new users will spend some more time entering each setting page, but will benefit the detailed explanations of each and every value.

I've got your point.

Locutus73 wrote:I really don't know...

I've fixed it. It was virtual terminal bug.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scripting news

Postby Sorgelig » Sun Jun 09, 2019 4:15 pm

I will add Perl into next Linux release.
I found it's used in MC for browsing the zip and other files. But, OMG, it takes 30MB! Hope Perl will be useful for some scripting as well.

Locutus73
Captain Atari
Captain Atari
Posts: 480
Joined: Wed Feb 07, 2018 6:13 pm

Re: Scripting news

Postby Locutus73 » Mon Jun 10, 2019 8:57 am

Sorgelig wrote:I will add Perl into next Linux release.
I found it's used in MC for browsing the zip and other files. But, OMG, it takes 30MB! Hope Perl will be useful for some scripting as well.

:cheers:

Regards.

Locutus73

kolla
Captain Atari
Captain Atari
Posts: 214
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Scripting news

Postby kolla » Mon Jun 10, 2019 11:11 pm

Sorgelig wrote:I will add Perl into next Linux release.

Congrats, you are now a Linux distro maintainer! ;)
-- kolla

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4926
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scripting news

Postby Sorgelig » Tue Jun 11, 2019 7:23 am

kolla wrote:Congrats, you are now a Linux distro maintainer! ;)

not now, but at least 2 years already ;)

sawf01
Atari User
Atari User
Posts: 33
Joined: Sun Mar 11, 2018 9:05 am

Updater script not working for me

Postby sawf01 » Mon Jul 22, 2019 11:04 am

I'm sure I'm probably doing something silly, but this script outputs /tmp/script: /media/fat/scripts/mister_updater.sh /bin/bash^M bad interpreter: no such file or directory when I run it. Has anyone else had this or knows how to sort it?

Locutus73
Captain Atari
Captain Atari
Posts: 480
Joined: Wed Feb 07, 2018 6:13 pm

Re: Updater script not working for me

Postby Locutus73 » Tue Jul 23, 2019 6:52 am

sawf01 wrote:I'm sure I'm probably doing something silly, but this script outputs /tmp/script: /media/fat/scripts/mister_updater.sh /bin/bash^M bad interpreter: no such file or directory when I run it. Has anyone else had this or knows how to sort it?


It seems you have CrLf end of line characters (Windows style), instead of Lf (Unix style). Did you copypasted using Windows? If so please use Notepad++ or, better, just download raw scripts from GitHub as is.

Regards.

Locutus73

sawf01
Atari User
Atari User
Posts: 33
Joined: Sun Mar 11, 2018 9:05 am

Re: Scripting news

Postby sawf01 » Wed Jul 24, 2019 7:19 am

Thanks Locutus73. I did use notepad++ to paste to after clicking on the raw button in the script itself, but for whatever reason it didn't work. I didn't realise that you need to download the whole thing including the license, readme etc and take it from there. I was looking for the option to download in the script itself, I haven't used github much before.

Thanks for your help. :)

Locutus73
Captain Atari
Captain Atari
Posts: 480
Joined: Wed Feb 07, 2018 6:13 pm

Re: Scripting news

Postby Locutus73 » Wed Jul 24, 2019 10:41 am

sawf01 wrote:Thanks Locutus73. I did use notepad++ to paste to after clicking on the raw button in the script itself, but for whatever reason it didn't work. I didn't realise that you need to download the whole thing including the license, readme etc and take it from there. I was looking for the option to download in the script itself, I haven't used github much before.

Thanks for your help. :)


You don't need to download the whole repository, you can right click on the RAW button and download the link (not copy & paste) when in the script page
RAW.png

or you can right click the links in the README page
https://github.com/MiSTer-devel/Updater_script_MiSTer
please read the README, it's all explained there
and here too https://github.com/MiSTer-devel/Main_Mi ... ing-MiSTer
you can use Notepad++ too, but you have to convert EOL chars to Lf
Lf.png


Regards.

Locutus73
You do not have the required permissions to view the files attached to this post.

bertnorg
Atarian
Atarian
Posts: 9
Joined: Sun May 26, 2019 10:01 am

Re: Scripting news

Postby bertnorg » Mon Aug 05, 2019 4:36 pm

Locutus73, you do great work. :cheers:

when i run the update script ist updating everything, so that works perfectly.
but is there a way to prevent the arcade core to update, when i delete the arcade directory it automatically reinstalls it
i never use one of these arcade cores.
what parameter line will i have to set in the update ini file, so the arcade core will not update??
i have tried UPDATE_ARCADE="false" but this did not work..

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1956
Joined: Sun Jul 31, 2011 1:11 pm

Re: Scripting news

Postby Eero Tamminen » Tue Aug 06, 2019 11:50 am

Sorgelig wrote:I will add Perl into next Linux release.
I found it's used in MC for browsing the zip and other files. But, OMG, it takes 30MB! Hope Perl will be useful for some scripting as well.


Ouch, that's about same size as minimal Ubuntu 18.04 LTS installation: https://ubuntu.com/blog/minimal-ubuntu-released

Locutus73
Captain Atari
Captain Atari
Posts: 480
Joined: Wed Feb 07, 2018 6:13 pm

Re: Scripting news

Postby Locutus73 » Wed Aug 07, 2019 8:42 am

bertnorg wrote:Locutus73, you do great work. :cheers:

when i run the update script ist updating everything, so that works perfectly.
but is there a way to prevent the arcade core to update, when i delete the arcade directory it automatically reinstalls it
i never use one of these arcade cores.
what parameter line will i have to set in the update ini file, so the arcade core will not update??
i have tried UPDATE_ARCADE="false" but this did not work..

Hi, where did you read about UPDATE_ARCADE parameter?
Parameters are explained here https://github.com/MiSTer-devel/Updater_script_MiSTer and here https://github.com/MiSTer-devel/Updater ... h#L58-L135

I'd try REPOSITORIES_FILTER="cores console-cores service-cores" to filter out arcade-cores.

Regards.

Locutus73

bertnorg
Atarian
Atarian
Posts: 9
Joined: Sun May 26, 2019 10:01 am

Re: Scripting news

Postby bertnorg » Wed Aug 07, 2019 12:27 pm

Locutus73 thanks i'll give it a try :)


Return to “MiSTer”

Who is online

Users browsing this forum: ziosante and 7 guests