69 Star 511 Fork 195

idea4good / GuiLiteSamples

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 3.51 KB
一键复制 编辑 原始数据 按行查看 历史
idea4good 提交于 2023-07-27 16:37 . add 'sudo su' for xWindows mode

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.

C++
1
https://gitee.com/idea4good/GuiLiteSamples.git
git@gitee.com:idea4good/GuiLiteSamples.git
idea4good
GuiLiteSamples
GuiLiteSamples
master

搜索帮助