Closed lavinrp closed 6 years ago
There is a branch that is currently working for my machine using fedora. The code changes need to be tested on windows, and preferably this should be tested on another linux machine. I added a makefile which should compile everything into the demo.
@Peaslek I've fixed your build on windows. However those hardcoded paths just won't do. Any idea why the relative paths wouldn't work?
@Peaslek @gyurgyma I've run into an issue like that before between Linux and windows. That was in python though.
Long story short python and windows treat the working directory differently.
Problem may also stem from the way that visual studio uses its project directory as the working dir? If the Linux exe isn't using GameBackboneSln as the working dir then things wont work.
Is the Linux exe in the GameBackboneExe folder?
side note: do we really need the double '/' in Linux? the 'R' before the string is supposed to make us not need those.
If we need the double '/' anyway we should remove the 'R'.
@gyurgyma Whoops meant to change those hard coded paths.
@lavinrp I'll check the double slash usage. The demo is being built right now. In a new folder 'bld' in the root dir ov the project. What folder are you building it to?
@Peaslek because of the way visual studio works, The exe is not at the location that is considered the "working directory" when running the app from VS. When running in VS, no matter where the exe is output, the working directory is the directory of the project.
This means that, for all intents and purposes, our exe is at the top level of GameBackboneExe.
This should be ready for review, the demo works fine although for some reason we receive errors about failing to load files that we did load..
@gyurgyma Can you try building in on windows again
@Peaslek Worked on windows. Have not tied on my Ubuntu yet.
@lavinrp When trying on ubuntu note anything I left out on my small write up. It would probably be nice to document a set of commands for dependency installation on Ubuntu as that's the most popular distro.
@Peaslek @lavinrp it works on my laptop. Imma say its passed michaels review. ensure it builds on linux ryan. then the tough part will be working with all of us to make sure we know what we can and cant do. Kyle, please make a list of general things we need to follow for style. I think thatll help out alot in the coming months while we learn to use that style inherently
Just rewrite it in electron ezpz
Somehow this conversation went from serious to useless in one single message
Here are some cmake tutorials that may help
https://www.codeproject.com/Articles/1181455/A-CMake-tutorial-for-Visual-Cplusplus-developers https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1 https://schneide.wordpress.com/2016/04/08/modern-cmake-with-target_link_libraries/ https://schneide.wordpress.com/2017/11/06/4-tips-for-better-cmake/ https://www.jetbrains.com/help/clion/quick-cmake-tutorial.html
I now have a trivial SFML app building with CMake in a way that is decently maintainable and will require 1/2 of the environment variables that we are currently using (could require 0 if 3rd party libs get installed into default locations).
I'll try to apply the same technique to GB and see if I can get it to work across all of GBs dependencies.
Something to consider for the future: We could avoid a bunch of headaches revolving around GCC not accepting a bunch of syntax that MSVC does and vice versa by using Clang on all platforms.
This would require windows users to download clang and the visual studio 2015 compiler suite (note that you can still use this with Visual Studio 2017)
I'm not entirely sure how that would behave with Cmake and visual studio, but its worth experimenting with.
https://github.com/lavinrp/Learn_Cmake_SFML
for cmake with sfml example
https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/How-To-Find-Libraries https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/dev/Improving-Find*-Modules
some documentation on how to make a find_gamebackbone.cmake
@gyurgyma I'm running into a problem and I dont know if its local, a problem with my cmake, or a problem with tgui's cmake.
Would you mind switching back to the cmake branch and testing if you can build in release mode? I can build in debug mode just fine, but in release mode I get an error saying that tgui.lib cant be found (but it says it looked in the place where tgui.lib is...)
Just a reminder that we should add versioning to cmake
@gyurgyma
Would be great if you could test on linux
It works.
Make things compile and run on linux