Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to clink_[x86|x64].exe if clink.bat Script is Renamed #357

Merged
merged 1 commit into from
Dec 20, 2015

Conversation

frizzr
Copy link

@frizzr frizzr commented Oct 14, 2015

In programs like ConEmu, very often users want to pass their own options into Clink. This involves replacing clink.bat with their own custom one, which will then call the original clink.bat with a new name. This tweak keeps the original behavior of looking for clinkXXX_x64.exe when the batch script is named clinkXXX.bat, but provides a fallback for it to run clink_x64.exe if clinkXXX_x64.exe cannot be found.

In programs like ConEmu, very often users want to pass their own options
into Clink. This involves replacing clink.bat with their own custom one,
which will then call the original clink.bat with a new name. This tweak
keeps the original behavior of looking for clinkXXX_x64.exe when the
batch script is named clinkXXX.bat, but provides a fallback for it to
run clink_x64.exe if clinkXXX_x64.exe cannot be found.
@frizzr
Copy link
Author

frizzr commented Oct 14, 2015

This was just an idea of mine. I know it is debatable whether ConEmu should provide more adjustable hooks for Clink, but I tried to at least keep with the original behavior and only add a fallback if the executable is not found.

Thanks for considering!

@frizzr frizzr changed the title Tweak If This Script is Renamed Fallback to clink_*.exe If clink.bat Script is Renamed Oct 14, 2015
@frizzr frizzr changed the title Fallback to clink_*.exe If clink.bat Script is Renamed Fallback to clink_[x86|x64].exe If clink.bat Script is Renamed Oct 14, 2015
@frizzr frizzr changed the title Fallback to clink_[x86|x64].exe If clink.bat Script is Renamed Fallback to clink_[x86|x64].exe if clink.bat Script is Renamed Oct 14, 2015
@mridgers
Copy link
Owner

Would you mind giving me an example of how these changes are used to give me a bit of context?

@frizzr
Copy link
Author

frizzr commented Oct 23, 2015

Sure. Take a look at this question on Super User on how to feed clink the --profile command-line option through ConEmu:

http://superuser.com/questions/684309/how-do-i-set-clinks-profile-option-in-conemu

Maximus recommends moving the original clink.bat file to a new name (say, for example, "clink_new.bat") and having clink.bat just be a simple call to clink_new.bat --profile, but this causes the batch script in Clink to look for clink_new.exe, etc.

The change I'm proposing keeps that behavior intact...it just creates a fallback position that if it cannot find clink_new.exe, it will revert to looking for clink.exe.

@mridgers mridgers merged commit 5105c83 into mridgers:master Dec 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants