Inferno OS Android Versions Save

an Android port of Inferno OS. it works as a regular Android (> 4.0) app. to build it needs only Android Studio (>3.0) and NDK

old_inferno-os_tree

5 years ago

after replacing inferno-os tree with the repo https://github.com/bhgv/Inferno-OS-bhgv (newer and better) i stored old inferno-os tree here (inferno-os.old.tgz).

v1.0b-0.11

6 years ago

Tk widgets may be created and removed by creating or removig files or folders (for container widgets).

files/folders for widgets should have names of special form: name_pt.type_pt.

  • name_pt should not contain any points (".") or spaces (" "). name_pt should be unical in the its folder. this will be used as an Id of this widget.

  • type_pt is a type of created widget. it's may be:

    • frame
    • label
    • checkbox
    • button
    • menubutton
    • menu
    • separator
    • cascade
    • listbox
    • scrollbar
    • text
    • canvas
    • entry
    • radiobutton
    • scale
    • panel
    • choicebutton

ex:

cd /gui/10/W*
echo 'configure -text HelloWorld!' > tst.button

# open the Log window to see the result (in the Log's caption)

rm tst.*

# see to the Log's caption again

these possibilities may be used to:

  • fast storing/restoring/sending/cloning full or part of the gui system of the app,
  • using of styles. just prepare files like css but in the Tk style and write them to the widget file,
  • designing of the gui. just design somewhere a tree of text files with styles and correct names and copy/remove of them to gui filetree,
  • use of Inferno Tk gui from your own language. not Limbo or Sh (not complete yet. you still should create tktop from limbo or sh)

v1.0b-0.10

6 years ago

devgui:

  • a possibility to write to widget's files commands (like Tk ones, but without the name of the widget) and if it's necessary to read the result of just (before closing of the file) sent command.

ex ('Log' window):

cd /gui/10
echo configure -bd 25 > .self   # will do borders of the Log window wider

cd c*       # or /gui/10/c*   - go to Log window's console
<> t.*  {echo get 1.0 end >[1=0]; read}   # get the text from the console's text widget
  • output of widget's files was changed to be compatible with their input (and changed a little Tk itself as it doesn't have some functions. for example it doesn't have a possibility to know the name of the picture was loaded by '-bitmap' command).

now using reading/writing from/to a widget's file it's possible to store/restore/clone of widget's options.

ex:

cd /gui/10/c*
echo insert end '''' A text > t.*   # '''' is need to do single ' in the sh
cat t.* > /buf   # store
cat /buf > t.*   # restore
cat t.* > t.*  clone (clone to iself here, but it may cloned to other widget with same type

note:

commands are executed (while they are wited to widget's file) line-by-line. BUT if you need to send a multiline command (for example set a multiline text) close this command with quotes. ex:

  1. insert end 'a single line case 1
  2. "insert end 'a single line case 2"
"insert end 'a multiline
line 2
line 3
etc
"

v1.0b-0.9

6 years ago

devgui (#G)

a try to do more easier way and convenient way to work with Inferno's Tk. as a bonus Tk widgets trees may be be explored remotelly using Styx.

now it shows Tk widgets hierarchical trees sorted by pid. every widget's name is in the form <id-of-the-wiget>.<tk-type-of-the-widget>.
every container widget (a widget with slaves) looks as a folder. inside such folder is a file .self to control container-widget's options.

to get the list of widget's options just read the wiget's file (or .self). this list is not fully complete yet. only the configure/cget options.

ex:

bind '#G' /gui
cd /gui
ls     # to see the list of all progs in the Inferno by their pids
cd 10   # 10 is a pid of shell in my case.
ls     # to see toplevel widgets.
cd cons.*   # last part of the widget's name is its type. write '*' insted it.
ls -l  # to see slaves of the 'cons'. '-l' gives more info.
cat scroll.*
cat t.* # reading from widget's files gives the list of its options not complete yet. only configure/cget ones

for more convenient using add a string to /lib/awmsetup:

bind '#G' /gui

to get the pid of the current app just use:

  • Sys->pctl from the limbo's source.
  • or ${pid} in the shell command/script (but it gives the pid of the current shell thread)

ex:

cd /gui/${pid}

v1.0b-0.8

6 years ago

was added experimentally self-backtrace on internal errors.

now Inferno after an internal error writes to the /sdcard/Inferno/calltrace.log file desription of the error and the list of calls of functions before this error appeared.

ex: if Inferno freezed or breaks - send me this calltrace.log

but this is a first step, an experiment yet.

v1.0b-0.7

6 years ago
  • .ttf fonts now may be used by limbo/Tk apps directly. without a .font wrapper. it is need to define sizes of fonts directly from a limbo app (.b / .dis).

ex:

font : ref Font;
# font = Font.build(<name of this font>, "<height of the font> <accent of the font>\n0x0000 0x7fff <name of ttf font used as subfont>\n");
font = Font.build("vera_new_17, "17 14\n0x0000 0x7fff /fonts/ttf/Vera.ttf\n");

after this you may use font or name of this just built font in your Tk controls and for other operations.

Note: names of fonts SHOULD be different! because Inferno caches fonts and searches of them by their names!

  • command line now supports .ttf fonts directly as the default Tk font (-f). in this case the font will be autoscaled before the install in the inferno system.

  • titlebar, main toolbar (including the main menu), keyboard an man (help viewer. 'Noto' fonts from Ubuntu) now used with autoscaled fonts. they look better on any resolution and they (/appl/awm) may be used on desktops too instead of not autoscaled /appl/wm.

v1.0b-0.6

6 years ago

v1.0b-0.5

6 years ago

devAudio

first it should be mapped to /dev fs:

bind -b '#A' /dev

possibilities:

  • reading of /dev/audio will reads the phone's mic (44.1kHz, 16bit, stereo, raw wave without headers and compression). ex:
cat /dev/audio > snd.raw
  • writing to /dev/audio will outputs the data was written to phones speaker (44.1kHz, 16bit, stereo, raw wave without headers and compression). ex:
cat snd.raw > /dev/audio
  • /dev/audioctl supports now next commands (only writing to):
    • load file <file path in the inferno's fs> - loads the specified file, but don't start to play,
    • load uri <uri address of a stream to play> - loads the specified network stream, but don't start to play,
    • unload file - unloads last loaded file and free used resources,
    • unload uri - unloads last loaded network stream and free used resources,
    • play file - play the loaded file,
    • play uri - play the loaded uri,
    • stop file - stop playing of the file,
    • stop uri - stop playing of the network's stream,
    • loop file or loop uri - loops playing of the file or the stream.

all sound streams: record, output of raw wave (/dev/audio), playing of a file and network stream use separate buffers and may work simultaneously.

ex:

echo load file /mp3/a_music.mp3 > /dev/audioctl
echo play file > /dev/audioctl

or

echo load uri http://ice1.somafm.com/dubstep-128-mp3 > /dev/audioctl
echo play uri > /dev/audioctl

(thanks to somafm.com network radio for provided demo net stream)

2nd and 3rd mouse buttons

2nd and 3rd mouse buttons are emulated using multitouch possibilities.

how to do

point or select what you need with 1 finger, after tap somewhere with 1 or 2 more fingers. this will couse a click of 2nd or 3rd mouse button.

coordinates of the click is the coordinates of the first finger.

copy/snarf - paste

copy-paste functionality is working now. but only with texts yet.

Inferno's copy paste buffer is separated from the Android copy-paste buffer. actually no way to copy-paste between Inferno and Android.

PNG image's resizing

Tk now is able to resize .png images on load - -bitmap :<new-max-size-in-points>:<png-path>.png

Autoscaling of windows' captions and main toolbar

  • main toolbar now autoscales to 1/20 of Inferno's activity height,
  • windows' captions autoscale to 1/30 of activity height,
  • lines in the main menu - to 1/30 of activity height. including of their icons/buttons

to recieve of autoscaling dis files should be recompiled and replaced with new ones. or to wait a new inferno-filetree.zip

v1.0b-0.4

6 years ago
  • keyboard now autosizes itself on start. no problem with too small buttons on hi res screens,

  • new option of Tk calls to resize SVG images (in future maybe png too) in time of loading. especially for autosizing of icons,

  • Tk scrolls now have 35 points width (to move them them by fingers). this is only for android. if this sources build for win/lin they will be of standard size.

  • a little changed caption of window(s). not blue now. and changed icons of buttons to svg ones

  • added ttf fonts. FantasqueSans.ttf free font (i took it from github) of size 30 now the main Tk font.

  • new inferno-filetree.zip. you should replace old file-tree (/sdcard/Inferno) with this one.

  • an archive with additional ttf fonts (ttf-ubuntu-linux.zip). they are from the Ubuntu installation. i think they all free. use them if you need (Ubuntu itself used Noto Sans font as main system font.

v1.0b-0.3

6 years ago
  • Inferno's .ttf font's reader now can render ttf fonts to different sizes. the size of a font is the first number in the .font file. (.ttf fonts should be specified in the .font file as inferno's regular subfonts)

  • also ttf reader loads now all glyphs in the .ttf font.