78 Star 564 Fork 223

idea4good/GuiLiteSamples

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.github
ExternalWindow
Hello3D
Hello3Ddonut
Hello3Dwave
HelloAnimation
HelloAzureIoT
HelloCircle
HelloFFmpeg
HelloFont
HelloFreetype
HelloJPG
HelloKeypad
HelloLayers
HelloMario
HelloMolecule
HelloNets
HelloParticle
HelloPendulum
HelloScroll
HelloSlide
HelloStar
HelloTimer
HelloTransparent
HelloWave
HelloWidgets
HelloWindows
HostMonitor
BuildAndroid
BuildDocker
BuildGo
BuildIos
BuildLinux
BuildMFC
BuildMacCmd
BuildMacCocoa
BuildUWP
BuildWin32
BuildWinforms
UIcode
CMakeLists.txt
README.md
doc
.gitignore
GuiLiteToolkit.exe
LICENSE
README.md
README_zh.md
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

How to build for WinForms - C#?

  • Open "HostMonitor\BuildWinforms\BuildWinforms.sln" by Visual studio 2017
  • Build sample, HostMonitor, BuildWinforms in turn, then run BuildWinforms.

How to build for Win MFC?

  • Open "HostMonitor\BuildMFC\HostMonitor.sln" by Visual studio 2017
  • Click F5 to build/run HostMonitor

How to build for Win32?

  • Open "HostMonitor\BuildWin32\HostMonitor.sln" by Visual studio 2017
  • Click F5 to build/run HostMonitor, you will see UI in internet browser.

How to build for Linux?

Compile & Run locally:

  1. Compile:
    • cd HostMonitor
    • cmake . && make
    • cd BuildLinux
    • chmod 777 *
  2. Run locally(e.g, Ubuntu):
    • Elevate to super user: sudo su
    • Run with framebuffer: sudo ./HostMonitor /dev/fb0    /dev/fb0: The path of framebuffer device file.
    • Run inside X Window: sudo ./xWindow 1024 768 | ./HostMonitor shared-fb

Cross compiler & Run on target:

  1. install compiler:
    • For ARM32: sudo apt-get install g++-arm-linux-gnueabi gcc-arm-linux-gnueabi
    • For ARM64: sudo apt-get install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
  2. Cross compile:
    • cd HostMonitor
    • For ARM32: cmake -D CMAKE_C_COMPILER="/usr/bin/arm-linux-gnueabi-gcc" -D CMAKE_CXX_COMPILER="/usr/bin/arm-linux-gnueabi-g++" . && make
    • For ARM64: cmake -D CMAKE_C_COMPILER="/usr/bin/aarch64-linux-gnu-gcc" -D CMAKE_CXX_COMPILER="/usr/bin/aarch64-linux-gnu-g++" . && make
  3. Run on target Linux device:
    • Copy BuildLinux/HostMonitor to target Linux device
    • chmod 777 HostMonitor
    • sudo ./HostMonitor /dev/fb0    /dev/fb0: The path of framebuffer

How to build with GoLang?

  1. Build UIcode:
  • cd HostMonitor/UIcode
  • If x64/raspberry pi:
    • cmake .
    • make
    • cp libUIcode.a ../BuildGo/libs/amd64/
  • If ARM32:
    • cmake -D CMAKE_C_COMPILER="/usr/bin/arm-linux-gnueabi-gcc" -D CMAKE_CXX_COMPILER="/usr/bin/arm-linux-gnueabi-g++" .
    • make
    • cp libUIcode.a ../BuildGo/libs/arm/
  1. Build Golang:
  • cd HostMonitor/BuildGo
  • go build -o HostMonitor
  1. Run with framebuffer:
  • sudo ./HostMonitor /dev/fb0    /dev/fb0: The path of framebuffer device file.
  1. Run inside QT APP(display-xxx is a QT APP for display, skip this if you haven't installed QT):
  • sudo ./xWindow 1024 768 | ./HostMonitor shared-fb

How to build for iOS?

libUIcode.a should be in \BuildIos\BuildIos\libs, rebuild them if meet link error.

  • cd HostMonitor\BuildIos
  • Open BuildIos.xcodeproj with Xcode
  • Build & Run

How to build for Mac?

  • cd HostMonitor
  • cmake -D TARGET_OS="MAC" .
  • make

Run in command mode

  • cd BuildMacCmd
  • ./HostMonitor 1 8, you will see UI in internet browser(Safari).

Run in UI mode

libUIcode.a should be in BuildMacCocoa\GuiLiteDemo\libs, rebuild them if meet link error.

  • Open BuildMacCocoa\GuiLiteDemo.xcodeproj with Xcode
  • Build & Run

How to build/run for Android?

  • Open "BuildAndroid" with Android studio
  • Build & Run

How to build for Windows UWP?

depdency: Windows 10, visul stdio 2015/2017

  • Open "UIcode\sample.sln" by Visual studio 2017
  • Click build
  • copy UIcode\debug\sample.lib BuildUWP\sample_uwp_cpp\libs\x86(x64)\
  • Open "BuildUWP\HostMonitor.sln" by Visual studio 2017
  • Click build
  • Click debug/run

How to run on VR/MR?

  • If VR: run Mixed Reality Portalon PC side.
  • Take VR/MR device on head, or run simulator.
  • press start, find the UWP you build and run.

Note: Windows RS3(Build 16299) will be necessary.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/idea4good/GuiLiteSamples.git
git@gitee.com:idea4good/GuiLiteSamples.git
idea4good
GuiLiteSamples
GuiLiteSamples
master

搜索帮助