Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
leezer3 committed Apr 25, 2020
2 parents e2be22d + 2c25311 commit 5085739
Show file tree
Hide file tree
Showing 193 changed files with 5,580 additions and 4,371 deletions.
93 changes: 69 additions & 24 deletions Building.md
@@ -1,44 +1,89 @@
# Building openBVE from source

This file is a WIP set of instructions for building openBVE from source.
Note that as NuGet packages are used, the first-time build requires an internet connection.

## Prerequisites

### Windows
Either .NET Framework 4.7.2 or Mono 5.20.1 or later, x86 or x64

#### When to use .NET Framework

- Visual Studio 2017 or later, x86 or x64
- .NET Framework 4.7.2 or later, x86 or x64

#### When to use Mono

- Mono 5.20.1 or later, x86 or x64
- NuGet client 2.16 or later

### Linux
Mono 5.20.1 or later, x86 or x64, and the following packages:

- mono-runtime
- libmono-corlib4.5-cil
- libmono-system-drawing4.0-cil
- libmono-system-windows-forms4.0-cil
- libmono-system4.0-cil
- libmono-system-xml-linq4.0-cil
- libmono-i18n4.0-all
- libmono-microsoft-csharp4.0-cil

- Mono 5.20.1 or later, x86 or x64
- NuGet client 2.16 or later
- OpenAL
- GNU Make
- debhelper (Debian and compatibles only)
- libopenal1

#### Debian and compatibles

NOTE: You need to get Mono from [the Mono project repository](https://www.mono-project.com/download/stable/#download-lin), not the distribution repository.

```bash
sudo apt install build-essential mono-devel libmono-i18n4.0-all nuget libopenal1 debhelper
```

#### RHEL and compatibles

NOTE: You need to get Mono from [the Mono project repository](https://www.mono-project.com/download/stable/#download-lin), not the distribution repository.

```bash
sudo dnf install @"Development Tools" mono-devel mono-locale-extras nuget openal-soft
```

#### Reference information

You can install the latest NuGet client using the command below.

```bash
sudo curl -o /usr/local/lib/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
echo -e '#!/bin/sh\nexec /usr/bin/mono /usr/local/lib/nuget.exe "$@"' | sudo tee /usr/local/bin/nuget
sudo chmod 755 /usr/local/bin/nuget
```

### Mac
Mono 5.20.1 or later, x86 only.

- Mono 5.20.1 or later, x86 only
- NuGet client 2.16 or later
- OpenAL
- GNU Make

## Building

**Note that as NuGet packages are used, the first-time build requires an internet connection.**

### Windows
Open the main OpenBVE.sln file with Visual Studio.
Build the required project, allowing NuGet to restore the packages as required.

### Mac / Linux
#### When to use .NET Framework

1. Open the main OpenBVE.sln file with Visual Studio.
2. Build the required project, allowing NuGet to restore the packages as required.

#### When to use Mono

Open the main openBVE source directory in the terminal.
You may either build using the makefile, which supports the following options:
1. Start "Open Mono Command Prompt" from the start menu.
2. Open the main openBVE source directory in this terminal.
3. Restore the packages as required. `nuget restore OpenBVE.sln`
4. Build the solution. `msbuild OpenBVE.sln`

### Mac / Linux

* make - Restores the NuGet packages only.
* make all-release - Creates a release build.
* make all-debug - Creates a debug build.
* make debian - On Debian and compatibles, creates an installable deb package.
* make publish - On Mac, creates an app package.
1. Open the main openBVE source directory in the terminal.
2. You may either build using the makefile, which supports the following options:
- `make` - Restores the NuGet packages only.
- `make all-release` - Creates a release build.
- `make all-debug` - Creates a debug build.
- `make clean-all` - Cleans release and debug builds.
- `make openbve-release` - Creates a release build without tools.
- `make openbve-debug` - Creates a debug build without tools.
- `make debian` - On Debian and compatibles, creates an installable deb package.
- `make publish` - On Mac, creates an app package.
18 changes: 11 additions & 7 deletions WindowsInstaller.ps1
Expand Up @@ -4,7 +4,7 @@ $InstallerOut = @"
#define MyAppName "openBVE"
#define MyAppVersion "$args"
#define MyAppPublisher "Christopher Lees"
#define MyAppPublisher "The OpenBVE Project"
#define MyAppURL "http://www.openbve-project.net"
#define MyAppExeName "OpenBve.exe"
Expand Down Expand Up @@ -67,8 +67,8 @@ Source: "..\..\bin_release\*"; DestDir: "{app}"; Flags: recursesubdirs ignorever
;Custom Config File
Source: "InstallerData\filesystem_appdata.cfg"; DestDir: "{app}\";
Source: "InstallerData\filesystem_programfolder.cfg"; DestDir: "{app}\";
;MS .NET 4.0 Full Web Installer.
Source: "InstallerData\dotNetFx40_Full_setup.exe"; DestDir: "{app}"; Flags: deleteafterinstall; AfterInstall: AfterMyProgInstall('AllFilesCopy')
;MS .NET 4.6.1 Web Installer.
Source: "InstallerData\NDP461-KB3102438-Web.exe"; DestDir: "{app}"; Flags: deleteafterinstall; AfterInstall: AfterMyProgInstall('AllFilesCopy')
[Icons]
Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userdesktop}\openBVE Addons"; Filename:"{code:GetDataDir}"; Tasks: desktopicon2
Expand Down Expand Up @@ -195,8 +195,12 @@ Installed: Cardinal;
FileLines: TArrayOfString;
begin
//Determine whether the component is installed.
if RegQueryDWordValue(GetHKLM(),'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Install',Installed) then begin
use_Net4:=Installed
if RegQueryDWordValue(GetHKLM(),'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release',Installed) then begin
if Installed >= 394254 then begin
use_Net4:=1;
end else begin
use_Net4:=0;
end;
end;
begin
if RegKeyExists(HKLM32,'Software\OpenAL') then begin
Expand All @@ -206,8 +210,8 @@ FileLines: TArrayOfString;
begin
if use_Net4 = 1 then begin
end else begin
WizardForm.FilenameLabel.Caption := 'Installing Microsoft .NET Framework 4 Full';
if Exec(ExpandConstant('{app}\dotNetFx40_Full_setup.exe'), '/norestart /passive /showrmui', '', SW_SHOW,
WizardForm.FilenameLabel.Caption := 'Installing Microsoft .NET Framework 4.6.1';
if Exec(ExpandConstant('{app}\NDP461-KB3102438-Web.exe'), '/norestart /passive /showrmui', '', SW_SHOW,
ewWaitUntilTerminated, ResultCode_Net4) then
begin
IntToStr(ResultCode_Net4)
Expand Down
12 changes: 12 additions & 0 deletions assets/Languages/ca-ES.xlf
Expand Up @@ -196,6 +196,14 @@
<source>Failed to create the following file: \r \n</source>
<target>No s'ha pogut crear el fitxer següent: \r \n</target>
</trans-unit>
<trans-unit id="security_checkaccess">
<source>Please check that this path is accessible.</source>
<target>Please check that this path is accessible.</target>
</trans-unit>
<trans-unit id="security_badlocation">
<source>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</source>
<target>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</target>
</trans-unit>
</group>
<group id="start">
<trans-unit id="title">
Expand Down Expand Up @@ -709,6 +717,10 @@
<source>Proceed......</source>
<target>Continua...</target>
</trans-unit>
<trans-unit id="creation_invalid_nofiles">
<source>No files were selected to package- Please retry.</source>
<target>No files were selected to package- Please retry.</target>
</trans-unit>
<trans-unit id="creation_invalid_filename">
<source>The selected filename is invalid- Please retry.</source>
<target>El nom del fitxer no és vàlid. \r\n Torneu-ho a intentar.</target>
Expand Down
12 changes: 12 additions & 0 deletions assets/Languages/cs-CZ.xlf
Expand Up @@ -195,6 +195,14 @@
<source>Failed to create the following file: \r \n</source>
<target>Failed to create the following file: \r \n</target>
</trans-unit>
<trans-unit id="security_checkaccess">
<source>Please check that this path is accessible.</source>
<target>Please check that this path is accessible.</target>
</trans-unit>
<trans-unit id="security_badlocation">
<source>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</source>
<target>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</target>
</trans-unit>
</group>
<group id="start">
<trans-unit id="title">
Expand Down Expand Up @@ -708,6 +716,10 @@
<source>Proceed......</source>
<target>Proceed......</target>
</trans-unit>
<trans-unit id="creation_invalid_nofiles">
<source>No files were selected to package- Please retry.</source>
<target>No files were selected to package- Please retry.</target>
</trans-unit>
<trans-unit id="creation_invalid_filename">
<source>The selected filename is invalid- Please retry.</source>
<target>The selected filename is invalid- Please retry.</target>
Expand Down
12 changes: 12 additions & 0 deletions assets/Languages/de-CH.xlf
Expand Up @@ -196,6 +196,14 @@
<source>Failed to create the following file: \r \n</source>
<target>Failed to create the following file: \r \n</target>
</trans-unit>
<trans-unit id="security_checkaccess">
<source>Please check that this path is accessible.</source>
<target>Please check that this path is accessible.</target>
</trans-unit>
<trans-unit id="security_badlocation">
<source>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</source>
<target>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</target>
</trans-unit>
</group>
<group id="start">
<trans-unit id="title">
Expand Down Expand Up @@ -709,6 +717,10 @@
<source>Proceed......</source>
<target>Proceed......</target>
</trans-unit>
<trans-unit id="creation_invalid_nofiles">
<source>No files were selected to package- Please retry.</source>
<target>No files were selected to package- Please retry.</target>
</trans-unit>
<trans-unit id="creation_invalid_filename">
<source>The selected filename is invalid- Please retry.</source>
<target>The selected filename is invalid- Please retry.</target>
Expand Down
12 changes: 12 additions & 0 deletions assets/Languages/de-DE.xlf
Expand Up @@ -196,6 +196,14 @@
<source>Failed to create the following file: \r \n</source>
<target>Failed to create the following file: \r \n</target>
</trans-unit>
<trans-unit id="security_checkaccess">
<source>Please check that this path is accessible.</source>
<target>Please check that this path is accessible.</target>
</trans-unit>
<trans-unit id="security_badlocation">
<source>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</source>
<target>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</target>
</trans-unit>
</group>
<group id="start">
<trans-unit id="title">
Expand Down Expand Up @@ -709,6 +717,10 @@
<source>Proceed......</source>
<target>Fortfahren...</target>
</trans-unit>
<trans-unit id="creation_invalid_nofiles">
<source>No files were selected to package- Please retry.</source>
<target>No files were selected to package- Please retry.</target>
</trans-unit>
<trans-unit id="creation_invalid_filename">
<source>The selected filename is invalid- Please retry.</source>
<target>Der gewählte Dateiname ist ungültig. Bitte erneut versuchen.</target>
Expand Down
12 changes: 12 additions & 0 deletions assets/Languages/en-GB.xlf
Expand Up @@ -195,6 +195,14 @@
<source>Failed to create the following file: \r \n</source>
<target>Failed to create the following file: \r \n</target>
</trans-unit>
<trans-unit id="security_checkaccess">
<source>Please check that this path is accessible.</source>
<target>Please check that this path is accessible.</target>
</trans-unit>
<trans-unit id="security_badlocation">
<source>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</source>
<target>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</target>
</trans-unit>
</group>
<group id="start">
<trans-unit id="title">
Expand Down Expand Up @@ -708,6 +716,10 @@
<source>Proceed......</source>
<target>Proceed......</target>
</trans-unit>
<trans-unit id="creation_invalid_nofiles">
<source>No files were selected to package- Please retry.</source>
<target>No files were selected to package- Please retry.</target>
</trans-unit>
<trans-unit id="creation_invalid_filename">
<source>The selected filename is invalid- Please retry.</source>
<target>The selected filename is invalid- Please retry.</target>
Expand Down
11 changes: 10 additions & 1 deletion assets/Languages/en-US.xlf
Expand Up @@ -150,6 +150,12 @@
<trans-unit id="package_file_generic">
<source>Failed to create the following file: \r \n</source>
</trans-unit>
<trans-unit id="security_checkaccess">
<source>Please check that this path is accessible.</source>
</trans-unit>
<trans-unit id="security_badlocation">
<source>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</source>
</trans-unit>
</group>
<group id="start">
<trans-unit id="title">
Expand Down Expand Up @@ -234,7 +240,7 @@
<source>Preview:</source>
</trans-unit>
<trans-unit id="train_notfound">
<source>The default train could not be found:\n\n</source>
<source>The default train could not be found:\r\n\r\n</source>
</trans-unit>
<trans-unit id="train_pluginnotsupported">
<source>--- This train uses a safety system plugin which cannot be used on your operating system. The built-in safety systems ATS/ATC will be used instead, which might cause operational problems. ---</source>
Expand Down Expand Up @@ -537,6 +543,9 @@
<trans-unit id="creation_proceed">
<source>Proceed......</source>
</trans-unit>
<trans-unit id="creation_invalid_nofiles">
<source>No files were selected to package- Please retry.</source>
</trans-unit>
<trans-unit id="creation_invalid_filename">
<source>The selected filename is invalid- Please retry.</source>
</trans-unit>
Expand Down
12 changes: 12 additions & 0 deletions assets/Languages/es-ES.xlf
Expand Up @@ -196,6 +196,14 @@
<source>Failed to create the following file: \r \n</source>
<target>Failed to create the following file: \r \n</target>
</trans-unit>
<trans-unit id="security_checkaccess">
<source>Please check that this path is accessible.</source>
<target>Please check that this path is accessible.</target>
</trans-unit>
<trans-unit id="security_badlocation">
<source>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</source>
<target>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</target>
</trans-unit>
</group>
<group id="start">
<trans-unit id="title">
Expand Down Expand Up @@ -713,6 +721,10 @@
<source>The selected filename is invalid- Please retry.</source>
<target>Nombre de archivo no válido. \r\n Vuelva a intentarlo.</target>
</trans-unit>
<trans-unit id="creation_invalid_nofiles">
<source>No files were selected to package- Please retry.</source>
<target>No files were selected to package- Please retry.</target>
</trans-unit>
<trans-unit id="creation_new_id">
<source>The new package has been assigned the following GUID:</source>
<target>El nuevo paquete tiene asignado el GUID siguiente:</target>
Expand Down
12 changes: 12 additions & 0 deletions assets/Languages/fi-FI.xlf
Expand Up @@ -195,6 +195,14 @@
<source>Failed to create the following file: \r \n</source>
<target>Failed to create the following file: \r \n</target>
</trans-unit>
<trans-unit id="security_checkaccess">
<source>Please check that this path is accessible.</source>
<target>Please check that this path is accessible.</target>
</trans-unit>
<trans-unit id="security_badlocation">
<source>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</source>
<target>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</target>
</trans-unit>
</group>
<group id="start">
<trans-unit id="title">
Expand Down Expand Up @@ -708,6 +716,10 @@
<source>Proceed......</source>
<target>Proceed......</target>
</trans-unit>
<trans-unit id="creation_invalid_nofiles">
<source>No files were selected to package- Please retry.</source>
<target>No files were selected to package- Please retry.</target>
</trans-unit>
<trans-unit id="creation_invalid_filename">
<source>The selected filename is invalid- Please retry.</source>
<target>The selected filename is invalid- Please retry.</target>
Expand Down
12 changes: 12 additions & 0 deletions assets/Languages/fr-FR.xlf
Expand Up @@ -195,6 +195,14 @@
<source>Failed to create the following file: \r \n</source>
<target>Failed to create the following file: \r \n</target>
</trans-unit>
<trans-unit id="security_checkaccess">
<source>Please check that this path is accessible.</source>
<target>Please check that this path is accessible.</target>
</trans-unit>
<trans-unit id="security_badlocation">
<source>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</source>
<target>If you are attempting to install addons in the Program Files or ProgramData folders, this may require administrator permission. \r\n\r\n This is not recommended for security reasons.</target>
</trans-unit>
</group>
<group id="start">
<trans-unit id="title">
Expand Down Expand Up @@ -708,6 +716,10 @@
<source>Proceed......</source>
<target>Proceed......</target>
</trans-unit>
<trans-unit id="creation_invalid_nofiles">
<source>No files were selected to package- Please retry.</source>
<target>No files were selected to package- Please retry.</target>
</trans-unit>
<trans-unit id="creation_invalid_filename">
<source>The selected filename is invalid- Please retry.</source>
<target>The selected filename is invalid- Please retry.</target>
Expand Down

0 comments on commit 5085739

Please sign in to comment.