Visual Studio and QT rights? - visual-studio

I want to make small programs for my father company(small company).I want to make his life easier by making small programs for everything he needs(mostly DATABASE MANAGMENT or SCHEDULE MANAGEMENT).I want to program in c++ using visual studio and qt for user interface. But I only have the community visual studio edition and the free qt edition. I am allowed to make programs for his company even thought I didn't buy those software?(qt and visual studio)
Note:The programs will only be used by him! not by his employees.

First, please note that this is a technical forum, not a legal forum.
Anyway here are some elements to think about:
Qt
Qt is available for free under the LGPLv3 or the GPLv3. That means that you can do whatever you want with Qt as long as you comply either with one or the other.
GPL
In practice, it means that if you distribute the application you must also distribute your source code.
LGPLv3
If you distribute the application, you must provide a way for end users to relink against a modified version of Qt. If you use dynamic linking it simply means that the user shall be able to change the Qt dll (or .so) files. But you have to keep in mind that not all Qt modules are available under LGPL, some are published only under the GPL. (https://www.qt.io/licensing-comparison/)
For your case, it seems that you are not going to distribute the application so you do not really care.
Visual Studio Community
On the website we have:
For organizations
An unlimited number of users within an organization
can use Visual Studio Community for the following scenarios: in a
classroom learning environment, for academic research, or for
contributing to open source projects.
For all other usage scenarios:
In non-enterprise organizations, up to five users can use Visual
Studio Community. In enterprise organizations (meaning those with >250
PCs or >$1 Million US Dollars in annual revenue), no use is permitted
beyond the open source, academic research, and classroom learning
environment scenarios described above.
So basically either you must make your apps open source or your father's company should not have more than 250 PCs or make more that 1 million $ a year.
If you are not illegible your could use:
IDE:
Visual Studio Express (but does not support Qt plugins and the 2017 version is not available)
Qt Creator
any IDE that support qmake or cmake projects
Compiler
MinGW (provided in the Qt Online installer)
Visual C/C++ compiler (provided as part of Visual Studio or as a standalone as "Build Tools for Visual Studio")

Related

Continuing work with QT

I've been doing a fun project using a trial verion of QT Creator (QT 5.9). The trial ended, is there any way of continuing the work? I have heard of an open source verion of QT libraries. How do I use them? For example in visual studio 2017? Is there any sort of a replecemnt for QT in creating a window applications?
Answering your first and most important question: An open source package of Qt is available under the terms of LGPLv3, also for Windows. The Qt licensing page, where you'll also find links to advanced topics, states:
The Qt open source licensing is ideal for use cases such as open source projects with open source distribution, student/academic purposes, hobby projects, internal research projects without external distribution, or other projects where all (L)GPL obligations can be met.

How do you install Microsoft Visual Studio 2017 with minimal features?

The reason I ask is I want a small installation size and I only use the product for writing code for school work. I will not need 3rd party software, web capability, or integration with other software and applications.
In a comment now you requested for "command line to run the web installer in a certain predefined way say only download and install visual studio core editor and.net components". BTW, the recommendation including installing .NET components was a part of my original answer- now I splitted the answers, one for minimal install and this one for what you requested secondly, including .NET Visual Studio components:
The command line to install core and .net minimal is:
vs_xxxx.exe --layout %CD%\vs2017offline --lang en-US --add Microsoft.VisualStudio.Workload.ManagedDesktop
(set your individual downloaded .exe name for 'vs_xxxx.exe', my downloaded name was for example 'vs_enterprise__873301792.1489161815.exe')
The new installer for Visual Studio gives you a lot of flexibility about which components to install. By default, you'll have no additional features selected. VS will only install what it calls the Visual Studio core editor, which is described as:
The Visual Studio core shell experience including syntax-aware code editing, source code control and work item management.
With this, you'll get support for TextMate language grammars (you can install any you want), but you won't have the overhead of installing any language services or project types. So far, VS is a glorified editor; this minimal install will take 600MB. If you're looking for something smaller, you should probably consider Visual Studio Code instead.
Workloads
The first tab of the new VS installer is the Workloads section. This gives you some pre-packaged feature groups targeted at specific development platforms. There are separate categories of workloads (Windows, Web, Gaming, and Other) and taking the Windows category for example, there are 3 different workloads available: UWP, .NET Desktop (like WinForms and WPF), and C++ Desktop development.
Each workload has required and optional features. Some of the optional features will be selected by default as they are "recommended". You can slim down by unselecting these.
If the workloads are too heavy-handed for you, you can use...
Individual components
On this tab, you can piece together any single components you want. If a workload seems too large, you can see what components it would install, then go to this tab and pick the smaller set you would like.
Note that some components do have dependencies (sometimes numerous), and the installer will show you all of the dependent packages added. If you try to remove them, it will notify you of dependent components that will also be removed.
You have the following alternatives:
1.
Minimal Visual Studio: Start the standard Visual Studio web installer, and select nothing, then you get the minimal installation for only the development environment (IDE), especially editor.
2.
If this is too big for you, you can use something similar to Visual Studio, for example, you can Visual Studio Code editor or you can use SharpDevelop as an alternative to Visual Studio. Open Source and smaller footprint.
You can work with every editor on the commandline using "csc.exe myhomework.cs" (CSharp compiler).
3.
The solution with smallest footprint (without Visual Studio):
Just use the editor you are used to, even notepad is possible: Depending on your .NET version and Windows directory, the compiler can be found for example here:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe
or
C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe
The 64 bit versions of those you get in the mirrored folders "Framework64" instead of "Framework"..
Normally you would like to download the whole .NET SDK (developer pack) additionally, but for a single homework, csc.exe might be enough.
Here is the developer pack for .NET 6.2 framework (Visual Studio uses that as kind of a kernel too).
https://www.microsoft.com/en-us/download/details.aspx?id=53321

How to deploy a Win32 API application as an executable

How can I deploy my Win32 application as an EXE application so that others (who don't have VC++ installed) can use it?
I am using VC++ 2010 on Windows 7.
If you switch to "Release" mode when you compile your finished program (rather than "Debug", which you use for debugging it during development), you should get an executable that will run on a computer without Visual Studio installed.
However, that executable will still require the appropriate version of the C runtime library to be installed. For example, if you developed it in Visual C++ 2010, you will need version 10 of the CRT installed. This is a freely redistributable library, downloadable here.
So, you have several options for deployment:
Manual Deployment
Give people the bare executable file, and include the installer for the redistributable in another folder on the installation media. If they copy the executable to disk and cannot run it because they get an error message, they should install the CRT libraries from the included redistributable installer. Then the executable will run just fine.
This works great if you have relatively a computer-savvy audience, or you're deploying to a fixed range of machines (like across a school or corporation). But it doesn't work so well for general deployment to customers.
In fact, you don't even need the installer. You can just place the CRT DLLs in the same folder as your executable and it will run just fine. This is how I test apps I'm developing on clean VMs. It works like a charm. There's no need to run the CRT installer at all. You'll find these required libraries as part of your Visual Studio installation:
<Program Files folder>\Microsoft Visual Studio 10.0\VC\redist\x86
Automated Deployment
Create a setup program that automatically installs your application along with any dependencies it requires, including the CRT redistributable. This is what you see most commercial applications doing. I recommend it for anything but the most trivial of apps.
Full versions of Visual Studio 2010 (i.e., not Express versions) can create a Setup Project that you can customize as needed to work as an installer for your application. But this is no longer the recommended way to create an installer, and this functionality has been removed from the latest version of Visual Studio, 2012.
So I recommend using something else, even if you have an older version of VS where the Setup Project is available. No point in wasting time creating something you'll just have to update later. My personal favorite choices for creating setup programs are WiX and Inno Setup. Both are free, and extensive documentation is available online.
Creating simple setups that don't have to do very much is really quite straightforward—this is likely the case for you, as all you need to do is install the CRT redistributable if it is not already there. I'd be willing to bet money you can find a walkthrough or example online for how to do this in either WiX or Inno Setup.
If you need to do more complicated stuff, both of these setup packages support it. They are extensively customizable and very powerful, it just takes more work to get it all going.
Static Linking
If you absolutely need to be able to distribute a bare executable that is guaranteed to simply work when double-clicked, you will need to switch your project to statically link in the required runtime libraries. This means that all of the CRT code is actually embedded by the linker directly into your executable, and means that you don't have to redistribute the CRT libraries separately.
The disadvantage of this approach is that the only way to benefit from improvements, bug fixes, and security patches released for the CRT is to recompile and redistribute your application. If you dynamically link (the default), your app will automatically benefit from enhancements to the installed version of the CRT libraries. Microsoft strongly recommends against static linking.
To switch between these modes in Visual Studio, follow these steps:
Right-click on your project in the Solution Explorer and select "Properties".
Ensure that the "Release" configuration is selected in the drop-down box at the top of the dialog.
Expand the "C/C++" item in the TreeView, and select "Code Generation".
Change the setting of the "Runtime Library" option to "Multi-threaded (/MT)".
A further description on what these cryptic compiler switches mean and which ones you should use when is given in my answer here.
Final Note: The "Debug" versions of the CRT libraries are not redistributable, but that doesn't matter because you should always distribute the "Release" build of your app anyway, never the "Debug" build.
In general, the odds are pretty good your EXE file will run on any version of Windows you built it on or higher.
All bets off, for example, if you built using Visual Studio 2012 Professional on Windows 7, and you try to run it on Windows 95. But otherwise, you're probably safe :)
The best way to test if you have any dependencies is to install and run on a "clean machine".
The best way to get (and reuse) a "clean machine" is with a VM.
I recommend VMWare. But Virtual Box and Windows Virtual PC are also viable choices.
As far as an installer, I'd strongly encourage you to look at InnoSetup
I hope that helps!
Make sure you build in release mode. As Floris Velleman said, you're using unneeded libraries for standalone executable.
For more information, you can check Compiler Options (MSDN).

Visual Studio quickstart for *nix / OS X / Xcode developers

I've been writing C/C++ for years using Xcode and am very comfortable with *nix systems. Now I'm working with people who only understand Windows; I've decided to try to learn that environment too.
I was thinking that google would be my best friend, but even the terminology for VS is sufficiently orthogonal to that of Xcode that I can't make any headway. (E.g., what's the equivalent of "Add new Target to project" for VS?)
Can anyone point me to a guide to VS for Xcode practitioners? I've seen lots of translators going the other direction.
Thanks!
I do not know of any XCode to VS Guide, but according to XCode Documentation:
A target specifies a product to build and contains the instructions for building the product from a set of files in a project or workspace.
The analogous concept in Visual Studio would be a project. In Visual Studio, a project contains code files, assets and settings which compile into an output of some sort. (Could be an executable, a DLL, a website, or a few other options...) Projects can reference other projects or other external libraries (System or user libraries) which are all delivered together at compile time.
A solution contains multiple projects which can be related (referenced) and compiled and linked together.
When you first start VS, it will ask you to Open or Create a project. It usually will automatically create a solution and automatically add the project to it. To add additional projects, you can right click the solution in the "Solution Explorer" and add another project.
Hope this helps
I believe what you're looking for is the Build Configuration Manager in Visual Studio. (It's been a while since I've used XCode). As I recall a "Target" in Xcode is how you want the project built. In VS you get a Debug and Release configuration by default but you can use the Build menu and choose "Configuration..." to create more.
I don't know of a tutorial for XCode users but Kate Gregory has some nice beginner screencasts on pluralsight for using Visual Studio 2010. Those may get you over some learning curve hurdles. I think they have a 30 day free trial. If you move on to .NET development they have a lot more that can really help you get up to speed quickly.
Quick Terminology
In Visual Studio you typically create a Solution. A solution can consist of any number of Projects. You can add projects for .DLLs (libraries), services, applications (gui and console based). You can have multiple applications but can only designate one as the Startup Project.
In my typical project I start with the GUI and Add a project of the type I want. Then I often add a library project for new code that I think I can use across multiple applications. Existing code in both supplied libraries and ones you've built are added as References. You can right-click on References in the Solution Explorer and select Add References.
In XCode (when I used it) your IDE consisted of two pieces, XCode and Interface Builder. In Visual Studio you can build interface elements directly in Visual Studio ( but there is also a tool called Blend that allows for UI creation and modification). There are THREE major types of interfaces web (usually an ASP.NET application), WinForms and WPF. I think of WinForms as the equivalent of what you build in IB. WPF is the most recent addition and has lots of advantages but a somewhat steep learning curve.
This is probably oversimplified because VS does so much and I'm mostly familiar with the C# and C++/CLI capabilties. However it also supports Visual F#, Iron Python, Iron Ruby, Visual Basic, Sharepoint, Office Integration,Silverlight, XNA, etc.
Visual Studio is very extensible. There are lots of extensions to make it integrate with other tools. There are also a couple of extremely useful extensions that make refactoring and writing code easier, my personal favorite is ReSharper from JetBrains.

Develop with VS and VS Express?

I currently develop C++ and C# applications with VS2008.
I have the need to have the IDE as well on our target demonstrator platform to debug and fix etc.
Could I use the Express editions for that task or are there any major drawbacks?
Any experience is welcome, also for VS2010.
You would only have to tweak things in order to compile for 64 bit (true only for 2008, that's easy in 2010), but no major functional drawback, except as Binary Worrier says it can be frustrating
However it is commonly accepted to have the full IDE on a target demo platform without buying another license, so why not deploying full IDE on it?
From About Licensing
Developer Tools – per user license
You must acquire a license for each
user you permit to access or use the
software. You may install any number
of copies on any number of devices for
access and use by one user to design,
develop, test and demonstrate
programs. Only licensed users may
access the software.
I normally don't like to just post links as answers, but this Wikipedia Article covers the differences in depth.
I've personally found coming down from the full- to the express-editions painful and limiting, you're forever "bumping your head" off some limitation or missing feature, very frustrating.
I use vs2008 at the buro and vs2008 c# excpess at home.
the limitations i come across were
c# express doesn-t like solution folders containing projects and cannot load other project types (ie setup-projects, mstest projects).
i had no painful and limiting experience yet because i use nunit instead of mstest and only ms-databases. express has advanced options (disabled by default) that give you the debug/release build feature.
by the way you donot need a visual studio to debug dotnet-applications. the dotnet-sdk has a gui debugger that can do the job but it is not as comfortable as vs. to rebuild you can use msbuild.

Resources