Scripting news

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

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

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

Re: Scripting news

Post by remowilliams »

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
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 122
Joined: Tue Oct 16, 2018 7:55 am
Contact:

Re: Scripting news

Post by BitsNStuff »

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
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Scripting news

Post by Locutus73 »

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
Atari User
Atari User
Posts: 32
Joined: Fri Jun 27, 2014 12:00 am
Location: USA

Re: Scripting news

Post by amadama »

Very cool Locutus73.
The ASCII Star Wars is a great touch!
SegaMan
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Sat Oct 27, 2018 12:59 pm

Re: Scripting news

Post by SegaMan »

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
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Scripting news

Post by Locutus73 »

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
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Sat Oct 27, 2018 12:59 pm

Re: Scripting news

Post by SegaMan »

thx.... i am not confused anymore :)
User avatar
kitrinx
Captain Atari
Captain Atari
Posts: 192
Joined: Wed Sep 26, 2018 6:03 am

Re: Scripting news

Post by kitrinx »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scripting news

Post by Sorgelig »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scripting news

Post by Sorgelig »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scripting news

Post by Sorgelig »

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
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Scripting news

Post by Locutus73 »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scripting news

Post by Sorgelig »

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
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scripting news

Post by Sorgelig »

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
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Scripting news

Post by Locutus73 »

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: 310
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Scripting news

Post by kolla »

Sorgelig wrote:I will add Perl into next Linux release.
Congrats, you are now a Linux distro maintainer! ;)
-- kolla
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Scripting news

Post by Sorgelig »

kolla wrote:Congrats, you are now a Linux distro maintainer! ;)
not now, but at least 2 years already ;)
sawf01
Atari User
Atari User
Posts: 35
Joined: Sun Mar 11, 2018 9:05 am

Updater script not working for me

Post by sawf01 »

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
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Updater script not working for me

Post by Locutus73 »

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: 35
Joined: Sun Mar 11, 2018 9:05 am

Re: Scripting news

Post by sawf01 »

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
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Scripting news

Post by Locutus73 »

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

Post by bertnorg »

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
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2190
Joined: Sun Jul 31, 2011 1:11 pm

Re: Scripting news

Post by Eero Tamminen »

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
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Scripting news

Post by Locutus73 »

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

Post by bertnorg »

Locutus73 thanks i'll give it a try :)
Locked

Return to “MiSTer”