[Bug] and [Suggestion] GenerateProjectFiles.bat

Build info
Version: 1578757

The GenerateProjectFIles.bat isn’t generated correctly if the project’s location isn’t on the same drive as Rocket.

When you guys generate the file it’s with relative paths, normally it looks like this:
pushd %~dp0…..\Program Files\Rocket\Engine\Source

But if I create the project on drive D, you get,
pushd %~dp0C:\Program Files\Rocket\Engine\Source

Which won’t work. It’s also kind of a pain to worry about having a batch file, because now I want to check it in, but I can’t because it has local paths. It would be better to lose the batch file entirely.

[Suggestion]
Do what Unity does, you never manually control (or regenerate) your own solution or project files. Every time you change focus and return to the editor they check the state on disk of your code files. If it has changed, they regenerate the project and solution files. This would be a considerably better workflow and avoids the question of what to do with the batch file.

Thanks for reporting that, Nick! We’ll get it fixed for the next release. (TTP 287980)

We appreciate the good suggestion too. We’ve been pondering about what the best workflow for project file generation is. At Epic we prefer to manually regenerate projects after syncing down new code changes. Often we don’t have the editor open before loading up Visual Studio to work on code, so it’s not clear there is a good place to automatically detect that they’re out of date. Also, the actual business of detecting outdatedness could be a bit complicated or slow. I’ll continue to think about it though. Please continue to provide feedback like this!

I certainly understand the dilemma. You may want to consider supporting both workflows then. Otherwise, if the current batch file is the only path you’ll need to make everything portable, environment variable nightmares.

Another option - to avoid people needing to check in the batch file, you might want to have the editor recreate the batch file if it doesn’t exist.