Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,7 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/


# Visual studio code config
.vscode
67 changes: 67 additions & 0 deletions NON_WINDOWS_BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Building for Operating systems other than Windows using Mono

While it is possible to build `Waratah` on systems other than Windows, it is not supported.

For anyone who would like to build `Waratah` on a non-Windows system, this guide is provided as a convenience.
Please do not open any issues related to non-Windows or `mono` builds of the project.

## Build Dependencies

You'll need the following tools

- [mono](https://www.mono-project.com/download/stable/)
- [nuget](https://www.nuget.org/downloads)
- You'll want to download the `Windows x86 Commandline` version
- Make note of the path to `nuget.exe`, as you'll need it later in the build


## Building the project

### Getting `nuget` packages

First, you'll need to download the nuget packages:

```shell
mono --runtime=v4.0 [path-to-nuget]/nuget.exe ./Waratah/Waratah.sln
```

### Building the project

Use `msbuild` to make the project

```shell
msbuild Waratah/Waratah.sln /p:Configuration=Release
```

That command creates the file `./Waratah/WaratahCmd/bin/Release/WaratahCmd.exe` that can be run like so:

```shell
mono ./Waratah/WaratahCmd/bin/Release/WaratahCmd.exe --source [path to config file]
```

### Making a stand-alone application

If you'd like to make a stand-alone version of the application, you can do so.


```shell
mkbundle -o WaratahCmd ./Waratah/WarataCmd/bin/Release/WaratahCmd.exe
```

NOTE: you may get an error about missing `dll`s. If that's the case, you can specify `mono`'s `sdk` path by adding the `--sdk` option.

```shell
mkbundle -o WaratahCmd ./Waratah/WarataCmd/bin/Release/WaratahCmd.exe --sdk [path-to-sdk]
```

The path to mono's `SDK` is different across different operating systems and different installation methods.

For help on finding where the mono `sdk` is in your linux distribution, the [arch linux `mkbundle` man page](https://man.archlinux.org/man/extra/mono/mkbundle.1.en#sdk) says the following:

```plaintext
--sdk SDK_PATH
Use this flag to specify a path from which mkbundle will resolve the Mono
SDK from. The SDK path should be the prefix path that you used to configure
a Mono installation. And would typically contain files like
SDK_PATH/bin/mono, SDK_PATH/lib/mono/4.5 and so on.
```
1 change: 0 additions & 1 deletion Waratah/WaratahCmd/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace WaratahCmd
using System;
using System.Drawing;
using System.IO;
using Console = Colorful.Console;

class Program
{
Expand Down
9 changes: 3 additions & 6 deletions Waratah/WaratahCmd/WaratahCmd.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\ILMerge.3.0.41\build\ILMerge.props" Condition="Exists('..\packages\ILMerge.3.0.41\build\ILMerge.props')" />
<Import Project="..\packages\ILRepack.2.0.31\build\ILRepack.props" Condition="Exists('..\packages\ILRepack.2.0.31\build\ILRepack.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -55,9 +55,6 @@
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Colorful.Console, Version=1.2.9.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Colorful.Console.1.2.9\lib\net461\Colorful.Console.dll</HintPath>
</Reference>
<Reference Include="CommandLine, Version=2.6.0.0, Culture=neutral, PublicKeyToken=5a870481e358d379, processorArchitecture=MSIL">
<HintPath>..\packages\CommandLineParser.2.6.0\lib\net461\CommandLine.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -108,8 +105,8 @@
<CreateItem Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)'=='.dll'">
<Output ItemName="AssembliesToMerge" TaskParameter="Include" />
</CreateItem>
<Message Importance="high" Text="Merging binaries into single assembly (with ILMerge)" />
<Exec Command="&quot;$(ILMergeConsolePath)&quot; /out:@(MainAssembly) &quot;@(IntermediateAssembly)&quot; @(AssembliesToMerge->'&quot;%(FullPath)&quot;', ' ')" />
<Message Importance="high" Text="Merging binaries into single assembly (with ILRepack)" />
<Exec Command="&quot;$(ILRepack)&quot; /out:@(MainAssembly) &quot;@(IntermediateAssembly)&quot; @(AssembliesToMerge->'/lib:%(RootDir)%(Directory)', ' ') @(AssembliesToMerge->'&quot;%(FullPath)&quot;', ' ')" />
<Delete Files="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion Waratah/WaratahCmd/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<packages>
<package id="Colorful.Console" version="1.2.9" targetFramework="net472" />
<package id="CommandLineParser" version="2.6.0" targetFramework="net472" />
<package id="ILMerge" version="3.0.41" targetFramework="net472" />
<package id="ILRepack" version="2.0.31" targetFramework="net472" />
</packages>