Giter Site home page Giter Site logo

vstoaddininstaller's Introduction

VstoAddinInstaller

InnoSetup script to install and activate Visual Studio Tools for Office® (VSTO) addins. VstoAddinInstaller makes heavy use of the InnoSetup Preprocessor (ISPP).

Features

  • Installs Word®, Excel®, PowerPoint®, or Outlook® add-ins.
  • Downloads and installs .NET and VSTO runtimes if needed.
  • Checks if the target application is currently running and can automatically shut it down before proceeding with the installation process.
  • Can be used with an /UPDATE switch to silently shut down and restart the target application after the installation.
  • Modular structure makes it easy to keep custom configuration separate from the core functionality.

The script is based on the installer used by Daniel's XL Toolbox.

Requirements

  • InnoSetup with InnoSetup Preprocessor; ideally you would obtain the InnoSetup QuickStart Pack.
  • InnoSetup Download Plugin (takes care of downloading the .NET and VSTO runtime installers on the target system, if needed)
  • Visual Studio with Visual Studio Tools for Office (VSTO) (included in the 'Professional' editions).

Some of these requirements should be fairly obvious...

Instructions for use

VstoAddinInstaller is designed to keep itself out of your way: After downloading and extracting the archive (or cloning the Git repository), you should have a dedicated folder 'VstoAddinInstaller' in your solution directory. You won't have to edit anything inside the VstoAddinInstaller directory. A configuration file can be copied from an example file make-installer.dist.iss from the config-dist subdirectory to your solution's directory, where you may want to include it in your own version control system.

A recommended folder structure is as follows:

    YourSolutionFolder
    ├── deploy                  <-- custom folder, name it whatever you like
    │   ├── make-installer.iss  <-- your custom config file for VstoAddinInstaller
    │   ├── VstoAddinInstaller  <-- VstoAddinInstaller, e.g. as Git submodule
    │   │   ├── config-dist
    │   │   │   ├── make-installer.dist.iss  <-- template for your make-installer.iss
    │   │   │   └── ...
    │   │   └── ...
    │   ├── setup-files         <-- additional files, such as a license file
    │   │   └── ...
    │   └── releases            <-- where the installer will be written to
    │       └── ...
    ├── YourProject
    │   ├── bin
    │   │   ├── Debug
    │   │   │   ├── YourProject.vsto   <-- generated by Visual Studio
    │   │   │   └── ...
    │   │   └── Release
    │   │       ├── YourProject.vsto   <-- generated by Visual Studio
    │   │       └── ...
    │   ├── YourProject.csproj
    │   └── ...
    ├── VERSION.TXT             <-- text file containing the version number (optional)
    └── ...

Cloning as Git submodule

If you use Git as your version control, you can clone the VstoAddinInstaller respository into a submodule of your project repository:

git submodule add [email protected]:bovender/VstoAddinInstaller.git

You can then easily update the VstoAddinInstaller module by changing into the directory and issuing

git pull

Because the entire VstoAddinInstaller repository is contained in the submodule, you can switch between branches and use the develop branch rather than the master branch if you wish to do so.

Configuring

You need to make a copy of config-dist\make-installer.dist.iss and edit the contents. Ideally you would keep your copy of this file outside the VstoAddinInstaller directory, as shown above, so it does not get overwritten when you update VstoAddinInstaller.

You can rename the file to make-installer.iss or whatever you wish; the .dist part in the original file only serves to indicate that this is the distributed example file.

Follow along the instructions in your copy of make-installer.dist.iss.

Important: Each installer produced with InnoSetup must have its own global unique identifier (GUID). Please insert your own GUID where indicated. You can generate a GUID using the corresponding command from the Tools menu in InnoSetup Studio, for example.

Compiling the installer

To compile the installer, simply run your copy of make-installer.iss through InnoSetup.

Extending

If you wish to add additional capabilities to your installer (e.g. InnoSetup tasks), have a look in the config-dist directory where you will find some example files.

Currently it is not possible to run additonal code during initialization of setup (InitializeSetup) or initialization of the wizard (InitializeWizard). I have been thinking about how to provide this capability, but have not yet have the time to implement it.

Demos

Demo projects are contained in the demo directory.

In order to try out these demo installers, you must first build the corresponding projects in Visual Studio. The binaries are not contained in this repository!

Further information

For background information on the prerequisites of a VSTO add-in, see https://www.xltoolbox.net/blog/2015-01-30-net-vsto-add-ins-getting-prerequisites-right.html.

Related

This script is based on the related ExcelAddinInstaller.

Versioning

VstoAddinInstaller is semantically versioned using Git tags.

In short: The version number follows the scheme MAJOR.MINOR.PATCH.

  • An increase in the MAJOR version number signifies API-breaking changes, i.e., if you decide to upgrade, you must adjust your local copy of make-install.iss.
  • An increase in the MINOR version number denotes new or improved features. You can upgrade without adjusting your make-install.iss.
  • The PATCH number is increased with bug fixes. Again, no need to edit your copy of make-install.iss.

Contributing

You are welcome to submit pull requests for this project. I like to follow Vincent Drieessen's Git branching model where development takes place on the develop branch, and the master branch always points to the latest stable release.

Therefore, I would like to ask you to issue your pull request against the develop branch.

License

Published under the Apache License, Version 2.0.

    Copyright (C) 2016-2018 Daniel Kraus (bovender) <https://github.com/bovender>

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

Microsoft®, Windows®, Office, and Excel®, PowerPoint®, and Outlook® are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

vstoaddininstaller's People

Contributors

bovender avatar filippobottega avatar thoemy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vstoaddininstaller's Issues

Unable to compile

Hi,

When trying to compile either a demo or my own project I get a compile error as shown below. Do you have any suggestions?

File: \VstoAddinInstaller\inc\wizard-pages.pas
Line 43:
Column 10:
Unknown type 'Int64'

Thanks in advance.

image

How to use an /UPDATE switch?

You mentioned there is an /UPDATE switch to silently shut down and restart the target application after the installation, I guess this is the switch for setting the auto-update function into the add-in. But I feel hard to understand how to use it, can you give me an example of that? Thanks in advance.

'/UPDATE' switch doesn't trigger automatic reboot

With the help of '/UPDATE' switch, when upgrade, my add-in can automatically close the active Excel and install a new version. However, when the new version's installation wizard is finished, there is no auto-reboot for Excel. I am wondering if there is still another switch for that? Thanks in advance, your tool is very cool.

vstor_redist.exe not download

I just installed a fresh Windows 10 32Bit and started my setup. However, vstor_redist.exe was not downloaded.
What could that be?

Can't find file ldp.iss

I had installed InnoSetup Download Plugin,but when I run the vsto-installer.iss,there are something Wrong:"File can't find:idp.iss".The version of InnoSetup Download Plugin is 1.5.1,and the version of innosetup is 6.0.3. I'm sorry ,my english is so poor.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.