Using GTK3 link button under Windows - windows

I'm using the GTK3 and compiling under both Linux and Windows (with Mingw64), and I'm having a problem with the GtkLinkButton. I set a URI in my program and it works fine under Linux, but when I run it under Windows and click on the button nothing happens.
I've found the following documentation for gtk_show_uri_on_window, which does the actual work for GtkLinkButton:
This is a convenience function for launching the default application to show the uri. The uri must be of a form understood by GIO (i.e. you need to install gvfs to get support for uri schemes such as http:// or ftp://, as only local files are handled by GIO itself).
Presumably this means I need to install GVFS under Mingw64. However saying pacman -Ss gvfs doesn't find any packages.
Is there a way to get URLs to work in GTK when running on Windows?

After doing some digging I found this question with a number of answers. It seems that the Right Thing is to copy the following executables into my application bin folder:
gspawn-win64-helper.exe
gspawn-win64-helper-console.exe

Related

Firefox cannot open "libgtk-3.so.0". How to circumvent?

I have two CentOS VMs which use Jenkins to run automated tests through firefox. Both have firefox installed. Both versions of firefox are the same (firefox-56.0.1). I do not know if they are both x86_64 or some other type, but whichever they are, they are the same. (I am using the same .tar.bz2 file. I copied it from one instance to the other.)
In one instance, I am able to run firefox. "firefox --headless" returns "*** You are running in headless mode."
After copying the .tar.bz2 file to the other instance and installing firefox, I find that the new instance does not have the same performance. "firefox --headless" returns the following:
XPCOMGlueLoad error for file /usr/local/firefox/libmozgtk.so:
libgtk-3.so.0: cannot open shared object file: No such file or directory
Couldn't load XPCOM.
What might explain this difference? It appears that I did something right in the first instance, but I cannot tell what. Is there some setting that will prevent firefox from trying to use the "libgtk-3.so.0" file? This file does not exist on either instance.
I've seen this question elsewhere, but the answer seems to focus on versions (I know my version has worked in the first instance) and a particular bug that has been backlogged (this bug only bothers me for the new instance).
Problem solved minutes after asking the question.
Simply run:
yum info gtk3
Check if gtk3 is installed. If not:
yum install gtk3
My old instance had gtk3 version 3.22.10 installed. My new instance had the same available but not installed. I don't recall seeing this in any of the guides to running firefox headlessly, but a search result that I did not originally think worth checking was able to resolve this rather quickly. Credit to the folks at https://forums.fedoraforum.org/showthread.php?310652-Udating-Firefox-fedora-19
For Ubuntu or Debian distros use:
apt-get install packagekit-gtk3-module
You probably installed the wrong firefox version for 32bit on a 64bit system.
try downloading firefox with this portable installer download-mozilla-portable.sh which should work on a 64bit linux (tested in Ubuntu 19.10)

pycharm swig how to? [windows]

I would require some guidance in regards to installing a module/package in pycharm (free edition). I have to mention that i have not worked with this IDE yet and wanted to try it out on a little project containing smartcards.
When i try to install "pyscard" i get the error that boils down to
error: command 'swig.exe' failed: No such file or directory
People say just install SWIG, which i guessed already ^^.
The issue i have is that i actually have no idea how to... and none of the pages i found has really enlightended me on this issue.
I downloaded the zip "swigwin-3.0.12" but i am at a loss what to do with it now. EDIT: According to the SWIG page this is an already compiled version and i have to somehow make pycharm recognize that the folder it is in contains the swig.exe it requires.
EDIT2: Adding the folder containing the swig.exe to the PATH variable also did not work ... which i thought would be the issue
EDIT3+Answer:
Ok the link in the comments from "wp78de" was correct my problem was that pycharm/pc restart were needed for it to catch the added PATH variable to the swig.exe (for pycharm that is)
Any advice is appriciated.
Envoirment:
Windows 8.1 Pro 64-bit
Pycharm 2017.2.4
Python 3.6
Basically, you just have to add the directory that contains the swig executable the PATH environment variable. You can do it via CMD or the Windows UI.
If you have added swig to your path, you should be able to call it in the command prompt from any directory: open "cmd", and type swig --help" on that prompt.
A restart of PyCharm (or whatever your IDE is) and Windows might be required.

DSS(Darwin Streaming Server) install failed on OS X10.10

I want to build a Darwin Streaming Server on my mac for iOS development test. But after taking the following steps which I searched from google, it fails all the time.
Method 1:
Download from http://dss.macosforge.org/ ->Mac OS X Install -> Streaming Server;
Install the dmg;
It tries to open http://127.0.0.1:1220/ but fails with "This webpage is not available ERR_CONNECTION_REFUSED".
Method 2:
Download the source code of 6.0.3 version;
$ tar xvf DarwinStreamingSrvr6.0.3-Source.tar
$ cd DarwinStreamingSrvr6.0.3-Source
$ wget http://www.abrahamsson.com/dss-6.0.3.patch
$ patch -p0 < dss-6.0.3.patch
$ ./Buildit
Then, it fails with the following words.
Darwin Streaming Server
I don't know your platform. I'll assume this is a Linux x86 platform.
Please edit the BuildServer script & PlatformHeader.h to add your platform.
Building for Darwin.x86_64 with gcc
xcodebuild DarwinStreamingServer
=== BUILD LIBRARY TARGET AtomicLib (Library) OF PROJECT StreamingServer WITH CONFIGURATION Development ===
Check dependencies
Jam is deprecated and has been removed; targets that use Jam must be upgraded to native targets. For more information on doing this, consult the Xcode documentation.
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)"
I tried to run ./Install, it showed me
Unable to perform install
You must be logged in as root to install Darwin Streaming Server
and I don't know what to do now.
PS: I've installed Xcode on my mac and didn't find any available document about Darwin Streaming Server, or I missed it?
Hope for any help. Thanks.
Calios and Jessica, thank you for your answers. I'm running using OS Windows 7 and installing DSS 5.5.5 for windows, and I also meet the condition same as with you.
However, after I followed your instructions, it's not close enough with our needs, because the button will lose meaning in presentation.
So I started digging more information from another articles, and I found interesting perception from a developer at this article. He said the following:
Maybe this has something to do with the perl script which generates the web sites?*
So starting from Jens's perception, I tried to downgrade my Perl Script from version 5.26 to 5.8. This resolved my problem, the interface displays correctly as in the DSS Tutorial.
Right now I'm still working on testing the DSS function
I hope this solution will help others.
Well, finally I solved this issue with the help of my friend.
Here's the steps of solution.
I've given up compiling and building on my own and downloaded the dmg file.(version 6.0.3)
Install the dmg as directions.
Then, go to /usr/sbin in terminal and find streamingadminserver.pl and QuickTimeStreamingServer.
Run them.
Check if they're running with ps aux|grep streaming.
Open http://localhost:1220/parse_xml.cgi in Safari or Chrome. It will show some textfield and a button.
However, there's no words at all ! Go to /Library/QuickTimeStreaming/AdminHtml and edit setup_assistant2.html.
Find line 333 and change it from return "$message{$name}"; to return $name;.
Then it shows some understandable words, though not exact words.
Till now, it can be partly work. However, in some steps I mentioned above, for example, html editing step, I really don't know why the words just don't show and just have a try.
Save the exact steps I did here for memory. It will be wonderful if it can help anyone or anyone have some good idea about it.
Thanks.
#SouravGupta, I am a newbie for stackoverflow, so I could not add comment to reply your question.
I just installed DDS 6.0.3 on Mac OS X El Capitan. I hit the same problem you had. I found that ** return "$message{$name}"; ** is no longer in setup_assistant2.html. It is in parse_xml.cgi (/Library/QuickTimeStreaming/AdminHtml). Just search for "sub foundString". There were two return places there. You need to change both in order to make it work.
It seems that DDS web admin software has localization function. Html files only contain string keywords. It suppose to use that "foundString" function to get translated string from keywords. However, for some reason, it returns empty string here even if there is a "messages" file inside html_en folder. I could not spend more time to figure out why right now.
QTSS/DSS Web Admin 6.0.3 requires Perl version 5.16 and earlier. OS X 10.11 El Capitan installs both Perl versions 5.16 and 5.18, but it defaults to using Perl version 5.18.
In order to run QTSS/DSS Web Admin in OS X 10.11 El Capitan, you need to examine each of the Perl script (.pl) within the AdminHtml folder and change the line #!/usr/bin/perl to #!/usr/bin/perl5.16.

How do I install and use cURL on Windows? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I am having trouble getting cURL to run on Windows.
I have downloaded a cURL zip file from here, but it seems to contain source code, not an executable.
Do I need to compile cURL to run it? If yes, then how do I do that?
Where can I find .exe downloads for cURL ?
I have looked for documentation on installing cURL, but there is little to be found.
You might already have curl
It is possible that you won't need to download anything:
If you are on Windows 10, version 1803 or later, your OS ships with a copy of curl, already set up and ready to use.
If you have Git for Windows installed (if you downloaded Git from git-scm.com, the answer is yes), you have curl.exe under:
C:\Program Files\Git\mingw64\bin\
Simply add the above path to PATH.
Installing curl with a package manager
If you are already using a package manager, it may be more convenient to install with one:
For Chocolatey, run choco install curl
For MSYS2, run pacman -S curl
For Scoop, run scoop install curl
For Cygwin, add the curl package in Cygwin Setup. EDIT by a reader: Cygwin installer design has changed, please choose curl packages as follows:
Installing curl manually
Downloading curl
It is too easy to accidentally download the wrong thing. If, on the curl homepage, you click the large and prominent "Download" section in the site header, and then the large and prominent curl-7.62.0.tar.gz link in its body, you will have downloaded a curl source package, which contains curl's source code but not curl.exe. Watch out for that.
Instead, click the large and prominent download links on this page. Those are the official Windows builds, and they are provided by the curl-for-win project.
If you have more esoteric needs (e.g. you want cygwin builds, third-party builds, libcurl, header files, sources, etc.), use the curl download wizard. After answering five questions, you will be presented with a list of download links.
Extracting and setting up curl
Find curl.exe within your downloaded package; it's probably under bin\.
Pick a location on your hard drive that will serve as a permanent home for curl:
If you want to give curl its own folder, C:\Program Files\curl\ or C:\curl\ will do.
If you have many loose executables, and you do not want to add many individual folders to PATH, use a single folder such as C:\Program Files\tools\ or C:\tools\ for the purpose.
Place curl.exe under the folder. And never move the folder or its contents.
Next, you'll want to make curl available anywhere from the command line. To do this, add the folder to PATH, like this:
Click the Windows 10 start menu. Start typing "environment".
You'll see the search result Edit the system environment variables. Choose it.
A System Properties window will popup. Click the Environment Variables button at the bottom.
Select the "Path" variable under "System variables" (the lower box). Click the Edit button.
Click the Add button and paste in the folder path where curl.exe lives.
Click OK as needed. Close open console windows and reopen, so they get the new PATH.
Now enjoy typing curl at any command prompt. Party time!
Assuming you got it from https://curl.haxx.se/download.html, just unzip it wherever you want. No need to install. If you are going to use SSL, you need to download the OpenSSL DLLs, available from curl's website.
Download curl zip
Extract the contents (if you have downloaded the correct version you should find curl.exe)
Place curl.exe in a folder where you keep your software (e.g. D:\software\curl\curl.exe)
To run curl from the command line
a) Right-hand-click on "My Computer" icon
b) Select Properties
c) Click 'Advanced system settings' link
d) Go to tab [Advanced] - 'Environment Variables' button
e) Under System variable select 'Path' and Edit button
f) Add a semicolon followed by the path to where you placed your curl.exe (e.g. ;D:\software\curl)
Now you can run from the command line by typing:
curl www.google.com
Starting with Windows 10 version 1803 (and earlier, with insider build 17063), you don't install curl anymore. Windows includes a native curl.exe (and tar.exe) in C:\Windows\System32\, which you can access right from your regular CMD.
C:\Users\vonc>C:\Windows\System32\curl.exe --version
curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL
Release-Date: [unreleased]
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL
C:\Users\vonc>C:\Windows\System32\tar.exe --version
bsdtar 3.3.2 - libarchive 3.3.2 zlib/1.2.5.f-ipp
See the initial announcement and the release announcement.
The simplest tutorial for setting up cURL on Windows is the Making cURL work on Windows 7. It only have 3 easy steps.
Download cURL (Win64 ia64 zip binary with SSL)
Extract curl.exe into "C:\Windows\System32"
Done
Even more easier:
Download the Win64 2000/XP x86_64 MSI installer provided by Edward LoPinto.
At the time of writing file curl-7.46.0-win64.exe was the most recent. Tested with Windows 10.
It's probably worth noting that Powershell v3 and up, contains a cmdlet called Invoke-WebRequest that has some curl-ish capabilities. The New-WebServiceProxy and Invoke-RestMethod cmdlets are probably worth mentioning too.
I'm not sure they will fit your needs or not, but although I'm not a Windows guy, I have to say I find the object approach PS takes, a lot easier to work with than utilities such as curl, wget etc. They may be worth taking a look at
Note also that installing Git for Windows from git-scm.com also installs Curl. You can then run Curl from Git for Windows' BASH terminal (not the default Windows CMD terminal).
As you already know, you can find several packages of binaries on the official curl website.
Once you download a package, unzip it wherever you want. I recommend adding its location to your path, so you can call curl from batch or powershell scripts. To add a directory to your path type "environment variables" in the start menu, and select "edit user environment variables". Select Path, and add to the end of the "value" box: ;C:\curl\directory (with the directory changed to where you saved curl.)
If you want to use SSL you need a certificate bundle. Run either mk-ca-bundle.pl (perl) or mk-ca-bundle.vbs (VBScript). Some of the packages of binaries include one or both of them. If your download doesn't include one, download one here: https://github.com/bagder/curl/tree/master/lib. I recommend mk-ca-bundle.vbs, as on windows you simply double click it to run it. It will produce a file called ca-bundle.crt. Rename it curl-ca-bundle.crt and save it in the directory with curl.exe.
Alternatively, I recently developed an msi installer that sets up a full featured build of curl with just a few clicks. It automatically ads curl to your path, includes a ready-to-use ssl certificate bundle, and makes the curl manual and documentation accessible from the start menu. You can download it at www.confusedbycode.com/curl/.
Install Chocolatey package manager for Windows. Once installed, simply enter choco install curl. Then you can use curl from a terminal.
Thought I'd write exactly what I did (Windows 10, 64-bit):
From the download page https://curl.haxx.se/download.html choose the download wizard https://curl.haxx.se/dlwiz/
Choose curl executable.
Choose Win64.
Choose generic.
Choose any.
Choose x86_64.
Choose the first recommended option. For me this was:
curl version: 7.53.1 - SSL enabled SSH enabled. Provided by: Viktor Szakáts. This package is type curl executable You will get a pre-built 'curl' binary from this link (or in some cases, by using the information that is provided at the page this link takes you). You may or may not get 'libcurl' installed as a shared library/DLL.
The file is packaged using 7zip. 7zip is a file archiving format.
Click download.
You should have the file curl-7.53.1-win64-mingw.7z in your downloads folder.
Install 7-Zip if you don't have it.
Right-click, 7-Zip, Extract Here. Copy and paste the extracted file somewhere like Z:\Tools\
If you look in the bin folder you'll see curl.exe. If you double-click it a window will quickly flash up and vanish. To run it you need to use the Command Prompt. Navigate to the bin folder and type curl followed by your parameters to make a request. You must use double-quotes. Single quotes won't work with curl on Windows.
Now you'll want to add curl to a user's Path variable so you don't have to navigate to the right folder to run the program. Go to This PC, Computer, System Properties, Advanced system settings, authenticate as an administrator (you're not running as admin, right? Right?) Environment Variables, System variables, look at the list and select Path, then Edit, then New, then, e.g.
Z:\Tools\curl-7.53.1-win64-mingw\bin
You can add a trailing backslash if you like, I don't think it matters. Click move up until it's at the top of the list, then you can see it easily from the previous screen. Click OK, OK, OK, then crack open a Command Prompt and you can run curl by typing curl from any folder, as any user. Don't forget your double-quotes.
This is the answer I wish I'd had.
You can build the latest version of curl, openssl, libssh2 and zlib in 3 simple
steps by following this tutorial.
Curl is built statically so you do not have to distribute the prerequisite dynamic runtime.
You can also download a prebuilt version (x86 and x64) from SourceForge.
I had a lot of issues with curl for Windows. I finally used Cygwin, which includes curl by default.
I was looking for the download process of Curl and every where they said copy curl.exe file in System32 but they haven't provided the direct link. so here it is enjoy, find curl.exe easily in bin folder just
unzip it and then go to bin folder there you get exe file
link to download curl generic
This installer made it easy for me
http://www.confusedbycode.com/curl/
The link describes how to use it. Here's a summary taken from the website above:
"You can install cURL for Windows with only a few clicks. Just download and run an installer from the table below, and click Install. The default installation includes:
curl.exe
an SSL certificate bundle (ca-cert-bundle.crt)
SSL certificate bundle generation scripts (mk-ca-bundle.pl & mk-ca-bundle.vbs)
HTML manuals for cURL and libcurl
text documentation formatted for Windows (so you can simply double click the files to read them with Notepad)
Start Menu folder with shortcuts to the cURL installation folder, manuals, documentation, and uninstaller
cURL added to your path, so you can use it with batch or PowerShell scripts and call it from the command prompt in any working directory
To include developers' files in your installation, click Advanced. The developers' files include libcurl.dll, libeay32.dll, ssleay32.dll, libssh2.dll, zlib.dll, msvcr120.dll, C headers, libs, and code examples.
When you click Advanced you can also choose whether or not to install the documentation and manuals, and whether or not to add cURL to your path.
If you don't have administrator privileges on your computer, use one of the files from the "Without Administrator Privileges" row. These install cURL in C:\Users\Name\AppData\Local\Apps.
If you do not want to use the installer, but still want the contents listed above, you can download one of the zip archives."
Just download curl and extract the compressed file. You will get the file "curl.exe". Open a CMD Shell, drag the file curl.exe into the CMD Shell, now you can use curl.
After adding curl.exe's path to the System Variable 'Path'
you can open command prompt and run 'curl -V' to see if it is working.
Follow download wizard
Follow the screens one by one to select type of package (curl executable), OS (Win64), flavor (Generic), CPU (x86_64) and the download link.
unzip download and find curl.exe (I found it in src folder, one may find it in bin folder for different OS/flavor)
To make it available from the command line, add the executable path to the system path (Adding directory to PATH Environment Variable in Windows).
Enjoy curl.
Statically built WITH ssl for windows:
http://sourceforge.net/projects/curlforwindows/files/?source=navbar
You need curl-7.35.0-openssl-libssh2-zlib-x64.7z
..and for ssl all you need to do is add "-k" in addition to any other of your parameters and the bundle BS problem is gone; no CA verification.
I have successfully used Windows curl-installer: http://open-edx-windows-7-installation-instructions.readthedocs.io/en/latest/6_Install_cURL_for_Windows.html
by using cURL for Windows direct download link with msi-installer.
Remember to reboot your system after installing.
Download curl for windows from the path : https://curl.haxx.se/windows/
Unzip and you will find the ..\bin\curl.exe
Add ...\bin\ to your path variable for easy global access
I tried to install curl in many ways but finally started using gitbash terminal for curl commands.
I followed #theglauber's answer (the most popular one) but on Windows 10 Terminal / PowerShell the Environment setting did not take effect.
I had to CD into the GIT location and also use .\ like below:
PS C:\Program Files\Git\mingw64\bin> .\curl -X POST https://6sl8yohih.execute-api.us-west-1.amazonaws.com/dev/hello
I did not have any issues on the regular command prompt though.
Just posting this as an answer for someone who might be struggling as I did.

How to set up Jeash for Haxe?

I am trying to setup Jeash for Haxe, so I read this: http://old.haxe.org/com/libs/jeash/firststeps
Now, I found out that I cannot do that just yet:
"This is the first time you are runing haxelib. Please run haxelib setup first"
(and I love the typo in there :P )
So I decided to read this: http://haxe.org/com/haxelib/setup
I tried what is suggested. First command, I get prompted for a password, so I enter what is necessary when I install software on my comp.
Then I ran "sudo chown jansensan -R /usr/lib/haxe" (replacing "myusername" with my actual username, "jansensan") and then I get an error: "chown: -R: No such file or directory"
Is there a way to get a little bit more information? I mean, the explanation on the Haxe website makes it sound as it if will magically happen, and it is not the case.
For anyone interested (if it helps you understand my issue), my computer is a MacBook Pro running Snow Leopard and I intend to code in FDT. BTW, I can already do some Haxe stuff in FDT, why would I need to run the Haxe setup to be able to install Jeash and NME?
haxelib is a lib repositories .It adds libs to your workflow. jeash and NME are one of them.
once you have installed haxe. you just have to run in the terminal haxelib setup.Normally it goes fine.
I'm on macpro snow leopard too.Never had issues with that !.
test haxelib on terminal .. wath does it tell ?
Another alternative is to use the NME installer:
http://www.haxenme.org
It will install Haxe, Neko, HXCPP, NME and Jeash in one go. NME supports Windows, Mac, Linux, Android, iOS, webOS, Flash and HTML5 -- the HTML5 target handled using Jeash.
You're using FDT and no other Haxe installation right? This is important because FDT comes with it's own 'installation' of Haxe.
You have it two ways:
Add it to Haxelib.
Just download the source code and put the jeash library in the
project your using.
Add it to Haxelib.
For command line: you're going to need to make haxelib visible to your command line.
Get started by typing 'which haxelib'. This will tell you
1) if you have haxelib via command line.
2) Where it is.
If there is an error, then it's not visible to your command line. This is ok, you'll just need to add the whole path when calling it. Like this:
Also notice that since FDT 5 is shipped as an OSX bundle you'll have to go 'inside' of it via right click FDT -> 'Show Contents'.
When you have this path (or if you are using your own version of the haXe SDK ), you can use it to call haxelib.
Add it to source path
Download the library source code and physically add it to your source path.
All these suggestions are quite good. An alternative to dealing with all this Terminal writing is to go to http://www.haxenme.org/developers/get-started/ and use the installers provided. Afterwards, go in the prefs of FDT > Haxe SDK and add the path where the haxelib was installed, "/usr/lib/haxe" most likely.

Resources