Code Monkey home page Code Monkey logo

aliceos-classic's Introduction

AliceOS logomark

An extensible, modern Ren'Py OS framework

About this project

AliceOS brings new features and experiences to any Ren'Py project. From giving users notifications to its extensibility with Applets, AliceOS makes any visual novel more exciting and enriching for its players and developers.

AliceOS is currently in a technical preview state, meaning that anything provided here is not fully ready for production. Future updates may change things in this release.

Basic features

  • Extensibility with Applets framework
  • Notfications and alert systems
  • Setup assistant to collect player name and agree to licenses
  • OEM branding settings
  • Much, much more

Building from source

To include AliceOS into your Ren'Py project, ensure that all of the source files are cloned into the game folder of the project.

Additional documentation can be found here: https://docs.aliceos.app.

Contributors

AliceOS has been made possible by these fellows and many more:

  • @alicerunsonfedora
  • @sr229
  • @GanstaKingofSA
  • @abduelhamit

aliceos-classic's People

Contributors

abduelhamit avatar alicerunsonfedora avatar bronya-rand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

dotjavafile

aliceos-classic's Issues

Create new structure for applets

Icons and applets should stay together, and other information should be logically structured, especially in the case of applets and manifests for those applets.

Mod doesn't start with the technical preview 1 of Alice OS

After I applied the new technical preview 1 of AliceOS, Doki Doki Forces refuses to start after compiling.

The error I got is this one.

`I'm sorry, but an uncaught exception occurred.

After initialization, but before game start.
File "renpy/common/00start.rpy", line 76, in _init_language
renpy.change_language(language)
File "game/Frameworks/UIView.rpy", line 39, in
font aliceos_regular
NameError: name 'aliceos_regular' is not defined`

Full traceback attached to the issue.
traceback.txt

Create SEAlice SIP

From @sr229 on Discord:

I'm deprecating GOBFADU entirely tho
For example MISSING_GOBFADU_COMPONENT is replaced with SE_MODULE_NFOUND
SIP checking goes in actuality by comparing the files against official ones via md5 hashes
SIP only happens once at first time and is async
All boot ops are required to be threaded and none would block boot or fail startup unless its > an SE_ILLEGAL_FILE error or SE_PROFILE_NVALID
ie:
SE_ILLEGAL_FILE (game.rpyc does not match official)
all releases will now include a md5sums.txt file which will include all needed hashes
and the really controversial part
SE_ILLEGAL_CALL
SEAlice will enforce system call restrictions that has a security implication

Implement new console as an Applet

We should start getting the command-line interface working for AliceOS and have it include basic functions expected from a UNIX shell (mostly).

Create Setup Assistant

Objective

The Setup Assistant should be a standardized set of instructions that all Ren'Py projects should follow. These more or less include the following (may or may not be in order):

  • Welcome screen
  • Prompt for user's name
  • Setting default permissions for applets
  • Enabling or disabling certain applets
  • Review of GNU GPL v3
  • Review of GOBFADU policy
  • <Spot to be edited at AliceOS OEM's discretion>
  • "Finalizing setup" screen

Design

Design wise, we might want to opt for something like the macOS Setup Assistant or the Windows 10 post-install assistant:
macOS
Windows

Setup of AliceOS in Doki Doki Forces fails when it has to show the "System Modified by Manufacturer" alert

Steps:

  • I set define aliceos.oem_mode = True in both OEMSettings.rpy and DefaultSettings.rpy
  • The boot screen show the white "AliceOS" logo with the "Powered by" text and my Ghost Sayori chibi, as I expected.
  • Setup starts, but when the "System Modified by Manufacturer" alert dialog has to appear, the mod crashes.
  • After the error appears, setup can't advance to the next steps, and clicking Ignore doesn't fix anything, having to close the game.

I suppose that the "System Modified" dialog has to show, because it's critical to show that "my" AliceOS copy was "modified".

Included the traceback and a screenshot.
traceback.txt
captura

Personal note: it would be great if I could have some support as the Sayonika mod has for having an "OEM" version with Sonic related fonts and art replacing some Alice files, since I supported this project since day one also.

Autobuild base RPAs for distribution

From the beta docs:

Alternatively, developers can make use of the AliceOS Module system. Developers can download the base RPA package for their respective version of Ren'Py (6.99.12.4 or 7+) and continue to build off of this with their own source code. This gives developers and OEMs an easier method to updating the AliceOS core without needing to completely modify the existing installation.

Proposed To-Dos

  • Create autobuild script to build for 6.99.12 and current version of Ren'Py
  • Create (hopefully) a Ren'Py version-agnostic RPA
  • Use a modular system to define custom packages on top of AliceOS RPAs

Replace app manifest in app's code with manifest.json

The defaults usually contain information inside of the app code itself with an abbreviation. Programmatically, this can present a problem because it'll confuse AliceOS as it wouldn't be able to identify what to pull and where to pull from.

GOBFADU fails to load

I've attempted to include the GOBFADU policy into the Bootloader, but I am experiencing a few issues.

  • A lot of the if statements don't have their respective colons.
  • Also, the same function is defined in several places, confusing the compiler on which one to use.

@GanstaKingofSA , Please make sure the code is right and fix the functions errors. (#8 )

Rewrite PISA to use screens

The current implementation of the Setup assistant is at most messy. It uses a whole mess of images and text that can clip on top of each other. For example, if the End User License Agreement is too long, it will clip into other text, as demonstrated by @cpgyuri :

Example of overlay issues

Proposal

We should make use of screens and screen language to reimplement the Setup assistant. If needed, we can call functions to set persistent data as needed. This should offer levels of flexibility and expandability for things with longer text as well as positioning. To start, I think we can make use of what's already available in UserNotifications.rpy with the alert() screen.

Create a modular boot screen

Similar to the new Pisa and RSOD, we should make a modular boot screen system that allows for developers to customize the logo, toggle on or off the "Powered by AliceOS" text, changing the avatar, etc.

Add functionality that verifies first-party domains

Thus far, SEAlice can determine that an applet's identifier is valid if it is able to load the domain and not receive a 404 error (this may need some polishing). However, there should be a system in place to determine the following:

  • Whether the domain is first-party
  • Whether the applet with said domain is an actual applet from a first-party

Applet ask permissions fails to write variable

The following code fails to write the variables (notification_permission, filesystem_permission, adminstrator_permission) to 'yes' and assumes that the value is 'no':

if pm_notify in self.permissions:
                renpy.call_screen("ask_permission", app_name=self.long_name, action=allow_un, no_action=Return(1), yes_action=[SetVariable("notification_permission", "yes"), Return(0)])

            if pm_files in self.permissions:
                renpy.call_screen("ask_permission", app_name=self.long_name, action=allow_fs, no_action=Return(1), yes_action=[SetVariable("filesystem_permission", "yes"), Return(0)])

            if pm_sysadmin in self.permissions:
                renpy.call_screen("ask_permission", app_name=self.long_name, action=allow_sip, no_action=Return(1), yes_action=[SetVariable("administrator_permission", "yes"), Return(0)])

Design a new icon guideline system

Currently, our applets and other sources use a mixture of two different design languages. We should have a unified, translatable icon design language.

Proposed Requirements

  • Must be scalable or pixel-fitted per icon size
  • Should maintain a modern design or fit the AliceOS design spec

Ideas

  • Using Material Icons as a base set, but app icons build off of them
  • Gradients over flat colors (?)

Define standard for error message generation

Typically, the RSODs and AliceOS errors in generally follow the same method of naming errors as Microsoft does with BSODs. However, it can get difficult trying to name it in this fashion. We should define a way to write errors that are human readable/understandable and are unique to AliceOS.

Design "Express mode" for Pisa

With recent changes in Sayo-nika/koizumi, it seems more plausible if we offer developers a way to make an "Express mode" for Setup.

Example from Sayonika

Proposal

We create a new Setup assistant mode (Express mode) that's easily configurable in a few ways:

  • Only display game's disclaimer at start and incorporate Setup elements elsewhere
  • Shorten steps in a single screen
  • "Use express settings" mode (agree and automatically recommended settings like in Windows 8+)

TypeError non-iterable NoneType object when loading blocked notification from save point

Version of AliceOS
Technical Preview 1

Describe the bug
Everytime I save and then load Doki Forces, be after closing the game or not, when the game reaches a part in which a Ren'py alert screen or an AliceOS alert or notification pop-up must appear, the game crashes with a TypeError: argument of type 'NoneType' is not iterable bug. The first time it happens is when Ren'Py had to show the "Hint: you can skip..." alert. After I got this error, all my saves become unstable, and if it's a save in the poem minigame when this happens, it doesn't load again.

To Reproduce
Steps to reproduce the behavior:

  1. Save your game. Optionally close the game and open it again.
  2. Click on Load and load your save.
  3. Skip or advance the game to a part of the script in which a Ren'py or AliceOS alert must show.
  4. See the error.

Expected behavior
The game was expected to show the Ren'Py notification dialog or the AliceOS alert or notification pop-up, but it crashes to the error instead. Since AliceOS replaces the Ren'Py dialogue and alert interfaces, the Ren'Py standard alerts crash too.

Screenshots
Added screenshot and traceback.txt.
captura2

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Google Chrome
  • Version: 68.0.3440.106 (Chrome)

Smartphone (please complete the following information):
not aplicable.

Traceback (if provided)

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 63, in script call
    call chapter2_mid from _call_chapter2_mid
  File "game/studiopolisCh2b.rpy", line 6, in script call
    call expression nextscene
  File "game/script-exclusives-monika.rpy", line 175, in script
    $ forces.edmsession_music("Hardwell & KSHMR - Power")
  File "game/script-exclusives-monika.rpy", line 175, in <module>
    $ forces.edmsession_music("Hardwell & KSHMR - Power")
  File "game/Applets/Forces/Forces.rpy", line 51, in edmsession_music
    self.send_temporary_notification("DJ Sona", "You are listening to: " + song + "!", action=Return(1))
  File "game/Frameworks/Applets.rpy", line 110, in send_temporary_notification
    renpy.call_screen("alert", title="Notifications Are Disabled", message="Notifications are disabled for this Applet. Please check your permissions.", ok_action=Return(1))
TypeError: argument of type 'NoneType' is not iterable

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 63, in script call
    call chapter2_mid from _call_chapter2_mid
  File "game/studiopolisCh2b.rpy", line 6, in script call
    call expression nextscene
  File "game/script-exclusives-monika.rpy", line 175, in script
    $ forces.edmsession_music("Hardwell & KSHMR - Power")
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\ast.py", line 814, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\python.py", line 1719, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/script-exclusives-monika.rpy", line 175, in <module>
    $ forces.edmsession_music("Hardwell & KSHMR - Power")
  File "game/Applets/Forces/Forces.rpy", line 51, in edmsession_music
    self.send_temporary_notification("DJ Sona", "You are listening to: " + song + "!", action=Return(1))
  File "game/Frameworks/Applets.rpy", line 110, in send_temporary_notification
    renpy.call_screen("alert", title="Notifications Are Disabled", message="Notifications are disabled for this Applet. Please check your permissions.", ok_action=Return(1))
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\exports.py", line 2526, in call_screen
    rv = renpy.ui.interact(mouse="screen", type="screen", roll_forward=roll_forward)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\ui.py", line 285, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2526, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\display\core.py", line 2883, in interact_core
    self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\display\core.py", line 1955, in draw_screen
    renpy.config.screen_height,
  File "renpy/display/render.pyx", line 427, in renpy.display.render.render_screen (gen\renpy.display.render.c:6806)
    rv = render(root, width, height, 0, 0)
  File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
    rv = d.render(widtho, heighto, st, at)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 693, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
    rv = d.render(widtho, heighto, st, at)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 693, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
    rv = d.render(widtho, heighto, st, at)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 693, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
    rv = d.render(widtho, heighto, st, at)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\display\screen.py", line 623, in render
    child = renpy.display.render.render(self.child, w, h, st, at)
  File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
    rv = d.render(widtho, heighto, st, at)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 693, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
    rv = d.render(widtho, heighto, st, at)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 1081, in render
    st, at)
  File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
    rv = d.render(widtho, heighto, st, at)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 895, in render
    surf = render(d, width - x, rh, cst, cat)
  File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
    rv = d.render(widtho, heighto, st, at)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\display\layout.py", line 1081, in render
    st, at)
  File "renpy/display/render.pyx", line 110, in renpy.display.render.render (gen\renpy.display.render.c:3440)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 196, in renpy.display.render.render (gen\renpy.display.render.c:2978)
    rv = d.render(widtho, heighto, st, at)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\text\text.py", line 1732, in render
    virtual_layout = Layout(self, width, height, renders, drawable_res=False, size_only=True)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\text\text.py", line 574, in __init__
    glyphs = ts.glyphs(s, self)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\text\text.py", line 236, in glyphs
    fo = font.get_font(self.font, self.size, self.bold, self.italic, 0, self.antialias, self.vertical, self.hinting, layout.oversample)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\text\font.py", line 648, in get_font
    face = load_face(fn)
  File "C:\Users\Neil\Desktop\RenPy\renpy-6.99.12.4-sdk\renpy\text\font.py", line 558, in load_face
    if "@" in fn:
TypeError: argument of type 'NoneType' is not iterable

Windows-8-6.2.9200
Ren'Py 6.99.12.4.2187
Doki Doki Forces DokiDokiForcesBeta6

Additional context
The notification that was about to show when the error happened is one about that you didn't give permissions to your AliceOS applets. This happens everytime i open my game again or load a save. It's very frustating that you have to program in each chapter the "give permissions" dialogue or the "override perms" code.

Enforce package identifier for apps

Frankly speaking, an applet must have a package identifier to be able to be identified properly from first party apps.

Package Naming

You have the option of the following:

Android/GNOME/GTK App package identifier

  • io.sayonika.VisualStudio.Monaco

.NET package identifier

  • Sayonika.VisualStudio.Monaco

This is to allow a more consistent third-party ecosystem

Reserved package domains

Following Package domains are reserved for first-party.

  • io.aliceos.<appname>
  • moe.aliceos.<appname>
  • AliceOS.<appname>
  • net.marquiskurt.<appname>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.