Gerold55 / laptop

Introducing the MineTest Laptop Mod
Other
26 stars 14 forks source link

File system layout #17

Closed bell07 closed 6 years ago

bell07 commented 6 years ago

The file manager is already in discussion but it is not clear what files are and how the fs-layout should be. We have lua-tables ony :-( What should be visible in the file-manager ? A full emulated filesystem tree?

Design notes and todo's

Storage => transparent table: Inside the app an lua table can be obtained and used without worry about saving data

Format / Layouts The HDD and Cloud does have own per-app layout. That means each app have own sub-table like cloud["appname"] to store data in "proprietary" format. For Item-Meta I still search for idea Each item should have custom groups for allowed data? Like "laptop_text" means it is possible to store text-app data to usb-stick or "laptop_os" group to boot an OS from the floppy (just checked by old-OS-launcher to move away "please insert floppy" screen

App related tasks support

bell07 commented 6 years ago

@Gerold55 please set Label to "discussion", I do not have permission for this on your repo

bell07 commented 6 years ago

... Item-Meta added to the list above

Gerold55 commented 6 years ago

Could the file system be virtual. Meaning it creates a folder from which you can access saved documents game high scores and exported "emails" among other things that could be added. Like made on PC art etc. etc.

bell07 commented 6 years ago

Yes, virtual. In the current implementation we have the table os.appdata that is "/" or "C:\" virtually. A special folder (=subtable) "os" axists for system settings and then a subfolder for each app, with unstructered data. At the time I do not see any benefit to show this data. For example the notepad-app: there is no file name, just the text.

To get an full-featured VFS we need more apps that can use it. Mails are stored usually not in file system but in a mail-box. Game high-scores, usually app internal / readable with the game only. Which content should be placed usefull in the VFS in addition? Which use-cases?

Gerold55 commented 6 years ago

For the notepad to be able to save documents. Also if someone makes a pixel painter soon you will be able to save/download your art. That's what I was thinking :)

Gerold55 commented 6 years ago

The file manager can wait until we have more apps made and more updates/development is done. Focus should be to get it to work the way we all want it to.

bell07 commented 6 years ago

I think the current metadata (=hdd) layout can be applied to other storages The API at the time is data = app:get_storage_ref(appname) that result a transparent stored lua table for data. In addition I plan:

yes, we need an floppy item to be created for data transport;-) And no, I do not write an API for brain ;-)

Gerold55 commented 6 years ago

@bell07 USB drive texture has been added.

bell07 commented 6 years ago

Great! If you like you can add the ithem definition already. The Usage I'll develop after mail app. The framework needs to be anhanced (USB-Slot is missing) with simple app to connect the stick (1x1 inventory to place the stick) and check in on_punch if punched by stick. First usage will be "Backup/Restore all laptop data", integrated in the USB-Connection app.. Later (I really need more then 24 h time each day :()

Gerold55 commented 6 years ago

Yeah πŸ˜‚πŸ˜‚πŸ˜‚ sorry I just like to check in to see how it's going sorry for all the constant asking ☺ Thanks for all your help on this mod 😊

Gerold55 commented 6 years ago

Which one do y'all like better? @bell07 @v-rob @tobyplowy laptop_usb laptop_usb_2

tobyplowy commented 6 years ago

I like the shape of the second one (simple and realistic) but the colors on the first one are better

bell07 commented 6 years ago

Second one. More cubic for a cubic world

bell07 commented 6 years ago

I decided to write only one app:get_cloud_storage_ref(appname) method that is "public". The application needs to handle which data which user should be able to see. I used it aleady in the mail app in this way. I defined in app the cloud_appdata[username] is the personal storage and be able to access to sender.outbox and receiverinbox at the same time trough the same lua table

bell07 commented 6 years ago

Other queston: Notepad and "Cloud access":

  1. Store text on computer is done
  2. Store text on USB should be possible
  3. Store text in private "Cloud" area? => Do we need private cloud? Because the HDD and USB are less used if private cloud exists
  4. Store texts in public cloud: Visible for all players on all laptops: Do we need something like?

The Cloud is powerfull. Do we need any restritcions in usage? Or do we need cloud anarchy?

Gerold55 commented 6 years ago

It needs to be as simple as possible. Is it possible to just have a private cloud to store emails? The USB can be used for text documents and for game memory transportation.

bell07 commented 6 years ago

The mails are implemented in cloud. USB is missing in framework, but if implemented there is no difference from developer site which framework is used. Therefore the question for "game design" site. It is simple possible but does it make sense? To much cloud get the HDD and Floppy obsolete (like in real-life)

Gerold55 commented 6 years ago

The USB could also be used for a separate functionality somehow. We just gotta figure out for what though.

Gerold55 commented 6 years ago

I think a floppy could be used for the old computer so that it can perform/boot up properly.

Gerold55 commented 6 years ago

@bell07 the USB can be used to share different things but also be a neat way to gift someone something without having to email it. Or something like that. But it can also be used for transferring text documents and other things.

bell07 commented 6 years ago

I think a floppy could be used for the old computer so that it can perform/boot up properly.

Nice idea! We can already create a simple custom launcher for old computer containing only the "Please insert disk" image. The OS-Boot from Floppy I need to implement at later time. Du you have such image?

At the time all computers have the same capabilities. With floppy support I need to introduce some additional hardware attributes like external_storage_items = {"laptop:usb_disk", "laptop:floppy" } and external_storage_boot_launcher = {"oldcomputer_launcher" } to be able to get different device capabilities.

Gerold55 commented 6 years ago

I'll work on an image for the Please Insert Disk. It'll be done soon someone can edit and update it if they like once I finish it

bell07 commented 6 years ago

the USB can be used to share different things

The first apps I plan to do is "Backup/Restore computer" to be able to transfer all content to other computer. At the next enhance the text app to use hdd and floppy. The question was if it is god or bad to be able to save text to the cloud like mail

Gerold55 commented 6 years ago

Maybe have a restriction so that you can only save pics to your flash drive and save messages to the cloud or just use the USB drive to back up everything.

bell07 commented 6 years ago

If an restriction is needed, the restriction needs to be developed in the app, like if text can be stored in cloud or not. So we need take the decision if yes or not for each app

Gerold55 commented 6 years ago

Maybe it should depend on the app developer having it enabled so the developer of an app has the ability to do so. For main PC you can either use the hdd or the cloud and the USB can be used for extra backup

bell07 commented 6 years ago

I'll work on an image for the Please Insert Disk.

Can you tell me the file name? I have done the mini-launcher and adjustments to get custom launcher work (there was some bugs)

bell07 commented 6 years ago

"minetest_launcher_insert_floppy.png" ? I prepare an PR so you can merge it if the image is done

Gerold55 commented 6 years ago

laptop_launcher_insert_floppy

Gerold55 commented 6 years ago

Where are we on this?

bell07 commented 6 years ago

I am working on this. You can see the current state in my master.

Already done the "draft" storage app, so you can insert already the disk. In survival if you dig the computer, the disk is saved in computer-item-meta and restored on place, so the disk and disk-content does not get lost.

bell07 commented 6 years ago

I updated the first topic. Today I wrote the removable items manager for laptops. Not eye candy but functional. Maybe anyone can adjust the formspecs?

Next setup configured: laptop:core have USB only laptop:cube and laptop:monitor3 does have floppy only laptop:monitor2, laptop:monitor4 and laptop:laptop uses both (default)

USB can take and restore backups OR formatted for data storage Floppy can boot OldOS OR formatted for data storage

THe OldOS Boot and usage of data storage by notepad still not done

bell07 commented 6 years ago

OldOS boots the default launcher till own DOS-like launcher is implemented

bell07 commented 6 years ago

Some redesign needed to get the proper data handling. I plan to introduce the "Block Device" object that can be obtained from OS-Object. The next types shold be supported:

The block devices can have different formats:

Floppy can be boot or data USB-Stick can be backup or data RAM HDD and Cloud are always data

bell07 commented 6 years ago

All done. The documentation needs to be updated

bell07 commented 6 years ago

@Gerold55 The Layout changes should be finished. I hope it is the last time for big and mayor system rewrite. Please test all apps and functionalities on app computers. If all is fine I will prepare an PR for the changes.

We cannot just merge the development branch because of Node-Color related changes I need temporary remove at first.

Gerold55 commented 6 years ago

Works properly as far as I can tell via testing

bell07 commented 6 years ago

I started to write a "select/open/save file" dialog usable from all apps. The showcase is the sticky-note app, so the #43 will be done with the next "changes pack"

bell07 commented 6 years ago

@Gerold55 Please retest my changes on stickynote app. I did the last changes, disabled node-coloring that was active for testing reason, fixed a bug with node infotext. Now the infotext can be per-node (not tested) If you are done with testing I create the PR with all changes

bell07 commented 6 years ago

This issue is solved for me. The "Block devices" and "storage"-partitions are the base layout. The rest is depending on apps and needs to be discussed in apps