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

Don't run "kde-open" and "gnome-open" under Unix #6426

Merged
merged 2 commits into from Nov 19, 2017
Merged

Don't run "kde-open" and "gnome-open" under Unix #6426

merged 2 commits into from Nov 19, 2017

Conversation

ghost
Copy link

@ghost ghost commented Sep 24, 2017

All these utilities where replaced by xdg-open from package xdg-utils in Linux and the BSDs.
Checked: CentOS, Solaris, NetBSD, OpenBSD, FreeBSD' they all have it in their repos.

Testing done: Run it at a Linux system works.

All these utilities where replaced by xdg-open from package xdg-utils in Linux and the BSDs.
@ghost
Copy link
Author

ghost commented Sep 24, 2017

However I did not remove the last method to use the BROWSER env variable but I think (based on the availability of xdg-utils package on all Unixes) it would be safe to do so.

@ghost
Copy link
Author

ghost commented Sep 24, 2017

Also since shellExecuteA was removed from winlean, couldn't this code be simplified even further?

@Araq
Copy link
Member

Araq commented Sep 25, 2017

Testing on a Linux machine is not good enough. Also: What about older Linux/disto versions?

@ghost
Copy link
Author

ghost commented Sep 25, 2017

Gnome-open was faced-out in circa 2012. CentOS 6.9 has xdg-utils it in its repo. Kde-open must be a relic from KDE-3 times cause it doesn't exist in KDE4.

shellExecuteA was removed from module winlean
discard shellExecuteA(0'i32, "open", url, nil, nil, SW_SHOWNORMAL)
var o = newWideCString("open")
var u = newWideCString(url)
discard shellExecuteW(0'i32, o, u, nil, nil, SW_SHOWNORMAL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems unrelated to xdg-open? Is this because the uri should always be utf-8?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes unrelated. I removed the condition because shellExecuteA is removed thus dead code.

@Araq Araq merged commit aac94e0 into nim-lang:devel Nov 19, 2017
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