Qt packaging for windows platform - windows

I'm looking for Qt packager for my Qt application targeted for windows platform.
I need it to create a nice installer to deploy and distribute my product on windows PC.
Which is best and recommended FREE packager?

For packaging I use the WIX (Windows Installer XML) toolset.
There are several advantages to using WIX:
Free and open-source
Creates MSI files, which allows your application to be easily deployed across large networks and correctly uninstalls (also very important)
Supported and developed by Microsoft, it is used by several other Microsoft teams internally, e.g the Visual Studio 11 Developer Preview installer features some of the latest WIX features
XML configuration allows reuse of components of installers (sets of files, feature sets)
Several types of user interface, new wizard pages can be created
Integrates into Visual Studio
Integrates into MSBuild - can allow consistent packaging to ensure you don't ship debug versions
I have used WIX for installers at work and for my own projects at home.
It isn't as simple as other solutions to get started, but once you've created a simple package, you'll find it easy to add new features.

NSIS is the way to go in my opinion. Straight forward scripting, compatible with all Microsoft Operating Systems and with support for User Levels.
Plus it has a huge active forum for any specific help you may need. I use the HMNSIS editor to write the scripts and have not come across anything it hasn't been able to do yet!

Qt has nothing that can help you, but the free Windows installer package creator is without a doubt NSIS

Inno Setup is a another good, free, light-weight installer system.

There is the Qt Installer Framework. That is a link to the manual for it. It is multi-platform. With it, you write XML files in a directory structure for delivery of components in the directories, called packages. It has scripting. You then compile it into a setup for your target platform.
Correct me if I'm wrong, but I was under the impression that they did not make it available to users of the Community edition until recent versions. When the earlier replies were written, it may well have been commercial version only.
Alas, nothing seems to warn you that you have to collect up components, nor tell you what they are, or even talk about the process; except that the 3rd. party, but free (Windows only), Dependency Walker can tell you what dynamic libraries are being used. I don't find it a necessity, but it can be helpful. (Tip: On Windows anyway, be sure to put "qwindows.dll" in a "platforms" directory with the exe. Tip #2: Make sure the Qt DLL's or static libraries are ones compiled for your compiler.)

Related

Custom installer for application in Visual Studio 2017

I need to generate an installer for my application but first I need to know if it is already installed on the system node.js, npm and other applications
Is it possible to include the installation of node.js within the installation of my application and to know if it is already installed?
I'm using Visual Studio 2017 and a WPF project for desktop applications
When the application is already installed I need to execute npm commands in the console for this reason I need to install them before or verify if they are installed correctly
I appreciate any help.
UPDATE: Advanced Installer: How to install a NodeJS web app. Really excellent videos IMHO.
Best Effort: I don't know much about Node.Js, and hence should not answer. But I haven't seen anyone else answering these questions either. Despite lacking experience, let me try to give a few suggestions.
Windows Installer: There seems to be an MSI you can use to deploy Node.Js. And there are some alternatives listed. (Essentially Chocolatey and Scoop).
Heads-Up: I have answered a more specific deployment question relating to a failed installation of the Node.Js MSI earlier: Node.js installation (windows installer) terminates prematurely on windows 10 64-bit. This may or may not be fixed.
Deployment: To deploy a prerequisite MSI before your own package installation, you can use a deployment tool capable of bootstrapping / sequencing / downloading - in other words to run several installation operations in a given sequence wrapped as a setup.exe. Or you could investigate the Chocolatey approach. With regards to the deployment tools, I am a bit tired of writing up the list of capacities these tools have and don't have. I will link to a few flavors of answers for this:
Prime Suspects:
Installshield Suite Projects - screenshot of Suite projects.
WiX Burn Bundle - beware: link overload. But there is a "Hello Burn" example. Official WiX documentation.
Advanced Installer - Prerequisites View - screenshot of view available in some project types.
One of the above tools should be able to do the job. Only WiX Burn is free and open source. Sometimes you can save a lot of time by going with a commercial tool. Obviously especially if your company already have a license for such a tool (which can be a days work to figure out).
Free Tools: In the realm of free-tools only and alternatives to WiX, some people use self-extracting archives made with 7-Zip and WinRAR and some other tools described here: Combine exe and msi file in one installer. I don't like this for security reasons and other reasons as explained in the link.
Simplicity: For corporate deployment a simple batch file or some custom construct distributed via your deployment system (SCCM, etc...) could suffice. Or even a zip with an embedded batch file to kick off your zipped installers in sequence could work. All depends on your scenario. I wouldn't roll with such an approach for global distribution.
And here are several other answers where I describe available deployment tools:
How to create a MSI file which simply copies a directory to Program Files?
Visual Studio 2017 Installer Project - include VC++ 2015 Redistributable
Some Links:
Create MSI from extracted setup files
Error Creating a 7-zip installer package
How to create windows installer
What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc
Nodejs - Another installation is in progress

Engines for creating installers

I'm looking for installation creator engines. I've checked NSIS and NDJS.
I would like to request for some additional information about them, or another tools I could use.
I'm not quite to figuring out whether they are tools in order for me to able to creator installer for several platforms
What's the state of NDJS? Both have not a good documentation. I'm not quite to able to figure out how's their state
Are both useful for .NET developed projects?
Are there any alternatives?
There is also Inno Setup which is free and amazing installation system.
I am not sure about NDJS but I can recommend NSIS and Inno Setup (see disclaimer below).
Both NSIS and Inno Setup are excellent. They are open source, well documented (yes this is true!), with large community and active development (NSIS has new release 3 days ago even during Christmas!).
NSIS is C like scripting language but a little more difficult to start with. Inno Setup is Pascal like language easier to learn.
Their capabilities are unlimited because of their scripting nature: you can do everything in them and even wrote C/C++/pascal/C# (maybe other) plug-ins if you need to execute something really special. They are useful for any Windows apps (native, .NET, plugin-s, drivers, firmware, from small apps to enterprise solutions).
To start with .net installer (Inno Setup) try e.g. this code: http://www.codeproject.com/Articles/20868/NET-Framework-Installer-for-InnoSetup
Disclaimer:
I tried several other commercial install system systems but none of them offered the same as NSIS/Inno Setup (for free). I use NSIS and Inno Setup daily and I recommend them as best install system available.
I am NSIS and Inno Setup professional and I develop professional installers in this systems (http://www.unsigned.sk). I also developed Microsoft Visual Studio and Embarcadero RAD studio extensions which integrate NSIS and Inno Setup into these IDEs and Graphical Installer which is skinning engine for installers.
Apart from what Slappy said I would like add Microsoft Xml type installer i.e. Wix into your list. Thought NSIS/Inno is a beautiful piece of tool to build installer system, Wix is more modern and directly accessible from Visual Studio projects.
Learning curve of Wix is a bit hard than these scripting languages but many companies are now using this Wix tool.

Storing Windows SDKs in source control?

The question is at the end - let me start by posing the context:
One of the problem we are facing at work when using Visual Studio is to make sure that everybody on the team is using the same version of the SDKs.
A typical problem would be to have somebody use a different Direct X SDK version resulting in a different behavior of the code, or somebody upgrading to a more recent Platform/Windows SDK in order to use some new API and having the code fail on other's programmers machines if they still use the previous version.
A way we used to solve the issue for other middleware has been to put the whole set of libraries, include files, tool chains, etc... in our source control system, and have our projects to use these so nobody has to install anything.
We also managed to do that with earlier version of the Direct X SDK, but we always ran into issues with the Windows/Platform SDK due to the close links between the SDK and the toolchain.
Since we now have to support both VS2010 and VS2012, and have to support from Windows XP to Windows 8 targets, we have to support v100, v110 and v110_xp toolsets.
This means that we need all the associated compilers and the corresponding SDKs, both on our developer machines and build systems: This is getting ridiculously costly to maintain, specially considering that random windows updates and .net framework releases routinely tend to break msbuild.
So the question is:
Is it possible to have Visual Studio to use non installed toolsets and SDK and instead having it use whatever is available in some folder out of the normal VS installation locations?
Bonus question: If it is doable, is it possible to do that without having to change any locally installed configuration file on the machine - ie: Have all that in the solution/project or property sheets - so if we change the structure on the source control system we don't have to update every single machine?
Thanks :)
This sounds too complicated, given how complex some of these tool installations are. I would solve this problem by investing in some PowerShell scripts that look at the installed tools and tool paths and "police" the installations. It would be relatively easy to check for installed versions of everything, including patches and updates. You can run those nightly, or as part of a build. Also, you can compare aspects of different installations, such as the tool versions installed on a developer box with your build server.
This would give you 90% of the value for 10% of the pain.
The problems you describe are not solved with your approach. What you actually need is a build server and a definition of done including using binaries built with the build server. You also need a test suite as part of the build definition with some invariants related to the build environment used.

VB6 Package and deploy setup ask system restart

I found Vb6 tools package and deployment. I used it and created a package or setup file from my running vista operating system. Later when i tried deploying it in clients computer with winxp, it asks for update of system file and ask to restart. The process never ends just ask for update and restart. how should i create setup file to avoid this problem?
Edit:
If i create setup file in Win98 and deploy it in clients Vista or winxp then it runs fine...
There is a very good chance you are trying to deploy system files that you shouldn't. Typical examples include MSVCRT components.
You receive multiple "System files are out of date" error messages when you install a Visual Basic 6.0 application
Using Win9x can mask the problem because ancient versions are packaged. During installation either setup1 will detect that newer versions are already in place or Windows will fend them off via System File Protection. Vista is much better at this than XP was.
Yes, the PDW is old. For that reason you should seek out the MSKB articles on usage tips, newer information, and on manually updating the files PDW uses as guidance (its REDIST folder, VB6DEP.INI and the .DEP files that accompany many controls).
Best practices for deploying Visual Basic 6.0 applications is a good generalized starting point.
Many of these sorts of issues have been answered over the years since VB6 and the PDW were released.
The VB6 package and deployment tool is really dated. It doesn't play well with some of the new security features.
It's probably trying to install old copies of the VB6 runtimes and then Windows is restoring its own copies.
It's been a while, but can you remove the VB6 runtime files from the files to deploy in the Package and Deployment Wizard? If so, do so. As long as the computer being installed on has the latest service packs it will already have the VB6 runtimes on it.
If that doesn't solve your problem then check what other system files your deployment project has in it. In most cases you won't need to deploy any system files as modern, patched systems should have them all. There are a few activeX controls that may not be on modern systems, but those shouldn't cause these endless restart problems.
Alternatively, try another install technology. You could create a setup project in modern versions of Visual Studio. Alternatively there are some very good open-source and commercial products.
I've used this one quite successfully in the past:
http://nsis.sourceforge.net/Main_Page

How can I create a setup file in visual basic 6 after completion of my programming work?

How can I create a setup file in visual basic 6 after completion of my programming work?
Front End language is Visual Basic 6,
Backend : MS Access 2003 and
Report Tools : Crystal Report 8.5. Operating System Windows XP.
You need to be a little clearer about some of this.
"Front end/back end" is really terminology and a thought pattern from the MS Access world. It doesn't really apply to VB6 development in any meaningful way unless you're doing something really odd like automating instances of MS Access.
That's about the only place where any "MS Access runtime" comes in as well. If you're actually using Access Reporting you might be doing this though - which seems odd but anything is possible.
See Deploying Complex Microsoft Office Access Runtime-Based Solutions.
Much more likely what you are trying to say is that you have a VB6 program that is using a Jet MDB as an embedded database, and using Crystal Reports 8.5 for reporting.
There should be no issue about any "runtime" for Jet on Windows XP, since Jet 4.0 is shipped as part of the OS even as far back as XP RTM (gold). It is also extremely unlikely that XP will have an MDAC release any older than 2.7 (see Microsoft Data Access Components (MDAC) release history).
So this leaves you looking for a way to package your VB6 program, any immediate dependencies such as possibly the VB6 runtime components, and the Crystal Reports 8.5 runtime components. You may also have INI files, etc. to bundle in there.
A long, long time ago (1998?) the PDWizard was replaced for most purposes by Visual Studio 6.0 Installer 1.0, and shortly after VSI 1.1 was released (1999?) which made up for a number of ills. This is a pretty basic tool for authoring Windows Installer packages, but it should meet your needs.
Along with this you'll want the recent merge modules for your dependencies: Merge Modules for Service Pack 6 for Visual Basic 6.0 and Visual C++ 6.0.
Then of course you need a merge module for Crystal Reports 8.5, and for this we have to turn to the community because BO didn't start releasing them until CR9. One place to look for this is InstallSite: Seagate Crystal Reports 8. Your real problem is that CR8.5 is ancient.
If this doesn't work out for you, you can always hope that CR8.5 Dev installed on your machine with a "good enough" set of .DEP files (which tell setup authoring tools what subdependencies each dependency has, among other things). This may still let you use VSI 1.1 to succesfully package your application with CR8.5.
You might also look at for-pay packaging tools as already suggested. If desperate enough you might look at some legacy installer technologies too, just in case their communities have addressed your issues.
If I misunderstood and you really do use your VB6 program to automate an instance of the "MS Access 2003 Runtime" you'll probably have to build some hybrid package.
But normal VB programs do not use Access or Access Runtimes to open and work with Jet databases.
You can search google for package and deployment vb6
and you will find millions of links showing in steps how to do that.
The Package & Deployment Wizard is quite primitive and not well-suited to distributing things like the MS Access runtime and Crystal Reports. You'd be better off using one of the more powerful commercial products like InstallShield or Setup Factory. However, these can be pricey (especially InstallShield).
There are also free products like Inno Setup and Nullsoft, but these may not be as easy to use or may lack some important features.
Bob's suggestion of using Visual Studio Installer 1.1 for a Visual Basic 6 application is sound but the Microsoft link he has given for the download does not work. I guess MS thinks nobody needs VB6 anymore. After searching a little I found a 2008 snapshot of MSDN page in web.archive.org complete with setup files:
http://web.archive.org/web/20080513102621/http://msdn.microsoft.com/en-us/vstudio/aa718352.aspx
Good suggestions above.
While it might seem unlikely that VB6 app could possibly be in use, there are those of us in the public sector that keep VB6-like apps and even Access apps alive because public dollars are not in a hurry to replace app that still work. A frequent mantra heard in many places is that you leave it alone if it is not broken. Broken enough that is--otherwise baling wire works just fine as long as VB/VBA developers can still found.

Resources