Page 3 of 24 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 239

Thread: Anyone got MIR working in raring?

  1. #21
    Join Date
    Jun 2010
    Beans
    699

    Re: Anyone got MIR working in raring?

    This developer would be able to add CalDAV support for sure:

    https://syncevolution.org/

    Because i do imagine this is quite big task. For e-mail (back-end) app Yorba could be approached?

  2. #22
    Join Date
    Jun 2010
    Beans
    699

    Re: Anyone got MIR working in raring?

    When all this things fall into place we will get Ubuntu DE i guess. At least on mobile.

    Could some of the work from Sailfish OS be used? At least at the beginning to boost things up and then make in-house solutions if it makes sense but i think it would make more sense to start pushing devices and attracting 3rd party devs and to work on Mir in the beginning for example because it will take a lot of effort!

  3. #23
    Join Date
    Sep 2010
    Beans
    9,205
    Distro
    Ubuntu Budgie 17.10 Artful Aardvark

    Re: Anyone got MIR working in raring?

    Quote Originally Posted by grahammechanical View Post
    At least the apps install now. I will try later tonight.

    Edit: The PPA now works in Raring and the Touch Core Apps install. Which is progress. But they do not load. Pity. I would think that as these are the core apps of the Ubuntu touch devices and MIR is being developed as the display driver specifically for those Touch devices, then getting them running under MIR is the aim. I tried replacing a mir_demo name with a core app name but nothing happened except a blank screen. Still, we are on our way. Not going very fast, I admit. At least the development has been opened up to anyone who is a bit curious.
    I think we are more or less getting framework files at this point, but, the mir server does work. I think it is just the command line sturcture that we have to wait for (or keep experimenting with). Watch,wait and experiment. If I come up with anything I'll post it here first.

    Still no word from Voss. His email box is probably crammed with bug reports.

    EDIT:

    18MB more of mir-doc files in updates.
    Last edited by ventrical; March 14th, 2013 at 07:48 AM.

  4. #24
    Join Date
    Sep 2010
    Beans
    9,205
    Distro
    Ubuntu Budgie 17.10 Artful Aardvark

    Re: Anyone got MIR working in raring?

    Quote Originally Posted by EgoGratis View Post
    When all this things fall into place we will get Ubuntu DE i guess. At least on mobile.

    Could some of the work from Sailfish OS be used?
    I was presented with this 2 days ago but I am trying to focus on what I can do with MIR first and I had to give myself a refresh course in X and terminal commands.

    I may even try it.

  5. #25
    Join Date
    Sep 2010
    Beans
    9,205
    Distro
    Ubuntu Budgie 17.10 Artful Aardvark

    Re: Anyone got MIR working in raring?

    The graphics we see when we use;

    (sleep 5; mir_demo_client_accelerated)


    is run by this script here:

    Code:
    /*
     * Copyright © 2012 Canonical Ltd.
     *
     * This program is free software: you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 3 as
     * published by the Free Software Foundation.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     *
     * Authored by: Kevin DuBois   <kevin.dubois@canonical.com>
     */
    
    #include "mir_toolkit/mir_client_library.h"
    #include "mir/draw/graphics.h"
    
    #include <assert.h>
    #include <signal.h>
    #include <string.h>
    #include <stdio.h>
    #include <unistd.h>
    #include <getopt.h>
    #include <EGL/egl.h>
    #include <GLES2/gl2.h>
    
    static char const *socket_file = "/tmp/mir_socket";
    static MirConnection *connection = 0;
    static MirSurface *surface = 0;
    
    static void set_connection(MirConnection *new_connection, void * context)
    {
        (void)context;
        connection = new_connection;
    }
    
    static void surface_create_callback(MirSurface *new_surface, void *context)
    {
        (void)context;
        surface = new_surface;
    }
    
    static void surface_release_callback(MirSurface *old_surface, void *context)
    {
        (void)old_surface;
        (void)context;
        surface = 0;
    }
    
    int main(int argc, char* argv[])
    {
        int arg;
        opterr = 0;
        while ((arg = getopt (argc, argv, "hf:")) != -1)
        {
            switch (arg)
            {
            case 'f':
                socket_file = optarg;
                break;
    
            case '?':
            case 'h':
            default:
                puts(argv[0]);
                puts("Usage:");
                puts("    -f <socket filename>");
                puts("    -h: this help text");
                return -1;
            }
        }
    
        puts("Starting");
    
        mir_wait_for(mir_connect(socket_file, __PRETTY_FUNCTION__, set_connection, 0));
        puts("Connected");
    
        assert(connection != NULL);
        assert(mir_connection_is_valid(connection));
        assert(strcmp(mir_connection_get_error_message(connection), "") == 0);
    
        MirDisplayInfo display_info;
        mir_connection_get_display_info(connection, &display_info);
        assert(display_info.supported_pixel_format_items > 0);
    
        MirPixelFormat pixel_format = display_info.supported_pixel_format[0];
    
        MirSurfaceParameters const request_params =
            {__PRETTY_FUNCTION__, 640, 480, pixel_format, mir_buffer_usage_hardware};
        mir_wait_for(mir_surface_create(connection, &request_params, surface_create_callback, 0));
        puts("Surface created");
    
        assert(surface != NULL);
        assert(mir_surface_is_valid(surface));
        assert(strcmp(mir_surface_get_error_message(surface), "") == 0);
    
        /* egl setup */
        int major, minor, n, rc;
        EGLDisplay disp;
        EGLContext context;
        EGLSurface egl_surface;
        EGLConfig egl_config;
        EGLint attribs[] = {
            EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
            EGL_RED_SIZE, 8,
            EGL_GREEN_SIZE, 8,
            EGL_BLUE_SIZE, 8,
            EGL_ALPHA_SIZE, 8,
            EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
            EGL_NONE };
        EGLint context_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
    
        EGLNativeDisplayType native_display = (EGLNativeDisplayType) mir_connection_get_egl_native_display(connection);
        EGLNativeWindowType native_window = (EGLNativeWindowType) mir_surface_get_egl_native_window(surface);
        assert(native_window != NULL);
    
        disp = eglGetDisplay(native_display);
        assert(disp != EGL_NO_DISPLAY);
    
        rc = eglInitialize(disp, &major, &minor);
        assert(rc == EGL_TRUE);
        assert(major == 1);
        assert(minor == 4);
    
        rc = eglChooseConfig(disp, attribs, &egl_config, 1, &n);
        assert(rc == EGL_TRUE);
        assert(n == 1);
    
        egl_surface = eglCreateWindowSurface(disp, egl_config, native_window, NULL);
        assert(egl_surface != EGL_NO_SURFACE);
    
        context = eglCreateContext(disp, egl_config, EGL_NO_CONTEXT, context_attribs);
        assert(egl_surface != EGL_NO_CONTEXT);
    
        rc = eglMakeCurrent(disp, egl_surface, egl_surface, context);
        assert(rc == EGL_TRUE);
    
        mir::draw::glAnimationBasic gl_animation;
        gl_animation.init_gl();
    
        for(;;)
        {
            gl_animation.render_gl();
            rc = eglSwapBuffers(disp, egl_surface);
            assert(rc == EGL_TRUE);
    
            usleep(167);//60fps
    
            gl_animation.step();
        }
    
        eglDestroySurface(disp, egl_surface);
        eglDestroyContext(disp, context);
        eglTerminate(disp);
    
        mir_wait_for(mir_surface_release(surface, surface_release_callback, 0));
        puts("Surface released");
    
        mir_connection_release(connection);
        puts("Connection released");
    
        return 0;
    }
    so we can adjust the variables to get different results.

    More to come.

    Edit:

    If you want to examine all of the files for demo_examples then go to:

    /usr/share/doc/libmirclient-demos/examples

    You can open and examine them. They are written in C or C++. If you have any basic programming skill they are easily understood and rather simple subroutines.


    I am going to try to switch some variables a little later on and see what results I get. The moving image that we get comes from the data in the file mir_image.h and or graphics.h data.
    Last edited by ventrical; March 14th, 2013 at 08:22 AM.

  6. #26
    Join Date
    Sep 2010
    Beans
    9,205
    Distro
    Ubuntu Budgie 17.10 Artful Aardvark

    Re: Anyone got MIR working in raring?

    Quote Originally Posted by ventrical View Post
    The graphics we see when we use;

    (sleep 5; mir_demo_client_accelerated)


    is run by this script here:

    Code:
    /*
     * Copyright © 2012 Canonical Ltd.
     *
     * This program is free software: you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 3 as
     * published by the Free Software Foundation.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     *
     * Authored by: Kevin DuBois   <kevin.dubois@canonical.com>
     */
    
    #include "mir_toolkit/mir_client_library.h"
    #include "mir/draw/graphics.h"
    
    #include <assert.h>
    #include <signal.h>
    #include <string.h>
    #include <stdio.h>
    #include <unistd.h>
    #include <getopt.h>
    #include <EGL/egl.h>
    #include <GLES2/gl2.h>
    
    static char const *socket_file = "/tmp/mir_socket";
    static MirConnection *connection = 0;
    static MirSurface *surface = 0;
    
    static void set_connection(MirConnection *new_connection, void * context)
    {
        (void)context;
        connection = new_connection;
    }
    
    static void surface_create_callback(MirSurface *new_surface, void *context)
    {
        (void)context;
        surface = new_surface;
    }
    
    static void surface_release_callback(MirSurface *old_surface, void *context)
    {
        (void)old_surface;
        (void)context;
        surface = 0;
    }
    
    int main(int argc, char* argv[])
    {
        int arg;
        opterr = 0;
        while ((arg = getopt (argc, argv, "hf:")) != -1)
        {
            switch (arg)
            {
            case 'f':
                socket_file = optarg;
                break;
    
            case '?':
            case 'h':
            default:
                puts(argv[0]);
                puts("Usage:");
                puts("    -f <socket filename>");
                puts("    -h: this help text");
                return -1;
            }
        }
    
        puts("Starting");
    
        mir_wait_for(mir_connect(socket_file, __PRETTY_FUNCTION__, set_connection, 0));
        puts("Connected");
    
        assert(connection != NULL);
        assert(mir_connection_is_valid(connection));
        assert(strcmp(mir_connection_get_error_message(connection), "") == 0);
    
        MirDisplayInfo display_info;
        mir_connection_get_display_info(connection, &display_info);
        assert(display_info.supported_pixel_format_items > 0);
    
        MirPixelFormat pixel_format = display_info.supported_pixel_format[0];
    
        MirSurfaceParameters const request_params =
            {__PRETTY_FUNCTION__, 640, 480, pixel_format, mir_buffer_usage_hardware};
        mir_wait_for(mir_surface_create(connection, &request_params, surface_create_callback, 0));
        puts("Surface created");
    
        assert(surface != NULL);
        assert(mir_surface_is_valid(surface));
        assert(strcmp(mir_surface_get_error_message(surface), "") == 0);
    
        /* egl setup */
        int major, minor, n, rc;
        EGLDisplay disp;
        EGLContext context;
        EGLSurface egl_surface;
        EGLConfig egl_config;
        EGLint attribs[] = {
            EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
            EGL_RED_SIZE, 8,
            EGL_GREEN_SIZE, 8,
            EGL_BLUE_SIZE, 8,
            EGL_ALPHA_SIZE, 8,
            EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
            EGL_NONE };
        EGLint context_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
    
        EGLNativeDisplayType native_display = (EGLNativeDisplayType) mir_connection_get_egl_native_display(connection);
        EGLNativeWindowType native_window = (EGLNativeWindowType) mir_surface_get_egl_native_window(surface);
        assert(native_window != NULL);
    
        disp = eglGetDisplay(native_display);
        assert(disp != EGL_NO_DISPLAY);
    
        rc = eglInitialize(disp, &major, &minor);
        assert(rc == EGL_TRUE);
        assert(major == 1);
        assert(minor == 4);
    
        rc = eglChooseConfig(disp, attribs, &egl_config, 1, &n);
        assert(rc == EGL_TRUE);
        assert(n == 1);
    
        egl_surface = eglCreateWindowSurface(disp, egl_config, native_window, NULL);
        assert(egl_surface != EGL_NO_SURFACE);
    
        context = eglCreateContext(disp, egl_config, EGL_NO_CONTEXT, context_attribs);
        assert(egl_surface != EGL_NO_CONTEXT);
    
        rc = eglMakeCurrent(disp, egl_surface, egl_surface, context);
        assert(rc == EGL_TRUE);
    
        mir::draw::glAnimationBasic gl_animation;
        gl_animation.init_gl();
    
        for(;;)
        {
            gl_animation.render_gl();
            rc = eglSwapBuffers(disp, egl_surface);
            assert(rc == EGL_TRUE);
    
            usleep(167);//60fps
    
            gl_animation.step();
        }
    
        eglDestroySurface(disp, egl_surface);
        eglDestroyContext(disp, context);
        eglTerminate(disp);
    
        mir_wait_for(mir_surface_release(surface, surface_release_callback, 0));
        puts("Surface released");
    
        mir_connection_release(connection);
        puts("Connection released");
    
        return 0;
    }
    so we can adjust the variables to get different results.

    More to come.

    Edit:

    If you want to examine all of the files for demo_examples then go to:

    /usr/share/doc/libmirclient-demos/examples

    You can open and examine them. They are written in C or C++. If you have any basic programming skill they are easily understood and rather simple subroutines.


    I am going to try to switch some variables a little later on and see what results I get. The moving image that we get comes from the data in the file mir_image.h and or graphics.h data.
    Any ideas on a good compiler to make this executable? I have to replace mir_demo_client_accelerated executable with the new script compiled into executable format.

    Thanks

  7. #27
    Join Date
    Jun 2006
    Location
    Nux Jam
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Anyone got MIR working in raring?

    Try upp (u++)

  8. #28
    Join Date
    Sep 2010
    Beans
    9,205
    Distro
    Ubuntu Budgie 17.10 Artful Aardvark

    Re: Anyone got MIR working in raring?

    Quote Originally Posted by dino99 View Post
    Try upp (u++)
    yes.. or g++

    Thanks

  9. #29
    Join Date
    Sep 2010
    Beans
    9,205
    Distro
    Ubuntu Budgie 17.10 Artful Aardvark

    Re: Anyone got MIR working in raring?

    Run Midnight Commander in Mir

    I think I cracked the demo code.

    If you want you can try this code to run Midnight Commander on the MIR server.
    First you have to have MC installed.

    Code:
    sudo apt-get install mc
    After having all of you MIR files updated from the ppa run the code below on a terminal (CTRL+ALT+F1)

    Code:
    (sleep 200; mir) & mc ; kill $!
    The 200 represents 200 seconds that Midnight Commander will run *MC* on the mir server**. It will be fully functional but seems to terminate after the alotted time frame. To quit Midnight Commander just hit F10 then <yes> . Mir will exit normally. If it goes past timeframe it will terminate and you will need reboot CTRL+ALT+DEL.


    This test took place on a PC with these graphics card parameters:

    Code:
     *-display
                 description: VGA compatible controller
                 product: 82915G/GV/910GL Integrated Graphics Controller
                 vendor: Intel Corporation
                 physical id: 2
                 bus info: pci@0000:00:02.0
                 version: 04
                 width: 32 bits
                 clock: 33MHz
                 capabilities: vga_controller bus_master cap_list rom
                 configuration: driver=i915 latency=0
    and will try on Nvidia and ATi also.




    Regards
    Ventrical
    Last edited by ventrical; March 14th, 2013 at 04:53 PM. Reason: addendum

  10. #30
    Join Date
    Mar 2006
    Beans
    4,405
    Distro
    Ubuntu Development Release

    off topic

    is there anyplace we can try ubuntu mobile , I have an acer iconia A100 I am willing to sacrifice to the cause .
    if it ain't broke you haven't tweaked it enough

Page 3 of 24 FirstFirst 1234513 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •