helloI have ported Inferno OS to Android (>4.0). unlike the floren one it is a regular native activity (.apk) and may be used in the standard android media with other android apps. (not needs to root)
how to install/try (only arm yet)========================1. go to [project's github home](https://github.com/bhgv/Inferno-OS_Android),2. go to releases download section,3. download were `inferno-os.apk` and `inferno-filetree.zip`4. unzip `inferno-filetree.zip` to android's sdcard root. it should be `/sdcard/Inferno`5. install `inferno-os.apk` and run it
(i remember, you did this by sending AT commands to /dev/tty of the modem. now also this may be done. directly from limbo, but it will require root)
@Ethan Grammatikidis |
* added support of command line.
/lib/startup/cmd_line.txt
should be single line. in format of regular emu call without the word 'emu'. command line has restriction: no any console, graphic params (size, channels) not used because they depend to device.
* added experimental support of .ttf fonts (thanks to Ethan Grammatikidis for example). to use:
create a standard font file. ex: 'test.font',
in places of subfonts write your ttf fonts,
use this font file
thats all
currently only chars from (0-255) and 18 size are available. but this only for testing
sources and apk are on the github
Inferno receives coordinates of taps/moves direcly from Android ndk without any conversion. i tryed on a couple of my phones/tablets and their taches worked correctly. i think your problem should be debugged deeper.
thanks to your example of building inferno-fonts with freetype i added support of `.ttf` fonts (and maybe other?) to use them by Inferno directly as a regular inferno-subfonts.
about tools to convert image formats in the inferno, i've added readers of png and svg. laiter may add readers of jpg and other. maybe writers to png and others too. it's a time.
w95-style headers are horrible. but! i'm not an artist. completelly. many of inferno-tk controls are skinnable ('-bitmap' key). but someone should besign its look first. for ex i like the look of my xubuntu, but can't to design something like it.
the source of windows' captions is in `/appl/alib/titlebar.b`
hello
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
--------
command line is loaded, parsed and utilised by inferno BEFORE any other settings. that time inferno don't know the user name, path and other.
inside inferno has a parser of command line only of this format and these parameters. actually i have very little time to program this Inferno's port as i should to work for money too, not only for free. and inside Inferno are many more important things to porting except the command line. i hope we understand each other.
---
NDK == Native Development Kit.
- gcc + llvm + libraries + heders for Android. the main toolchain from Google for C/C++ development for Android.
JNI = Java to Native Interface.
- the main interface to communicate between C/C++ and Java layers.
google, plese. your email name requires the best knowleges in the programming. called a mushroom, gets into the box.
checked issue with widths of some letters (ex: space) in the ttf fonts. now they are displayed normally.
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`.
@sirjofri
thanks for your feedback
@All
if anyone wants to support of development of this port of Inferno (or fork? it (inferno-os folder) may be compiled and used also with different OSes. for example i debug it on windows with the regular msvs debugger (it is better then ddd)),
he may donate me.
with your donations i may do more and better as i may work on Inferno more time.
really, supporting and investing to Inferno OS development and me is better and profitable as supporting and investing to budweiser and john mc cain.
a beer costs nothing it may be made by everyone. development of Inferno OS is a hard work and this may be done only by suitably qualified people.
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.
(new testing apk is in the releases download section as usual. or to build it by yourself. no updates in .dis files)
devgui (`#G`)
--------------
a try to do more easier and convenient way to work with Inferno's Tk.
as a bonus Tk widgets trees/info 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}
```
-------------
donate me and the work on Inferno-OS. just a couple of bottles of beer from you (by paypal) will significantly improve the condition and expand the possibilities of Inferno-OS!
maybe someone else will do this and do this faster and better? but this is perhaps 'maybe' and perhaps 'faster or better'.
but you are able to do this just now and just with a couple of bottles of beer from you!
* 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
1. "insert end 'a single line case 2"
1. "insert end 'a multiline
line 2
line 3
etc
"
### inferno-os tree itself
inferno-os tree may be build on Windows and Linux (not tested very well) separately from the Android wrapper. actually i debug it as a regular Windows app separately from Android wrapper. (maybe will move it to other git)
### donations:
they are necessery to long live and development of the Inferno OS and this fork. programming inside the inferno's kernel is a big work because there is no any info/help and other on its structure/functions and technics.
all info may only be obtained by careful examination of the source and experiments. it takes a lot of time and requires a lot of effort.
(I think this is the main reason of such slow development and not a big popularity - the difficulty to develop, change for their own purposes)
in addition, the code contains errors and inperfections (not too much, but they are). for example, in the basic Inferno, each Tk widget creates its own copy of its font(s) without checking the cache of fonts created earlier (i fixed it). there's no way to know the name of the image loaded into the widget with the '-bitmap' command (fixed it). etc
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)
// apk for testing in the releases download as usual
@Ethan Grammatikidis
thank you for your responce
inferno is not only limbo or sh. biggest part of Inferno is written on a regular C. it use 2 common types of interfaces: as Styx device and as a Limbo module. they both not too complex to understandment and using.
you want to program in Fort? it is no need to build it on Dis vm. build it on its own vm. all that you need - C based interpreter the code of it you are understanding and possible to modify.
because you should change 'main' function to the form of the limbo's internal module's interface (it's easie than a Styx device)
there to get C-based forth interpreter? may be here
https://github.com/howerj/libforth
(i searched 5 minutes. maybe you know better)
and you should build the forth interp chousen by you test how it compile and how it works before the start of embedding.
when you will be ready - ask me and i will describe you how to write interfaces of internal limbo's modules. and you may use all inferno's possibilities including Styx, network and tk directly from the Forth.
as for me, i planned to embed lua in the future as a middle level language. it is small, fast, highly portable, has a very simple but powerful syntax.
Inferno isn't only limbo vm and it's not an OS. it's a very good and powerful crossplatform framework/platform. and it is C-based.
(look: Android OS == Linux kernel + Java framework => Android OS - Linux kernel == Java framework)
and you may develop with Inferno on most of OSes without any additional porting, any slow virtual machines, any complex build system (Android) and so on.
only one thing is bad in the Inferno. its external look from the middle of 90s. i can't to draw, but this should be repired.
about non-technical work. i tryed this. i tryed many works. it doesn't work for me.
i get tired, distracted. for programming you have to look inside yourself. a case of meditation. for normal work - on the contrary. the switching time goes away. as a result - i manage to do less.
besides, i lose experience. doing normal work i also get experience. changing the work, i stop receiving it. and the old experience begins to be replaced by the experience of the new work.
also, it's less money. since i do not have experience in a new job, then i must start with 0. with a courier or volunteer salary.
i personally share time for myself. and by day and by hour. in different parts i do different things. just make notes on the border of the part to go back and forget the previous one (you need a little training in this)
also, very good results give trips. without changing the specialty. live in another city or another country. only in europe there are a lot of different places with very different traditions.
the programmer does not have enough fresh emotions. emotions are a fuel for creativity. therefore, programmers or designers spend them in an increased amount. they must be received.
but if you change your job, you will refuse both salary and experience.
remembered more. to less tired to do sometimes a week without coffee. you can drink tea. and at least once a week sleep well.
---
limbo modules are like java modules or python midules, or windows/linux dll/so (closer to com-objects) but smaller. executable from sh or wm or just a lib have differences only in the format of the 'init' function. but since the 'init' function is called manually, it may not be present at all.
ohh, a lot of letters..
the most important part:
-------------------------
@All
your donations are very important. your investments in Inferno will allow it to grow, realize its potential and your dreams and expectations.
you can write 1 program at once for all existing platforms, easily create local, cloud and distributed applications. realize even the most fantastic expectations about IoT and thick clients.
you will be able to translate your ideas, and not just to study and again study yet another complex technology that is almost identical to the previous ones in terms of capabilities!
@Ethan
to make a library module, just make a sh or wm module, debug it (inferno has a good graphical debugger. compile with -g key to produce debug symbols). then it will be ready just separate iterface part to .m file and change 'init' function.
about your forth interpreter
----------------------------
(a years ago i programmed on ps. a kind of forth for documents. ps, eps, pdf). i think this is a good idea. to get access to different inferno-possibilities you should only add file functions.
stack := "" :: ""; # init stack
stack = "new-member" :: stack; # push to stack
top_member = hd stack; stack = tl stack; # pop from stack.
also you need two hashtables of stacks (function is a long chunk of stack, a regular variable - short one)
easy way to calculate short hashes in the inferno i will write a little later if you want.
about the AGG.
--------------
i used AGG some time ago. agg does the best quality graphics. BUT, internally it is fully based on templates, not only C++. this makes it hard to port and debug. after, i used cairo. a little less excellent quality, but much easier in work with it.
streaming extensions to 9p
---------------------------
hmm, that do you mean? like an internet radio?
you may do this on the regular 9p/styx. without any extensions.
for example, all graphical operations go to/from devdraw. then you open a window - it opens devdraw files, then you close the window - it closes opened devdraw files. this frees all the associated with this window resources.
file in the inferno is not a just file with size. it is a named channel. do with it what you want.
about octopus
--------------
idea about gui as filetree was taken from octopus.
but about its protocol, i don't know. 9p is not so bad.
and it has some possibilities almost unused, but used, for example, in qnx. for dynamic loading, unloading and overloading in the case of a driver or service error.
(you may share resouces using 9p)
about inferno's GUI look
-------------------------
if you can - do it. if you like it, then it is also popular with someone else. there is no perfect interface design. there is must have a choice. if you have ideas - draw them. first in the corel.
if you have a few ideas - draw them.
personally i like the design of WeTab (but this will have to do a lot) and the design of my xubunu (xfce)
@ethan @hiro
i will see to aan. actually i don't know what to say about this. but will see. bad connections is a problem for IoT systems.
condolences to your pants. I hope it all ended well?
especially for you and everyone else, a collection of donations for work on the inferno and its expansion opens. who how much can! who at all can not - $1, who can a little - $10, who can - $100, who can well - $1000. Also donations of $10'000 and above are accepted.
donate. all your money will work for you, for your success, for your services and programs. one program - many platforms! and without brakes!
https://github.com/bhgv/Inferno-OS-bhgv
inferno os tree was separated from inferno-android. it is tested to build on linux (bld-lin.sh) and windows (mk install). but you should still to configure mkconfig, makemk etc.
it includes all changes for android: ttf and png in Tk, devgui, autosizing, but doesn't include android wrapper.
in the future i will base on this repo
small notes about the buffer sizes for 9p ops devread/devwrite:
-----------------------------------------------------------------------------------
qid.path (unsigned long long) is used for binding between calls. and it is transmitted in messages. it should be unique for the device/transaction, but no more requirements. the handle of the stream + the address of the top of the stack of buffers (or the address of the structure with the handle stream and the top of the stack) will be fine.
i think, to make a new Styx-device for continuous transmission and reception, taking as a basis a simple server like devaudio will be much easier, faster, more portable and will give fewer errors than the change of the Styx-protocol. also, it can be done in Limbo.