Installing from source in windows

Managing Installation Sources

Users and applications with administrative privileges can retrieve and modify network, URL, and media source list information for Windows Installer applications and patches on the system.

Windows Installer 2.0: Not supported. Administrators cannot read, reorder, or replace entries in the source list and cannot modify or retrieve source list properties. It is possible to manage Network sources, but not URL or Media sources. Administrators can only manage source lists for per-machine applications or applications installed as per-user for the current user. This prevents administrators using versions earlier than Windows Installer version 3.0 from managing source list information for all users in the system.

Windows Installer 3.0 and later: Users and applications that have administrator privileges can retrieve and modify source list information for Windows Installer applications and patches installed on the system for all users. The source list functions can be used to manage source lists and source list properties for network, URL and media sources. The installer can reorder source lists from an external process.

Users and applications that have administrative privileges can read and modify the following types of source list information:

  • Source lists for applications and patches installed for all users on the system.
  • Source lists for patch sources that exist apart from the application sources.
  • Source lists for URL and media sources that exist apart from network sources.
  • Source list properties such as MEDIAPACKAGEPATH, DiskPrompt, LastUsedSource, LastUsedType, and PackageName.

The source lists functions can limit the scope of the source lists found by specifying the installation context and user context. There are three possible installation contexts: per-user (unmanaged), per-machine, and per-user managed. The user context can be a particular user or all users on the system.

Non-administrators cannot modify the source list of an instance of an application or patch that exists under another user’s per-user (managed or unmanaged) context. Non-administrators can modify the source lists of an instance of an application or patch installed under the following contexts:

  • Their own per-user(unmanaged) context.
  • The machine context, but only if the DisableBrowse, AllowLockdownBrowse, and AlwaysInstallElevated policies allows them to browse for an application or patch source.
  • Their own per-user managed context, but only if the DisableBrowse, AllowLockdownBrowse, and AlwaysInstallElevated policies allows them to browse for an application or patch source.

Administrators can modify any source list that a non-administrator can modify. In addition, administrators and applications that have administrative privileges can modify the source lists of an application or patch installed under the following contexts:

  • Per-machine context.
  • Their own per-user (unmanaged) or their own per-user managed context.
  • Another user’s per-user managed context.

Users and applications that have administrative privileges cannot modify the source list of an instance of an application or patch installed in the per-user (unmanaged) context of another user.

Managing Network and URL sources for Products and Patches

Use the MsiSourceListAddSourceEx function to add or reorder the source list of network and URL sources for a patch or application in a particular context. Use the dwContext parameter to specify the installation context. Use the szUserSid parameter to specify the user context.

Читайте также:  Dns vpn mac os x

Use the MsiSourceListAddSourceEx function to create a source list for a patch that has not yet been applied to any application in the specified context. This can be useful when registering a patch to have elevated privileges. For more information about registering elevated privileges for a patch, see Patching Per-User Managed Applications.

Use the MsiSourceListClearSource function to remove an existing source for an application or patch in a specified context. Removing the current source for an application or patch forces the installer to search the source list for a source the next time a source is required.

Use the MsiSourceListEnumSources function to enumerate sources in the source list of a specified patch or application.

Managing Media sources for Products and Patches

Use the MsiSourceListAddMediaDisk function to add or update the disk information of the media source of a registered application or patch. Each entry is uniquely identified by a disk ID. If the disk already exists, it is updated with the new volume label and disk prompt values. If the disk does not exist, a new disk entry is created with the new values.

Use the MsiSourceListClearMediaDisk function to remove an existing registered disk under the media source for an application or patch in a specific context.

Use the MsiSourceListEnumMediaDisks function to enumerate a list of disks registered under the media source for an application or patch.

Retrieval and modification of source list information

Use the MsiSourceListGetInfo and MsiSourceListSetInfo functions to retrieve or modify information about the source list for an application or patch in a specific context. Use the dwContext parameter to specify the installation context. Use the szUserSid parameter to specify the user context.

Source list properties such as MEDIAPACKAGEPATH, DiskPrompt, LastUsedSource, LastUsedType, and PackageName can be accessed.

The LastUsedType source list property can only be read. It cannot be set directly using the MsiSourceListSetInfo function.

Clearing the complete source list or forcing a source resolution

Use the MsiSourceListClearAllEx function to remove all the existing sources of a given source type for the specified application or patch instance. The patch registration is also removed if the patch is not installed by any application in the same context. Use the dwContext parameter to specify the installation context. Use the szUserSid parameter to specify the user context.

Use the MsiSourceListForceResolutionEx to clear the last used source entry for an application or patch in the specified context. This function removes the registration of the property called LastUsedSource. This function does not affect the registered source list. Clearing the LastUsedSource registration forces the installer to do a source resolution against the registered sources the next time it requires the source.

Installing OR-Tools C++ from Source on Windows

Introduction

This guide explains how to install OR-Tools from source, with support for C++, on Windows. Unless you plan to modify the source code or use a third-party solver with OR-Tools, we recommend the binary installation.

Although these instructions might also work on other Windows variants, we have only tested them on machines meeting the following requirements:

Prerequisites

The following sections describe the prerequisites for installing OR-Tools from source.

Visual Studio

To build and run OR-Tools on Windows, you must have Visual Studio 2019 or later installed on your computer with the C++ toolset for Visual Studio. You can find more details here.

To build OR-Tools programs from the command line you must use a x64 Native Tools Command Prompt (not the Developer Command Prompt). You can find more details here.

Git, which can be downloaded from https://git-scm.com/.

CMake

CMake (>= 3.5), which can be downloaded from https://www.cmake.org/download. When installing CMake, select the option for a command-line accessible cmake.

Читайте также:  Как разметить флешку под линукс

Download the source code

There are two distinct branches of the OR-Tools source code on GitHub: stable and master. The stable branch has been thoroughly tested and should work flawlessly on all supported platforms. The master branch is where the latest updates and improvements have been applied; it’s more current, but less stable.

Download the stable source code

You can get the stable source code for OR-Tools in either of the following ways:

  • Clone the stable branch by entering
  • Download the latest release in a compressed file, by clicking the Clone or download button in GitHub.

Warning: The full path to the installation directory (where you extract the files) must not contain any spaces.

Download the master source code

To retrieve the source code from the master branch, enter

Download previous releases

You can get the source code for previous releases in either of the following ways:

  • Download a previous release from the GitHub release page.
  • Assuming you have already created a local repository (by git clone ), you can check out a specific release using a Git tag. For example, to work with the v8.2 release instead of the master branch, enter the following commands in your local repo:

Build third parties

Before building OR-Tools, you’ll need to build the required third party software.

Open a terminal and navigate to the directory where you extracted the files. Then enter:

Using SCIP

Since v7.8, SCIP is now integrated so you won’t have to install it manually. Warning:While OR-Tools ships with SCIP, please consult the SCIP license to ensure that you are complying with it.

Using Gurobi

Gurobi is now pre-integrated. When needed, at runtime, OR-Tools will search for the Gurobi shared library in the default install path of the Gurobi installers on MAC OS X and Windows, or by using the GUROBI_HOME environment variable.

Using an optional third-party MIP solver

You can also use OR-Tools with any of the following optional third-party MIP solvers whose support is disabled by default:

To configure OR-Tools to use one of these solvers, do the following steps:

  1. Install the optional solver following the vendor instruction.
  2. Open Makefile.local and add the path to the directory where you have installed the solver. For example, for CPLEX you would add this:

Build the source code

To build the source code, open a terminal and navigate to the directory where you extracted the files. Then enter the following command to compile OR-Tools:

Test the source code

You can check that everything is running correctly by entering:

This runs a selection of examples for OR-Tools. If all the examples run successfully, you are ready to get started with OR-Tools.

Cleaning the build files

If you need to re-install OR-Tools, the command:

will remove all compiled dependencies and Makefile.local . This can be useful for resetting to a clean state.

Then re-enter the commands

Installing OR-Tools on your operating system

You can install OR-Tools for C++ on your operating system by entering

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Installing OR-Tools C++ from Source on Windows

Introduction

This guide explains how to install OR-Tools from source, with support for C++, on Windows. Unless you plan to modify the source code or use a third-party solver with OR-Tools, we recommend the binary installation.

Although these instructions might also work on other Windows variants, we have only tested them on machines meeting the following requirements:

Prerequisites

The following sections describe the prerequisites for installing OR-Tools from source.

Читайте также:  Настройки для ускорения windows 10

Visual Studio

To build and run OR-Tools on Windows, you must have Visual Studio 2019 or later installed on your computer with the C++ toolset for Visual Studio. You can find more details here.

To build OR-Tools programs from the command line you must use a x64 Native Tools Command Prompt (not the Developer Command Prompt). You can find more details here.

Git, which can be downloaded from https://git-scm.com/.

CMake

CMake (>= 3.5), which can be downloaded from https://www.cmake.org/download. When installing CMake, select the option for a command-line accessible cmake.

Download the source code

There are two distinct branches of the OR-Tools source code on GitHub: stable and master. The stable branch has been thoroughly tested and should work flawlessly on all supported platforms. The master branch is where the latest updates and improvements have been applied; it’s more current, but less stable.

Download the stable source code

You can get the stable source code for OR-Tools in either of the following ways:

  • Clone the stable branch by entering
  • Download the latest release in a compressed file, by clicking the Clone or download button in GitHub.

Warning: The full path to the installation directory (where you extract the files) must not contain any spaces.

Download the master source code

To retrieve the source code from the master branch, enter

Download previous releases

You can get the source code for previous releases in either of the following ways:

  • Download a previous release from the GitHub release page.
  • Assuming you have already created a local repository (by git clone ), you can check out a specific release using a Git tag. For example, to work with the v8.2 release instead of the master branch, enter the following commands in your local repo:

Build third parties

Before building OR-Tools, you’ll need to build the required third party software.

Open a terminal and navigate to the directory where you extracted the files. Then enter:

Using SCIP

Since v7.8, SCIP is now integrated so you won’t have to install it manually. Warning:While OR-Tools ships with SCIP, please consult the SCIP license to ensure that you are complying with it.

Using Gurobi

Gurobi is now pre-integrated. When needed, at runtime, OR-Tools will search for the Gurobi shared library in the default install path of the Gurobi installers on MAC OS X and Windows, or by using the GUROBI_HOME environment variable.

Using an optional third-party MIP solver

You can also use OR-Tools with any of the following optional third-party MIP solvers whose support is disabled by default:

To configure OR-Tools to use one of these solvers, do the following steps:

  1. Install the optional solver following the vendor instruction.
  2. Open Makefile.local and add the path to the directory where you have installed the solver. For example, for CPLEX you would add this:

Build the source code

To build the source code, open a terminal and navigate to the directory where you extracted the files. Then enter the following command to compile OR-Tools:

Test the source code

You can check that everything is running correctly by entering:

This runs a selection of examples for OR-Tools. If all the examples run successfully, you are ready to get started with OR-Tools.

Cleaning the build files

If you need to re-install OR-Tools, the command:

will remove all compiled dependencies and Makefile.local . This can be useful for resetting to a clean state.

Then re-enter the commands

Installing OR-Tools on your operating system

You can install OR-Tools for C++ on your operating system by entering

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Оцените статью