Compiling a Qt based NPAPI Browser Plugin on Windows - windows

I am further developing a NPAPI Plugin in Qt. I got the source code and a precompiled windows (DLL) version of the Plugin. I added some functionality and tried to compile it using the default Build process of Qt Creator. In my edited case as well as in the original case the compiling worked perfectly well on windows and linux. The problem is, that the plugin itself is only usable on the linux machine. On Windows (XP SP3) there is an error mentioned, that my specific scriptable methods wouldn't exist. Is there a special way or toolchain for compiling on Windows? Or is there way to locate the failure?
Thanks in anticipation!

Here are some things to check and to try:
Set a breakpoint in NPP_New (you'll have to find it in QT's framework, I don't know where it is); step through until you find a problem
Make sure that NPP_GetValue is returning an NPObject on request; if not, then you definitely won't get any scripting API
Make sure that QT's framework isn't still trying to use XPCOM for scripting.

Related

Porting Linux project to windows platform with VS2015 using “mussel" library

I could find that vs2015 comes with mussel library which is more like to use POSIX calls. I went through the installation guide provided and through the official link, came to know that I need to run configuration file followed by make.
But the configuration file has not been provided with vs2015.
I request you to let me know the procedure if someone has done this before.
musl doesn't support Windows; from the FAQ page:
What are musl’s dependencies?
Linux 2.6 or later. Earlier versions will suffice for running most simple single-threaded programs, but due to bugs and conformance issues at the kernel level, musl is not offically supported on earlier kernels.
(now, Windows 10 does support running Linux binaries through WSL, but in that case you would be building musl through gcc inside the Linux "container" and it would be another kind of game entirely)
As it comes as VS2015 along with third party license I thought there should be a way to get it done. The folder location is Microsoft Visual Studio 14.0\VC\vcpackages\IntelliSense\iOS\OSS\musl-1.1.10
As said in the comment, from the folder name it seems that it's there just to aid IntelliSense when editing code for iOS targets.

Mac compiler on windows

Is it possible to develop cross-platform application on Windows and can also compile for Mac OS X from Windows? I have checked Qt but that requires one to compile from Mac using Xcode.
If this is your priority then one option would be Java as at least a jar file built on one platform can be run on another.
If however you're talking about C or C++...
If you are creating a small command line tool then you might be able to make this work with gcc and a cross compiler, but I think it would be a lot of work.
If however you are wanting to create a GUI application I would urge you to give up now. There are so many issues - you'd have to use Carbon or Cocoa APIs which you can't build for on any other platform, you'd have to link against frameworks which won't exist on your compilation host, you won't be able to easily generate .plist files. Qt won't help as you need to be able to build it, which relies on these same frameworks.
In short, there's no alternative to building on an actual mac.
Furthermore, when it comes to fixing bugs, you will absolutely have to do this on a mac (either physical or virtual).
From what I know , in general you do need a mac to make the executable , even for a simple ansi c program you need gcc for mac.
You can create MacPorts Portfile.(If your application is open source)
A MacPorts port is a set of specifications contained in a Portfile
that defines an application, its characteristics, and any files or
special instructions required to install it. This allows you to use a
single command to tell MacPorts to automatically download, compile,
and install applications and libraries.
Take a look at IMCROSS.
IMCROSS is a simple, scripted method of installing cross-compilers and
cross-compiled libraries on a Linux (or possibly other *nix) system,
so that you can develop programs targeted to run on Microsoft Windows
and Mac OS X at the same time and in the same environment as you
develop Linux versions of those programs.
You can certainly do this using Real Studio. It can create Mac OS X applications on Windows without any trouble.
It cross-compiles for Windows, OS X and Linux. And it does it from any platform. It also can create web apps.
Sounds like you should check it out.

Compiling Apache on Windows

I'd like to custom compile Apache for my Windows (Vista) machine. Do I need a special compiler for this, and how do I know if I already have a compiler (I have eclipse, but not sure if that's suitable).
Also, all I can find is linux tutorials. How would one get this done on Windows?
http://httpd.apache.org/docs/2.0/platform/win_compiling.html

How to make qmake compile multiple cross platform binaries

I'm using QT Creator on a project and was wondering if there's a single command to compile the project to a Mac, Windows, & Linux binaries so I can easily send them to other computers for testing without having to send over the whole source code. Currently I'm running the QT Creator on Mac OSX if that matters.
This is possible, but it isn't as simple as you imply. To properly do this, you would need to set up a cross-compiling environment complete with libraries already compiled for the other platforms, and compilers/executables compiled for your platform that produce output for the other platform. You would then need to keep track of all these variables somehow in your qmake file to be sure you're producing the correct output.

Bundling the Windows Mono runtime with an application

Regarding my earlier question about the Point of Mono on Windows, let's say that I develop an app against the windows mono runtime so that it will also run on Linux, OSX, etc.. and to make it more complicated, I use GTK# so that I don't have to deal with WinForms. Is there then an easy way to bundle the Windows Mono runtimes with my Windows version of the application so that it can all be installed at once? Or, is there no point to this? Once I develop against the Windows Mono runtime, would it still run fine against the MS .NET runtime? (I assume I would still need GTK# installed though).
The short answer is Yes.
The things you should take care about while programming are
Not to use platform API
Don't hardcode directory & file name separators, i.e. don't hardcode file paths, but use appropraite class to obtain path separator then concat the names.
Keep in mind that file names on *nx are case sensitve and on Windows are not. While programming don't refer to the same file as log.txt and Log.txt but keep it all small.
Other then that, if you created GTK# application on *nx system, you will be able to run it on Windows if you installed GTK# assembly, and vice-versa.
I did this myself, and it worked like expected. I had a problem to find specific assembly dll version of GTK# on Windows and that took me few hours.
In general, you probably would just use the .Net runtime on Windows. The installer for GTK# for .Net is available from Mono's download page. Your users would need this installed, and then could run you app using the regular .Net runtime.

Resources