Code Monkey home page Code Monkey logo

vuilib's Introduction

GitHub License GitHub Created At

Auto Commit Status

Static Badge Static Badge Static Badge

VUILib3.x

A cross-platform UI Library born for flexible and efficient. Build with:

VUILib 3.x is still under developing, please wait with our first dev release!

Acknowledgements

Thanks for $JetBrains$'s Licenses for Open Source Development

JetBrains logo.

Thanks for $mohabouje$'s project $WinToast$.

Thanks for $FlorianRappl$'s project $CmdParser$.

Thanks for $Google$'s project $Skia$

Thanks for $GLFW$ project

Third-party Libraries List

vuilib's People

Contributors

fsmargoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vuilib's Issues

Can VuiLib build on Linux/Unix/Darwin?

Suggestions

I tried to build VuiLib on Debian GNU/Linux, but it used WinAPI. So may you add Unix(or U*ix) support?

  • And you should rename 'makelist.txt' to 'CMakeLists.txt' for CMake build.
  • You can also set CMake minimal version to '3.1' instead of '3.23' because it is too version is too new.

CMake build log

mkdir build && cd build && cmake ..
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/VuiLib/build
make
Scanning dependencies of target vuilib
[  2%] Building CXX object CMakeFiles/vuilib.dir/src/core/object/vapplication.cc.o
In file included from /home/user/VuiLib/src/core/object/../../../include/core/object/../uibasic/../signal/../vbasiccore.h:36,
                 from /home/user/VuiLib/src/core/object/../../../include/core/object/../uibasic/../signal/vsignal.h:10,
                 from /home/user/VuiLib/src/core/object/../../../include/core/object/../uibasic/vtimer.h:3,
                 from /home/user/VuiLib/src/core/object/../../../include/core/object/vapplication.h:10,
                 from /home/user/VuiLib/src/core/object/vapplication.cc:1:
/home/user/VuiLib/src/core/object/../../../include/core/object/../uibasic/../signal/../../debug/vdebug.h:3:10: fatal error: windows.h: 没有那个文件或目录
    3 | #include <windows.h>
      |          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/vuilib.dir/build.make:82:CMakeFiles/vuilib.dir/src/core/object/vapplication.cc.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:124:CMakeFiles/vuilib.dir/all] 错误 2

Uname infomation

Linux LAPTOP-GP6VBLDH 5.10.43-2-windows-subsystem-for-android #1 SMP PREEMPT Tue Sep 14 09:09:25 UTC 2021 x86_64 GNU/Linux

Fix patch

I'm too lazy to submit a pr (doge)

  • Move makelist.txt to CMakeLists.txt.

CMakeLists.txt:

--- vl/makelist.txt     2023-05-04 20:30:27.375390580 +0800
+++ VuiLib/CMakeLists.txt       2023-05-04 20:13:38.515373370 +0800
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.23)
+cmake_minimum_required(VERSION 3.1)
 project(vuilib_cmake)

 set(CMAKE_CXX_STANDARD 11)
@@ -26,4 +26,3 @@ add_library(vuilib STATIC ${DIR_SRCS})

 add_executable(vuilib_cmake main.cpp)
 target_link_libraries(vuilib_cmake vuilib)
-

IDontKnow 编译错误

Error C2039 'SetPlaneText': is not a member of 'Core::VTextLabel'
SetPlaneText应全局替换成SetPlainText

关于将 VuiLib 更名为 LibVui 的一些建议

关于将 VuiLib 更名为 LibVui 的一些建议

  • 你的库名 VuiLib 虽然易于记忆, 但不符合通用的命名规范 ,可能会影响到其他开发者的使用和扩展。
  • 建议将其更名为 LibVui ,这样更容易被其他开发者识别和使用。同时,更名也可以使你的库更加规范和易于维护。
  • CMake 编译库时,会自动将库命名为 'lib+${PROJECT_NAME}' ,如果使用 CMake 编译 VuiLib ,最后可能会出现一个叫 libVuiLib.dll 的动态链接库,这和使用MSBuild编译的结果是不兼容的,通常库的编译要避免这种情况出现。 CMake 是当今十分常用的 C/C++ 程序编译方式,因为MSBuild几乎不可移植(甚至可能无法移植到 MinGW 上)。
  • 使用 GNU Autoconf/Libtool 进行编译时,库名称必须以 'lib***' 开头,否则无法通过编译。
  • 在使用 GNU GCC 链接已安装的库时 'gcc -l' ,会查找安装路径中以 'lib' 开头的动态库,如果编译出来的是 'VuiLib.dll' 或 'VuiLib.a(.lib)' ,则在 MinGW 上执行 'gcc -lVuiLib' 可能会链接失败

综上所述,我认为将 VuiLib 更名为 LibVui 更好,毕竟这样更适合开发者辨识,且 libVuiLib 这个名字好像不太好听。
谢谢
2023/6/5

关于VuiLib开发的一些建议

关于VuiLib开发的一些建议

仓库

  • 开发时不建议直接将更改推送到origin/main中,建议每个版本开发时推送到origin/dev中,当新的版本发布时用Pull Request把origin/dev merge到 origin/main中
    • 意义:有利于使main分支更加整洁,直接更改main分支一般是危险的,使用上述方法,不仅符合惯例,而且方便版本的回滚(只用撤回一个merge提交),并且使用dev分支可以保证main的稳定性,当以后项目main分支出现问题时(比如想完全撤回这个版本的所有提交),只用撤一个merge提交而不是一堆小提交

项目结构,源文件,项目管理

void VWin32MsgThread(const int &Width, const int &Height, LPCWSTR WindowTitle, LPCWSTR ClassName, HWND ParentWindow);

有些修饰是没必要的(编译器其实会有所忽略),有些类型名是WinAPI提供的,建议尽量使用C++标准的类型名,这和WinAPI是兼容的,可以改成这样(int建议使用size_t,这东西更常用)

void VWin32MsgThread(size_t width, size_t height, const wchar_t* window_title, const wchar_t* class_name, HWND parent_window);

生成/编译

  • 仓库编写一个准备Release和编译生成Release的脚本
  • 仓库以后可以使用GitHub CI编译,这个又快又方便,还完全免费

另外

  • 我在中考结束后会考虑参与开发
  • 我希望未来将VuiLib作为C++ Plus包发布(C++ Plus是我的项目,类似于您的stl-ex,但是功能要强大很多,目前未完成),不知您是否愿意
  • 我的开发经验也不多,这些建议可以有所取舍 :)

谢谢
2023/6/5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.