Update README.md

This commit is contained in:
Viktor 2017-10-15 21:11:39 +03:00 committed by GitHub
parent 2c6da55e63
commit 355b14fafb
1 changed files with 160 additions and 164 deletions

106
README.md
View File

@ -128,10 +128,10 @@ Important notice
If build of your app is failed due to dlangui or its dependencies, probably you have not upgraded dependencies. If build of your app is failed due to dlangui or its dependencies, probably you have not upgraded dependencies.
Try following: Try following:
```sh
dub upgrade --force-remove dub upgrade --force-remove
dub build --force dub build --force
```
As well, sometimes removing of dub.json.selections can help. As well, sometimes removing of dub.json.selections can help.
@ -146,11 +146,11 @@ Win32 builds
Build and run demo app using DUB: Build and run demo app using DUB:
```sh
git clone --recursive https://github.com/buggins/dlangui.git git clone --recursive https://github.com/buggins/dlangui.git
cd dlangui/examples/example1 cd dlangui/examples/example1
dub run --build=release dub run --build=release
```
To develop using Visual-D or MonoD, open dlangui.sln using Visual D (or dlangui-monod.sln for MonoD) To develop using Visual-D or MonoD, open dlangui.sln using Visual D (or dlangui-monod.sln for MonoD)
@ -158,13 +158,13 @@ To develop using Visual-D or MonoD, open dlangui.sln using Visual D (or dlangui-
To avoid showing console window add win_app.def file to your package source directory and add line to your dub.json. To avoid showing console window add win_app.def file to your package source directory and add line to your dub.json.
win_app.def: win_app.def:
```json
"sourceFiles": ["$PACKAGE_DIR/src/win_app.def"] "sourceFiles": ["$PACKAGE_DIR/src/win_app.def"]
```
dub.json: dub.json:
```json
"sourceFiles-windows": ["$PACKAGE_DIR/src/win_app.def"], "sourceFiles-windows": ["$PACKAGE_DIR/src/win_app.def"],
```
Mac OSX development using Mono-D Mac OSX development using Mono-D
-------------------------------- --------------------------------
@ -178,17 +178,17 @@ Native Cocoa backend - work is in progress.
In some directory, e.g. ~/src/d/ : In some directory, e.g. ~/src/d/ :
Clone DlangUI repository Clone DlangUI repository
```sh
git clone --recursive https://github.com/buggins/dlangui.git git clone --recursive https://github.com/buggins/dlangui.git
```
Enter dlangui directory Enter dlangui directory
```sh
cd dlangui cd dlangui
```
Open solution file with Mono-D Open solution file with Mono-D
```
dlangui-monod-osx.sln dlangui-monod-osx.sln
```
Linux development using Mono-D Linux development using Mono-D
@ -200,17 +200,17 @@ Required libraries: libsdl2, x11, libfreetype, libfontconfig and OpenGL.
Clone DlangUI repository Clone DlangUI repository
```sh
git clone https://github.com/buggins/dlangui.git git clone https://github.com/buggins/dlangui.git
```
Enter dlangui directory Enter dlangui directory
```sh
cd dlangui cd dlangui
```
Open solution file with Mono-D Open solution file with Mono-D
```
dlangui-monod-linux.sln dlangui-monod-linux.sln
```
Try running examples: helloworld, example1, tetris, dmledit, spreadsheet, opengl Try running examples: helloworld, example1, tetris, dmledit, spreadsheet, opengl
Configurations Debug, Release, Unittest build SDL2+OpenGL versions of apps. Configurations Debug, Release, Unittest build SDL2+OpenGL versions of apps.
@ -258,17 +258,17 @@ Install GIT, DUB, DMD, MonoDevelop with Mono-D plugin.
Clone DlangUI repository Clone DlangUI repository
```sh
git clone https://github.com/buggins/dlangui.git git clone https://github.com/buggins/dlangui.git
```
Enter dlangui directory Enter dlangui directory
```sh
cd dlangui cd dlangui
```
Open solution file with Mono-D Open solution file with Mono-D
```
dlangui-monod-windows.sln dlangui-monod-windows.sln
```
Try running examples: helloworld, example1, tetris, dmledit, spreadsheet, opengl Try running examples: helloworld, example1, tetris, dmledit, spreadsheet, opengl
Configurations Debug, Release, Unittest build SDL2+OpenGL versions of apps. Configurations Debug, Release, Unittest build SDL2+OpenGL versions of apps.
@ -316,21 +316,21 @@ Install GIT, DUB, DMD, MS Visual Studio (e.g. Community 2013) + VisualD plugin
Clone DlangUI repository Clone DlangUI repository
```sh
git clone --recursive https://github.com/buggins/dlangui.git git clone --recursive https://github.com/buggins/dlangui.git
```
For DlangIDE development, close dlangide project on the same directory level as dlangui is cloned: For DlangIDE development, close dlangide project on the same directory level as dlangui is cloned:
```sh
git clone --recursive https://github.com/buggins/dlangide.git git clone --recursive https://github.com/buggins/dlangide.git
```
Enter dlangui directory Enter dlangui directory
```sh
cd dlangui cd dlangui
```
Open solution file with Visual-D Open solution file with Visual-D
```
dlangui-msvc.sln dlangui-msvc.sln
```
Try running examples: helloworld, example1, tetris, dmledit, spreadsheet, opengl Try running examples: helloworld, example1, tetris, dmledit, spreadsheet, opengl
Configurations Debug, Release, Unittest build SDL2+OpenGL versions of apps. Configurations Debug, Release, Unittest build SDL2+OpenGL versions of apps.
@ -384,19 +384,19 @@ Linux builds (DUB)
libsdl2, libfreetype, libfontconfig libsdl2, libfreetype, libfontconfig
E.g. in Ubuntu, you can use following command to enable SDL2 backend builds: E.g. in Ubuntu, you can use following command to enable SDL2 backend builds:
```sh
sudo apt-get install libsdl2-dev sudo apt-get install libsdl2-dev
```
In runtime, .so for following libraries are being loaded (binary packages required): In runtime, .so for following libraries are being loaded (binary packages required):
```
freetype, opengl, fontconfig freetype, opengl, fontconfig
```
Build and run on Linux using DUB: Build and run on Linux using DUB:
```sh
cd examples/example1 cd examples/example1
dub run dlangui:example1 dub run dlangui:example1
```
Other platforms Other platforms
@ -418,7 +418,7 @@ Third party components used
Hello World Hello World
-------------------------------------------------------------- --------------------------------------------------------------
```D
// myproject.d // myproject.d
import dlangui; import dlangui;
mixin APP_ENTRY_POINT; mixin APP_ENTRY_POINT;
@ -434,11 +434,11 @@ Hello World
// run message loop // run message loop
return Platform.instance.enterMessageLoop(); return Platform.instance.enterMessageLoop();
} }
```
Sample dub.json: Sample dub.json:
-------------------------------- --------------------------------
```json
{ {
"name": "myproject", "name": "myproject",
"description": "sample DLangUI project", "description": "sample DLangUI project",
@ -450,7 +450,7 @@ Sample dub.json:
"dlangui": "~master" "dlangui": "~master"
} }
} }
```
Hello World using DML Hello World using DML
-------------------------------------------------------------- --------------------------------------------------------------
@ -460,9 +460,7 @@ DlangUI supports creation of widgets from markup.
DML - DlangUI Markup Language - similar to QML. DML - DlangUI Markup Language - similar to QML.
Example of complex UI easy created from text: Example of complex UI easy created from text:
```D
module app; module app;
import dlangui; import dlangui;
@ -531,18 +529,16 @@ Example of complex UI easy created from text:
// run message loop // run message loop
return Platform.instance.enterMessageLoop(); return Platform.instance.enterMessageLoop();
} }
```
There is DMLEdit sample app in DlangUI/examples directory. There is DMLEdit sample app in DlangUI/examples directory.
You can run it with dub: You can run it with dub:
```sh
dub run dlangui:dmledit dub run dlangui:dmledit
```
It allows to edit DML text and see how it will look like when loaded into app (F5 refreshes view).
It allows to edit QML text and see how it will look like when loaded into app (F5 refreshes view).
Syntax highlight, bracket matching, go to error and other useful features are implemented. Syntax highlight, bracket matching, go to error and other useful features are implemented.
@ -561,8 +557,8 @@ DCD integration: go to definition and autocompletion for D source code.
Project page: [https://github.com/buggins/dlangide](https://github.com/buggins/dlangide) Project page: [https://github.com/buggins/dlangide](https://github.com/buggins/dlangide)
How to build and run using DUB: How to build and run using DUB:
```sh
git clone https://github.com/buggins/dlangide.git git clone https://github.com/buggins/dlangide.git
cd dlangide cd dlangide
dub run dub run
```