A few questions about 0.16.2 on Windows with Visual Studio

43 views
Skip to first unread message

Vaillancourt

unread,
Aug 12, 2020, 2:52:01 PM8/12/20
to ode-users
Hello!

I'm in the process of making ODE 0.16.2 usable by our app. Our target platform is Windows, using Visual Studio (2017 at the moment), and CMake 3.8.2 (for now).

I have a couple of questions regarding this.

Note that:
- I can work my way with searching and CMake but I don't use it often.
- I can work my way with searching and git, but I don't use it often.
- I usually just check out open source repositories and use the code they provide, I never propose changes.
- I use ODE without knowing too much about the underlying math.

The following questions may appear silly because of that:
  1. After I `git clone` the branch, and open the code in Visual Studio (or commit it to our own SVN repository), I get issues with inconsistent line endings. Is that expected?
  2. I see some changes that are done in the `master` branch, and some done in the `0.16.x` branch (I cloned tag 0.16.2). What's the difference between those, and what should be the branch I clone?
  3. I have managed to make a demo run from Visual Studio only after I moved the resources.rc from the drawstuff library to the demo project (demo_step). I'm not too familiar with how the Exe/Lib/RC work in Visual Studio projects; should it be working "out of the box"?
I've managed to build the solution and produce the .lib as I expected (I have not tested it with our own app yet) so I'm globally satisfied with all of this, and so I'm not asking/expecting anyone to fix those issues for me; it's just that I'm wondering if I did the "expected" process.

Thanks for your time, great work with ODE :)

--
Vaillancourt

Oleh Derevenko

unread,
Aug 12, 2020, 6:12:52 PM8/12/20
to ode-...@googlegroups.com

Hi Vaillancourt,

  1. After I `git clone` the branch, and open the code in Visual Studio (or commit it to our own SVN repository), I get issues with inconsistent line endings. Is that expected?

It happens because some developers make changes on Unix systems and others code on Windows. This way some files may get into the repository with one line ending style and other with the other. Then if somebody copies code fragments from one source file to another it can end with mixed line endings. There are tools like auto line ending correction during commits and warnings in IDEs but they are  not always engaged (I, typically, work on ODE with old VS releases that do not have these checks yet) and it happens that some line ending problems are missed. You can ignore the warnings. Windows line endings used to not do any harm unless they were in multi-line macros (and we have use any of these).

  1. I see some changes that are done in the `master` branch, and some done in the `0.16.x` branch (I cloned tag 0.16.2). What's the difference between those, and what should be the branch I clone?

Master branch is the latest development branch and 0.<version>.x are branches created from the master when corresponding “stable” releases are made. Then, the master goes on further on its own and the release branches only get critical fixes copied from the master if the fixes apply to them. After a few problems are found and fixed in a particular release we can decide to make a patch release 0.<version>.1, 0.<version>.2, etc. which are built from those stable branches created before with only the fixes applied to them. The particular snapshots that correspond to releases in the release branches are marked with tags named the same way as the releases. Thus, 0.16.x branch contains tags names 0.16, 0.16.1 and 0.16.2 and there are one or several commits between the tags. You clone the whole repository and then check out a specific tag from it (0.16.2 in your case) since 0.16.x branch could have even more changes added after the tag and these changes would be waiting there to be included into the next patch release.

  1. I have managed to make a demo run from Visual Studio only after I moved the resources.rc from the drawstuff library to the demo project (demo_step). I'm not too familiar with how the Exe/Lib/RC work in Visual Studio projects; should it be working "out of the box"?

Demos do not run right away from the sources. There is build\premake4.exe you should run to generate a solution and project files for the ODE itself and its demo programs. See “premake4.exe --help” for command line help of the tool.
Alternatively, way you can generate Visual Studio projects with CMake.
Then you can run demos and/or tune library parameters as you need and link against library binary you make. Personally, I don’t find it reasonable to build ODE sources with the main application project each time. Still, if you want it, you can import the generated project or create your own from scratch copying project preprocessor defines and adjusting include paths as necessary.

Oleh Derevenko

-- Skype with underscore
GPG Key Fingerprint: 2F56 32DC DCD9 B2BB 06E9 39E8 A37E 5E60 376E C691

 

From: ode-...@googlegroups.com <ode-...@googlegroups.com> On Behalf Of Vaillancourt
Sent: Wednesday, August 12, 2020 9:52 PM
To: ode-users <ode-...@googlegroups.com>
Subject: [ode-users] A few questions about 0.16.2 on Windows with Visual Studio

 

  1. After I `git clone` the branch, and open the code in Visual Studio (or commit it to our own SVN repository), I get issues with inconsistent line endings. Is that expected?
  2. I see some changes that are done in the `master` branch, and some done in the `0.16.x` branch (I cloned tag 0.16.2). What's the difference between those, and what should be the branch I clone?
  3. I have managed to make a demo run from Visual Studio only after I moved the resources.rc from the drawstuff library to the demo project (demo_step). I'm not too familiar with how the Exe/Lib/RC work in Visual Studio projects; should it be working "out of the box"?


--
Vaillancourt

--
You received this message because you are subscribed to the Google Groups "ode-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ode-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ode-users/736ef012-be38-4223-b740-7fadd994b277n%40googlegroups.com.

openpgp-digital-signature.asc

Vaillancourt

unread,
Aug 16, 2020, 2:12:30 PM8/16/20
to ode-users
Hi Oleh, thanks for the reply!

> It happens because some developers make changes on Unix systems [...]

So I assume developers just have learned to live with it. Actually, I have realized that, although SVN _complains_ about it when I _add_ the files to the repository, it still lets me commit them, so I don't need to fix those either.

> Master branch is the latest development branch and 0.<version>.x are branches created from the master [...]

So this means that if, during development of a new app, there is a new patch release (e.g. 0.16.x becomes tagged with 0.16.3), updating to it should not cause any issues, it should just fix some bugs? Also if someone was to find a bug in the library, they should try to make sure it's in the master branch and propose a fix against it instead of working with the 0.16.x branch?


> Alternatively, way you can generate Visual Studio projects with CMake.

Yes, looks like my first post was missing some information. I have been able to generate a solution for VS 2017 with CMake, containing all of the demos and the library. After I "INSTALL" the solution (build the INSTALL project), the library "works" as I'm able to build and run our app with it, but the demo projects either do not link, or do not work "out of the box" from Visual Studio as I was expected (depending on the branch I use). I suppose this can be the topic of a new thread as the behaviour is not the same from the master branch and the 0.16.2 tag.

> I don’t find it reasonable to build ODE sources with the main application project each time.

You're right. Our workflow is: I setup in an SVN repository folder the sources of the library, plus a script; our devs checkout the SVN folder, run the script; the script will produce the VisualStudio 2017 solution and build the INSTALL project in debug/release; the CMake parameters are prepared by the script and include the output "common" location where the .lib and /include folder are saved. This process should be done only once when I prepare a new solution for a new release. I suppose I could only distribute the compiled lib and the include folder; this workflow had been designed to allow "power users" to modify the library when debugging our app.

We have been using ODE 0.12.0 for a long time and thought we should update ;)

Again, thanks a lot!

-- Vaillancourt

Oleh Derevenko

unread,
Aug 16, 2020, 4:15:55 PM8/16/20
to ode-...@googlegroups.com

From: ode-...@googlegroups.com <ode-...@googlegroups.com> On Behalf Of Vaillancourt

>> Master branch is the latest development branch and 0.<version>.x are branches created from the master [...]
> So this means that if, during development of a new app, there is a new patch release (e.g. 0.16.x becomes tagged with 0.16.3), updating to it should not cause any issues, it should just fix some bugs?


You are to believe in that.

 

> Also if someone was to find a bug in the library, they should try to make sure it's in the master branch and propose a fix against it instead of working with the 0.16.x branch?

This is not important. The person who will be handling the bug or the patch has to make sure the fix will get into all the places it will need to. Normally, everything is committed into the master branch first and then copied to other branches from there if necessary.



>> Alternatively, way you can generate Visual Studio projects with CMake.
> Yes, looks like my first post was missing some information. I have been able to generate a solution for VS 2017 with CMake, containing all of the demos and the library. After I "INSTALL" the solution (build the INSTALL project), the library "works" as I'm able to build and run our app with it, but the demo > projects either do not link, or do not work "out of the box" from Visual Studio as I was expected (depending on the branch I use). I suppose this can be the topic of a new thread as the behaviour is not the same from the master branch and the 0.16.2 tag.

Post the list of the commands you run and other steps you take so that people could try it on their own.

openpgp-digital-signature.asc
Reply all
Reply to author
Forward
0 new messages