Changes between Version 6 and Version 7 of Webview2


Ignore:
Timestamp:
02/07/19 10:42:07 (2 years ago)
Author:
tim
Comment:

With recent additions this procedure was vastly simplified, reflect in doc

Legend:

Unmodified
Added
Removed
Modified
  • Webview2

    v6 v7  
    1616   dnf install npm 
    1717   }}} 
    18    We want to install packages to our home directory, therefore: 
    19    {{{ 
    20    echo 'prefix = ~/.npm' > ~/.npmrc 
    21    echo 'PATH=$PATH:$HOME/.npm/bin' >> ~/.bashrc 
    22    source ~/.bashrc 
    23    }}} 
    24 2. Install angular-cli. This is a tool we use to build and run the frontend, cf. [https://angular.io/guide/quickstart Angular Getting Started Guide]. 
    25    {{{ 
    26    npm install -g @angular/cli 
    27    }}} 
    28    {{{#!td style="background: #f2dede; color: #a94442;" 
    29    This pulls quite a few packages and it is advisable to do this on a speedy Internet connection '''before''' going to a RoboCup venue. 
    30    }}} 
    31 3. Make sure RapidJSON and the REST API generator pre-requisites are installed: 
     182. Make sure RapidJSON and the REST API generator pre-requisites are installed: 
    3219   {{{ 
    3320   dnf install rapidjson-devel 
    3421   dnf install python3 python3-jinja2 python3-PyYAML  
    3522   }}} 
    36    In Fawkes, checkout the {{{timn/webview-2.0}}} branch and do a full build (including clean!). 
     23   If this installs any new package, run {{{make -j$(nproc) clean all gui}}} in your working tree. 
    3724 
    3825=== Building the Frontend === 
     
    4229make deploy 
    4330}}} 
    44 {{{#!td style="background: #f2dede; color: #a94442;" 
    45 If this fails in the last step and cannot find ng you probably did not reload your bashrc after extending the path above. Execute {{{source ~/.bashrc}}} or logout and back in. 
    46 }}} 
    4731You can then load the frontend through webview, typically running on {{{http://localhost:8088}}}. Note that this expects to talk to your Fawkes REST API on the same URL. 
    4832 
    49 During development, you may run the frontend using {{{ng serve}}} in the frontend directory. The interface will then be available on {{{http://localhost:4200}}} and it connects to a Fawkes instance running at {{{http://localhost:8088}}}. The server will be automatically restarted and the web interface automatically refreshed after modifications in the frontend code. 
     33During development, you may run the frontend using {{{npm start}}} in the frontend directory. The interface will then be available on {{{http://localhost:4200}}} and it connects to a Fawkes instance running at {{{http://localhost:8088}}}. The server will be automatically restarted and the web interface automatically refreshed after modifications in the frontend code. 
    5034 
    5135=== Run the CLIPS Executive Example Scenario === 
     
    5943bin/fawkes \ 
    6044  ros navgraph skiller flite clips clips-pddl-parser \ 
    61   clips-executive clips-executive-rest-api webview 
     45  clips-executive clips-executive-rest-api clips-rest-api skiller-rest-api webview 
    6246}}} 
    6347In the executive, you can query the goals and click on them. Once you are on the TESTGOAL-gen4 (or similar) page, enable auto-reloading (symbol with two circled arrows). Then, re-start the Fawkes instance. You can then see the pre-conditions and the plan running through. The plan finishes quickly, which is why we restart after enabling auto-refresh.