Installer, Windows

Can an application be installed on windows (7 and 8.1) without using an installer?

This would be for Beta testers or for an emergency fix and NOT for the normal user.

Yes but it is more work for you and the user.

You can use a zip file and hope the user extracts it in the right place.

Without an Installer? More work? I would have thought with an Installer would be more work for me.

Try Inno Setup. Free, extremely well tested, and many good examples. I’ve used it for 13 years on our old VB6 programs and when I moved development to Xojo, took at 10 minutes start to finish on the new installer for the Xojo version.

The installer will take care of creating folders, shortcuts, dll registrations if required, etc. Handling all that yourself or supporting users to do all of that is a lot of work. In addition, the installer usually comes with an uninstaller. If you don,t use an instaler, you will need to build the feature in your own app. Doing a clean uninstall that removes all dll’s (but only if they are not shared), removes registry entries, removes shortcut etc. is a bit of work also. Supporting users to do it manually is pretty much a non starter.

+1 on Inno Setup. I can,t say that it will always be 10 minutes, but it is much easir than the manual alternative!

InnoSetup can be a pain starting out but once you’re done you won’t have to mess with it again. There are lots of people using it so it’s fairly easy to get help.

We have a training video on it in our 3rd party section of our video training area at http://xojo.bkeeney.com/XojoTraining/

OK!
OK!
Already! ( I did bring this on myself! )

That my problem. I only use it every six month or so and each time it like the first time. And this time it’s just for one user!

Guess I’ll review Bob’s video.

Do these steps once for your application:

  1. Start with this script http://documentation.xojo.com/index.php/Inno_setup.
  2. Fill in the blanks with your application’s settings. Make sure to change the UUID.
  3. Save and test it.

Do this to build the installer each release and beta version:

  1. Update the version number.
  2. Click build.

Here is an anonymized version of the installer I use internally in my company. You should only need to change the defines and AppId.

[code]; Notes:
; 1. Change the variables in the defines to meet your needs.
; 2. Change the AppId in the [Setup] section. This AppId only needs to be changed once per application.
; 3. You will need to create a side.bmp, small.bmp and app.ico and place them in the ./installer/resources/ folder. Or you can comment out the lines below and use the defaults.

; Changes:
; 05-07-2015 Made example template

#define MyAppName “My Cool Application”
#define MyCompany “My Company”
#define MyCopyright “Copyright © 2015 My Company”
#define MyURL “http://www.domain.com/
#define MySupportName “Tech Support”
#define MySupportPhone “1-503-555-5555”

#define MainBinaryName “C:\My Projects\My Cool Application\Builds - My Cool Application.rbvcp\Windows\My Cool Application\My Cool Application.exe”
#define MainBuildDir “C:\My Projects\My Cool Application\Builds - My Cool Application.rbvcp\Windows\My Cool Application”
#define SetupBaseName “Setup_MyCoolApplication_”
#define MyAppVersion GetFileVersion(MainBinaryName)
#define AppMajorVersion Copy(MyAppVersion, 1, Pos(".", MyAppVersion) -1)
#define AppMinorVersion Copy(Copy(MyAppVersion, Pos(".", MyAppVersion) + 1), 1, Pos(".", MyAppVersion) -1)
#define AppShortVersion AppMajorVersion + “.” + AppMinorVersion
#define AppVersionFile StringChange(MyAppVersion, “.”, “-”)
#define SourceDir “C:\My Projects\My Cool Application”

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{DC6C1BE7-BE6E-435A-9EC2-365BC4F6A68A}
AppName={#MyAppName}
AppVersion={#MyAppName} {#AppShortVersion}
AppPublisher={#MyCompany}
AppPublisherURL={#MyURL}
AppCopyright={#MyCopyright}
VersionInfoVersion={#MyAppVersion}
AppContact={#MySupportName}
AppSupportPhone={#MySupportName}
AppSupportURL={#MyURL}
AppUpdatesURL={#MyURL}
DefaultDirName={pf}\{#MyCompany}\{#MyAppName}
DefaultGroupName={#MyCompany}\{#MyAppName}
OutputDir={#SourceDir}installer
OutputBaseFilename={#SetupBaseName + AppVersionFile}
; If you have an End User License Agreement (EULA) that you want
; the user to agree to before letting the install continue, put
; the path to it here.
LicenseFile=
Compression=lzma
SolidCompression=yes
; Installer graphics go here:
WizardImageFile={#SourceDir}installer\resources\side.bmp
WizardSmallImageFile={#SourceDir}installer\resources\small.bmp
SetupIconFile={#SourceDir}installer\resources\app.ico
MinVersion=0,6.1

[Languages]
Name: “english”; MessagesFile: “compiler:Default.isl”

[Tasks]
Name: “desktopicon”; Description: “{cm:CreateDesktopIcon}”; GroupDescription: “{cm:AdditionalIcons}”

; These directories will be created by the installer inside the
; DefaultDirName (defined above).
[Dirs]
Name: “{app}\Libs”

; These are the files to include. By default you want to include
; the EXE and the Libs folder but you can include any other files
; you like as well. Be sure to change the path to point to your
; built application.
[Files]
Source: “{#MainBuildDir}"; DestDir: “{app}”; Flags: ignoreversion
Source: "{#MainBuildDir}\{#MyAppName} Libs\
”; DestDir: “{app}”; Flags: ignoreversion

; Creates icons/links in the Start Menu and/or the desktop if the user chooses during installation.
[Icons]
Name: “{group}\{#MyAppName}”; Filename: “{app}\{#MyAppName}.exe”
Name: “{commondesktop}\{#MyAppName}”; Filename: “{app}\{#MyAppName}.exe”; Tasks: desktopicon

; Give the user the option to run the app after the installation is finished.
[Run]
Filename: “{app}\{#MyAppName}.exe”; Description: “{cm:LaunchProgram,{#MyAppName}}”; Flags: nowait postinstall
[/code]

[quote=185439:@Jim Smith]OK!
OK!
Already! ( I did bring this on myself! )

That my problem. I only use it every six month or so and each time it like the first time. And this time it’s just for one user!

Guess I’ll review Bob’s video.[/quote]

A Xojo app can be launched from any place on the disk, so if you basically tell your user to double click on the executable, that is all he needs to know. It can suffice for a one time occurrence.

That said, for regular users, an installer is mandatory.

Personally, I simply could not stomach InnoSetup, and have been using CreateInstall for about 20 years :
http://www.createinstall.com/

I use the commercial version but there is a trial one, and a freeware one as well.

+1 for CreateInstall, they also have very helpful support.

Yes indeed. Alexei Krigonoff is the kind of guy you find here.

It frustrates me a bit that nobody ever seems to talk about NSIS (Nullsoft Scriptable Install System).
There’s NSIS (http://nsis.sourceforge.net/Main_Page), Unicode NSIS (http://www.scratchpaper.com/ and https://github.com/jimpark/unsis), and 64 bit NSIS (https://bitbucket.org/dgolub/nsis64).
NSIS is a very good (and free) installer creator, and is used by Mozilla (firefox, thunderbird, sunbird and seamonkey), Apache (Openoffice), Google (Picasa), Yahoo (Flickr uploader), FileZilla, Portable Apps, Adobe (Flash),…

HM NIS Edit ( a free Editor/IDE) can be found at http://hmne.sourceforge.net/
(Its Script Wizard will help you to create standard Setup programs with only few clicks, also its InstallOptions designer will help you to create your own custom pages with a friendly drag and drop interface.)

If HM NIS Edit is not easy enough, there is also Graphical Installer (http://www.graphical-installer.com)
They charge 49€ for a license which can create an installer for one product (so if you want to create an installer for a second program you are selling, you need to buy a second license). They also have a personal license at 7.95€/license that can be used for freeware/open-source,non-profit software.

From the FAQ’s at Graphical Installer
Q?
What’s the difference between NSIS and Inno Setup? Which one should I choose?
A.
Simply to say NSIS is more powerful than Inno Setup. If you are creating simple installer then it does not matter you choose NSIS or Inno Setup. But if you want your installer to have some advanced features it is better to choose NSIS as it’s scripting system is really powerful. There is also plenty of third-party plug-ins for NSIS available which can save your time and works.
If you know Delphi (programming language Pascal) than rather choose inno Setup because it’s syntax is very similar to this language.

For a comparison between NSIS and Inno Setup
http://web.archive.org/web/20110627230641/http://www.opencandy.com/2011/06/09/installer-platform-comparison-making-the-right-choice/

I personally have worked with both and vastly prefer NSIS because it seems to me to be more powerful in what you can do with it, and it still is not too difficult to use. I actually prefer it to Installshield which cost a load of money and half of the time seems to over complicate things (although it is very powerful).

[quote=185605:@Dirk Cleenwerck]It frustrates me a bit that nobody ever seems to talk about NSIS (Nullsoft Scriptable Install System).
[/quote]

Thank you for that reference. I think Jim is looking less for an elaborate scriptable installer builder than for a very simple solution, though.

Have you got shares ?

Shares in an open-source product that is distributed for free? Now that’s funny. :slight_smile:

Anyway @Dirk Cleenwerck , it’s clear that you love this open-source product.

Advanced Installer is another to consider. It’s robust, has an intuitive GUI and supports scripting.

By far too expensive for the task is my opinion.

Tarma is one I have used in the past, very good features and support, and not too expensive. You can create a very simple installer quickly, but it also has the power to customize just about any aspect of the installer if you need to with custom actions, dialogs and sequences.