Skip to content

Commit

Permalink
chg docs, fix error in saving input fields
Browse files Browse the repository at this point in the history
  • Loading branch information
mjoppich committed Jul 26, 2018
1 parent fd856ee commit 1f9fb11
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 45 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ if (NOT APPLE)





# find the release *.dll file
get_target_property(Qt5_CoreLocation Qt5::Core LOCATION_RELEASE)
get_target_property(Qt5_CoreSOName Qt5::Core "IMPORTED_SONAME_RELEASE")
Expand Down Expand Up @@ -461,6 +463,9 @@ if (NOT APPLE)
install(FILES $<$<CONFIG:Debug>:${Qt5_GuiLocation_Debug}>$<$<NOT:$<CONFIG:Debug>>:${Qt5_GuiLocation}> DESTINATION ${CMAKE_INSTALL_PREFIX} RENAME ${Qt5_GuiSOName})
endif()

get_filename_component(QT5GUI_DIR ${Qt5_GuiLocation} DIRECTORY)
install(DIRECTORY ${QT5GUI_DIR}/../plugins/platforms/ DESTINATION platforms)

if (MINGW)

get_filename_component(MINGW_BUILD_BIN ${CMAKE_CXX_COMPILER} PATH)
Expand Down
93 changes: 52 additions & 41 deletions doc/build_wsl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,12 @@
How to setup WSL (Bash on Ubuntu)
=================================

Step 1: Activate Developer Mode
Depending on your Windows version you need to activate Developer Mode first.
How this is done is explained at the end of this page.

Since WSL/Bash on Ubuntu on Windows is a developer feature, first the developer mode has to be actived.
Therefore we go into the Settings app and select *Update & Security*.

.. image:: ./images/wsl/dev_mode_1.PNG
:scale: 30

We further navigate into the *For developers* tab on the left.

.. image:: ./images/wsl/dev_mode_2.PNG
:scale: 30
For all recent versions of Windows 10 you can start with step 1.

In the *For developers* options we switch from *Windows Store apps* to *Developer mode*.

.. image:: ./images/wsl/dev_mode_3.PNG
:scale: 30

Step 2: Activate WSL feature
Step 1: Activate WSL feature
-----------------------------

First WSL has to be enabled from Windows features.
Expand All @@ -36,51 +23,75 @@ Once found, look for the *Windows Subsystem for Linux (Beta)* row and make sure
.. image:: ./images/wsl/select_wsl_feature.PNG
:scale: 30

This will download and install the desired \acf{WSL} feature.
This will download and install the desired WSL feature.
Finally apply the change and make sure to reboot your computer

.. image:: ./images/wsl/restart_after_sel.PNG
:scale: 30

Step 3: Setup WSL
-----------------
Step 2: Install Linux
---------------------

After having enabled the WSL feature, we can visit the Microsoft Windows Store to download Linux.

In order to do so, we open the Windows Store app, and search for *Linux*. We select the *Run Linux on Windows* menu entry.

.. image:: ./images/wsl/select_from_store.png
:scale: 30


Despite the interest to hide any command line as much as possible from the user, the following initial setup can not be automised.
First a Command Prompt or better PowerShell must be started.
Search for the *Windows PowerShell* in the start menu.
There are many different flavors (comparable to strains in biology) of linux and some are already offered on the Windows store.
Best compatibility for *bioGUI* has Ubuntu.

.. image:: ./images/wsl/powershell.PNG
*Important*: You should consider using the latest Ubuntu version available. This is Ubuntu 18.04 at the time of writing. You specifically have to search for *Ubuntu 18.04* in the store !

.. image:: ./images/wsl/select_from_store_ubuntu.png
:scale: 30

Next we type ``bash`` into the command line and Windows will download *WSL*.
However, before the download starts, first the user has to acknowledge that he wants to download *Bash on Ubuntu on Windows* by typing in ``y`` and confirming with ``<enter>``.
Now let the Windows store install your Linux app and once that is done, open your newly installed Linux:

.. image:: ./images/wsl/powershell_download_bash.PNG
.. image:: ./images/wsl/start_ubuntu.png
:scale: 30

Finally, after *WSL* has been downloaded and extracted, *WSL* has to create a linux user account.
The black screen will guide you through the install process.
It will first unpack itself and then ask you to create a linux user account.

It is recommended to choose a username and password you can easily remember.
Remembering the password is essential here, as it will be needed for any installation one is performing on *WSL*.
Remembering the password is essential here, as it will be needed for any installation to be performed on *WSL* and by *bioGUI*.

.. image:: ./images/wsl/powershell_setup_user.PNG
:scale: 30

After having *WSL* installed, it has to be setup once to install commonly used dependencies.

.. code::
Step 3: Prepare WSL
-------------------

Before you can use *bioGUI* on *WSL*/Ubuntu please make sure to run the *First time Ubuntu/WSL/apt-get Setup* from *bioGUI*.
For the *sudo/user password* please enter the password for your linux user account from the step above.

.. image:: ./images/wsl/wsl_setup_biogui.png
:scale: 30


In case there are problems please contact the author of the software.


If you are running an old Windows 10 version, you first need to activate developer mode before you are able to enable the Windows Subsystem for Linux feature.

Step 0: Activate Developer Mode

#! First Time WSL Setup
Since WSL/Bash on Ubuntu on Windows is a developer feature, first the developer mode has to be actived.
Therefore we go into the Settings app and select *Update & Security*.

.. image:: ./images/wsl/dev_mode_1.PNG
:scale: 30

echo $2 | sudo -S apt-get update
echo $2 | sudo -S apt-get -y install build-essential
echo $2 | sudo -S apt-get -y install dos2UNIX
We further navigate into the *For developers* tab on the left.

The above commands must be executed once for this purpose.
For ease of use, *bioGUI* provides an *Install Template Module* template as well as a first time *WSL* setup install template.
After downloading both and executing the first time *WSL* setup *WSL* is set up to be used with *bioGUI*.
.. image:: ./images/wsl/dev_mode_2.PNG
:scale: 30

The first time *WSL* setup essentially first updates the *Ubuntu* packet manager and then installs most common compilation libraries as well as a tool to convert Windows line endings into UNIX ones.
Using the *Install Template Module* one has to enter the password of the newly created user account.
In the *For developers* options we switch from *Windows Store apps* to *Developer mode*.

.. image:: ./images/wsl/powershell_aptupd.PNG
.. image:: ./images/wsl/dev_mode_3.PNG
:scale: 30
Binary file added doc/images/wsl/select_from_store.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/wsl/select_from_store_ubuntu.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/images/wsl/select_wsl_feature.PNG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/wsl/start_ubuntu.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/wsl/wsl_setup_biogui.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/parsing/visual_nodes/WindowWidgetInputNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ class WindowWidgetInputNode : public WindowWidgetNode {

QDomText t = pDoc->createTextNode(QString(sValue.c_str()));

while(pDOMElement->hasChildNodes())
{
QDomNode oChild = pDOMElement->firstChild();
pDOMElement->removeChild(oChild);
}

pDOMElement->appendChild(t);
}

Expand Down
16 changes: 12 additions & 4 deletions templates/WSL_install.gui
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@

<groupbox id="user_sel_instpath" title="Install Location" exclusive="true">

<checkbox id="loc_datadir" value="data" selected="true">Install programs in User Data Dir</checkbox>
<checkbox id="loc_datadir" value="data" selected="true">Install programs in User Data Dir (default)</checkbox>
<checkbox id="loc_spec" value="spec"> <input id="loc_spec_user">/usr/local/</input></checkbox>

</groupbox>


<label>sudo Password</label>
<label>Linux User Password / sudo Password</label>
<input id="sudopw" type="password"></input>

<checkbox id="addtopath" value="1" value-unselected="0" selected="true">Add program folder to PATH in &#126;/.bashrc?</checkbox>
<checkbox id="addtopath" value="1" value-unselected="0" selected="true">Add program folder to PATH in &#126;/.bashrc? (default: yes)</checkbox>
</group>

<group id="templpath_sel" checkable="true" title="Store template?">
<group id="templpath_sel" checkable="true" title="Store template?" selected="true">
<filedialog id="templpath" output="true" filter="*.gui" location="${APPDIR}/templates/">Save Template to</filedialog>
</group>

Expand Down Expand Up @@ -105,6 +105,14 @@
function evaluate(gvnPath, appdir)
ext=".gui"
if (gvnPath == "") then
for i = 1, 10 do
gvnPath = gvnPath .. string.char(math.random(97, 122))
end
end
if ( string.sub(gvnPath, math.min(string.len(gvnPath), string.len(appdir)))~=appdir) then
gvnPath = appdir .. gvnPath
Expand Down

0 comments on commit 1f9fb11

Please sign in to comment.