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

Feature: Make tgswitch working on windows #129

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mivalsten
Copy link

This PR makes tgswitch working on windows by changing default path. It also allows to have different default path on each OS.

@mivalsten
Copy link
Author

Added windows specific CreateSymlink as windows requires admin privilage to create symlinks, so if the program was ran as unprivileged user it would fail no matter what. Windows version instead copies the file to path location.

Not the best solution, but option to symlink as non-admin user only became available in windows 10 and requires customized syscall that is not available in go libraries yet.

@williamoconnorme
Copy link

@warrensbox can this PR be reviewed please? tswitch in it's current state is not compatible with Windows due to the download URL not appending .exe file extension to the URL. This results in tgswitch downloading the 404 HTML response page from github

@mivalsten thank you for distributing the built binary in your fork. I've tested it locally and it's working great for me

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.

None yet

2 participants