sfederic / VEngine

Game engine framework using DirectX 11, Direct2D, DirectWrite, Qt, FBX SDK, ImGui/ImGuizmo and PhysX
68 stars 4 forks source link

added premake5 support #3

Closed ignite720 closed 1 year ago

ignite720 commented 1 year ago

Hi sfederic I am very happy to see your project, and I also admire that you have updated this project many times. I hope that your project can finally achieve your desired goal. But I found that you have put many third-party libraries directly into the project, this will make the size of the project’s files greatly increased, and these third-party libraries cannot be reused in other projects. I created a new branch to add support for premake5. There are almost no file conflicts. If possible, please help review and make it Merge into the master branch. Thanks, have a nice day.

Steps for usage:

  1. Only one file premake5.exe is required, add the folder where it is located to the PATH environment variable. https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip

  2. Put this into D:\dev2 git -C D:\ clone https://github.com/ignite720/dev2.git

  3. And then click premake5-generate.bat, all projects will be generated in the build directory. Click premake5-clean.bat will remove all generated content, basically the bin and build directories.

When you add or remove files under Code/, you only need to click premake5-generate.bat, and premake5 will automatically complete the rest.

So the following files do not need to exist x64/ VEngine.sln VEngine/VEngine.vcxproj VEngine/VEngine.vcxproj.filters VEngine/packages.config VEngine/x64/

It is recommended to put all resource files into a folder, such as Assets, which is convenient for management and packaging. VEngine/Assets/ActorTemplates VEngine/Assets/AnimationFBXFiles VEngine/Assets/Animations VEngine/Assets/Audio VEngine/Assets/Dialogue VEngine/Assets/FBXFiles VEngine/Assets/Fonts VEngine/Assets/Icons VEngine/Assets/LightProbeData VEngine/Assets/Materials VEngine/Assets/Meshes VEngine/Assets/Textures VEngine/Assets/VertexColourData VEngine/Assets/WorldMaps

The advantage of using premake5 is that these are automatically generated, and if you add vulkan renderer in the future, you can directly make the project cross-platform run on linux, macOS, Android and other platforms without too much effort.

premake5 gmake premake5 xcode4

sfederic commented 1 year ago

Hi sfederic I am very happy to see your project, and I also admire that you have updated this project many times. I hope that your project can finally achieve your desired goal. But I found that you have put many third-party libraries directly into the project, this will make the size of the project’s files greatly increased, and these third-party libraries cannot be reused in other projects. I created a new branch to add support for premake5.

This is a great Pull Request, probably too good for how small and rough this repository is. If you're consultant for Premake, you sold me. I'll test it over the week and merge it in.

ignite720 commented 1 year ago

Thanks for your reply, I also learned something through this repo. Every repository starts small, and it is through continuous improvement and contribution that you can reach your goal. And to be honest, at least it takes me a minute to rebuild.

sfederic commented 1 year ago

Note on merging this in: Qt is doing the old windows platform folder thing where some of the controls are taking default visual elements. Will have to play around to fix.

image

ignite720 commented 1 year ago

Note on merging this in: Qt is doing the old windows platform folder thing where some of the controls are taking default visual elements. Will have to play around to fix.

image

Sorry I just saw this issue, this may be because the qt binary in dev2 lacks style-related dlls, and because qt5 is too large (the full version of the SDK(x64) is about 4GB), I had to remove many unused files, and only kept the essentials. I have updated the dlls, it should solve this issue.

https://github.com/ignite720/dev2