Gwindalmir / SEWorkshopTool

Tool which allows batch upload and download of mods for both Space and Medieval Engineers.
32 stars 16 forks source link

Batch file to setup a symlink to Space Engineers binaries #34

Closed viktor-ferenczi closed 3 years ago

viktor-ferenczi commented 3 years ago

Batch file to setup a symlink to Space Engineers binaries for easier setup of the working copy for local build and development.

Gwindalmir commented 3 years ago

I appreciate the contribution.

A few things to note though: "path" is a special environment variable, I wouldn't recommend using it like that. It's one typo away from trashing your System PATH (set /x instead of set /p). Additionally, if you execute this in an existing command prompt (which is common in development/testing), it trashes it, and you can't run any more programs. MKLINK works because it's an internal command to cmd.exe. A setlocal at the top would fix that at a minimum, but that should be done anyway, in addition to changing it from PATH.

In addition, I'd prefer a system which can accept a command-line argument for a path instead of requiring an input prompt. Having it prompt if no argument is passed is acceptable.

Also, this looks like it came from Torch. Nothing against Torch, but for licensing reasons, I won't accept anything that was from there. I don't have a license on this project, and if I decide to choose one later, I don't want to deal with a potential conflict.

Gwindalmir commented 3 years ago

I went ahead and implemented my own version of this. I added a powershell script that will automatically detect your SE installation and creates a link to Bin64 inside the project folder. It's completely automatic, and transparent to the user. If it can't, it shows an example command to perform the step manually.

I hope it works well for you. 😃

Nevertheless, I appreciate the contribution, and your PR has been in the back of mine since you created it. I finally got annoyed with how the projects were set up, so I went ahead and implemented something that follows your idea.