A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Haivision/srt/commit/44eb6cedebb14aeecb66066d3d590aeb127b2e6e below:

[build] Improved Windows installer · Haivision/srt@44eb6ce · GitHub

1 -

## SRT Static Libraries Installer for Windows

1 +

# SRT Static Libraries Installer for Windows

2 2 3 3

This directory contains scripts to build a binary installer for

4 4

libsrt on Windows systems for Visual Studio applications using SRT.

5 5 6 -

### Building Windows applications with libsrt

6 +

## SRT developer: Building the libsrt installer

7 + 8 +

### Prerequisites

9 + 10 +

These first two steps need to be executed once only.

11 + 12 +

- Prerequisite 1: Install OpenSSL for Windows, both 64 and 32 bits.

13 +

This can be done automatically by running the PowerShell script `install-openssl.ps1`.

14 + 15 +

- Prerequisite 2: Install NSIS, the NullSoft Installation Scripting system.

16 +

This can be done automatically by running the PowerShell script `install-nsis.ps1`.

17 + 18 +

### Building the libsrt installer

19 + 20 +

To build the libsrt installer, simply run the PowerShell script `build-win-installer.ps1`.

21 +

Running it without parameters, for instance launching it from the Windows Explorer, is

22 +

sufficient to build the installer.

23 + 24 +

Optional parameters:

25 + 26 +

- `-Version name` :

27 +

Use the specified string as version number for libsrt. By default, if the

28 +

current commit has a tag, use that tag (initial "v" removed, for instance

29 +

`1.4.3`). Otherwise, the defaut version is a detailed version number (most

30 +

recent version, number of commits since then, short commit SHA, for instance

31 +

`1.4.3-32-g22cc924`). Use that option if necessary to specify some other

32 +

non-standard form of version string.

33 + 34 +

- `-NoPause` :

35 +

Do not wait for the user to press `<enter>` at end of execution. By default,

36 +

execute a `pause` instruction at the end of execution, which is useful

37 +

when the script was launched from Windows Explorer. Use that option when the

38 +

script is invoked from another PowerShell script.

39 + 40 +

The installer is then available in the directory `installers`.

41 + 42 +

The name of the installer is `libsrt-VERS.exe` where `VERS` is the SRT version number

43 +

(see the `-Version` option).

44 + 45 +

The installer shall then be published as a release asset in the `srt` repository

46 +

on GitHub, either as `libsrt-VERS.exe` or `libsrt-VERS-win-installer.zip`.

47 +

In the latter case, the archive shall contain `libsrt-VERS.exe`.

48 + 49 +

## SRT user: Using the libsrt installer

7 50 8 -

After installing the libsrt binary, an environment variable named `LIBSRT` is

9 -

defined to the installation root (typically `C:\Program Files (x86)\libsrt`).

51 +

### Installing the SRT libraries

10 52 11 -

In this directory, there is a Visual Studio property file named `libsrt.props`.

12 -

Simply reference this property file in your Visual Studio project to use libsrt.

53 +

To install the SRT libraries, simply run the `libsrt-VERS.exe` installer which is

54 +

available in the [SRT release area](https://github.com/Haivision/srt/releases).

55 + 56 +

After installing the libsrt binaries, an environment variable named `LIBSRT` is

57 +

defined with the installation root (typically `C:\Program Files (x86)\libsrt`).

58 + 59 +

If there is a need for automation, in a CI/CD pipeline for instance, the download

60 +

of the latest `libsrt-VERS.exe` and its installation can be automated using the

61 +

sample PowerShell script `install-libsrt.ps1` which is available in this directory.

62 +

This script may be freely copied in the user's build environment.

63 + 64 +

When run without parameters (for instance from the Windows explorer), this

65 +

script downloads and installs the latest version of libsrt.

66 + 67 +

Optional parameters:

68 + 69 +

- `-Destination path` :

70 +

Specify a local directory where the libsrt package will be downloaded.

71 +

By default, use the `tmp` subdirectory from this script's directory.

72 + 73 +

- `-ForceDownload` :

74 +

Force a download even if the package is already downloaded in the

75 +

destination path. Note that the latest version is always checked.

76 +

If a older package is already present but a newer one is available

77 +

online, the newer one is always downloaded, even without this option.

78 + 79 +

- `-GitHubActions` :

80 +

When used in a GitHub Actions workflow, make sure that the `LIBSRT`

81 +

environment variable is propagated to subsequent jobs. In your GitHub

82 +

workflow, in the initial setup phase, use

83 +

`script-dir\install-libsrt.ps1 -GitHubActions -NoPause`.

84 + 85 +

- `-NoInstall` :

86 +

Do not install the package, only download it. By default, libsrt is installed.

87 + 88 +

- `-NoPause` :

89 +

Do not wait for the user to press `<enter>` at end of execution. By default,

90 +

execute a `pause` instruction at the end of execution, which is useful

91 +

when the script was launched from Windows Explorer. Use that option when the

92 +

script is invoked from another PowerShell script.

93 + 94 +

### Building Windows applications with libsrt

95 + 96 +

In the SRT installation root directory (specified in environment variable `LIBSRT`),

97 +

there is a Visual Studio property file named `libsrt.props`. Simply reference this

98 +

property file in your Visual Studio project to use libsrt.

13 99 14 100

You can also do that manually by editing the application project file (the XML

15 101

file named with a `.vcxproj` extension). Add the following line just before

16 102

the end of the file:

17 103 18 104

~~~

19 -

<Import Project="$(LIBSRT)\libsrt.props"/>

105 +

<Import Project="$(LIBSRT)\libsrt.props"/>

20 106

~~~

21 107 22 -

### Building the installer

108 +

With this setup, just compile your application normally, either using the

109 +

Visual Studio IDE or the MSBuild command line tool.

23 110 24 -

The first two steps need to be executed once only. Only the last step needs

25 -

to be repeated each time a new version of libsrt is available.

111 +

## Files reference

26 112 27 -

- Prerequisite 1: Install OpenSSL for Windows, both 64 and 32 bits.

28 -

This can be done automatically by running the PowerShell script `install-openssl.ps1`.

29 -

- Prerequisite 2: Install NSIS, the NullSoft Installation Scripting system.

30 -

This can be done automatically by running the PowerShell script `install-nsis.ps1`.

31 -

- Build the libsrt installer by running the PowerShell script `build-win-installer.ps1`.

113 +

This directory contains the following files:

32 114 33 -

The installer is then available in the directory `installers`.

115 +

| File name | Usage

116 +

| ----------------------- | -----

117 +

| build-win-installer.ps1 | PowerShell script to build the libsrt installer.

118 +

| install-libsrt.ps1 | Sample PowerShell script to automatically install libsrt (for user's projects).

119 +

| install-openssl.ps1 | PowerShell script to install OpenSSL (prerequisite to build the installer).

120 +

| install-nsis.ps1 | PowerShell script to install NSIS (prerequisite to build the installer).

121 +

| libsrt.nsi | NSIS installation script (used to build the installer).

122 +

| libsrt.props | Visual Studio property files to use libsrt (embedded in the installer).

123 +

| README.md | This text file.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4