Skip to content

Commit

Permalink
Initial changes to get build working on Linux
Browse files Browse the repository at this point in the history
- Update a bunch of executables to get +x permission
- Modifies the vscode workspace, adds recommended extensions
- Fixes a few minor bugs
- Removes BCL build - it seems to keep triggering warnings and I honestly have no idea what it does

Work done for #196
  • Loading branch information
atruskie committed Mar 13, 2020
1 parent 6e806a4 commit 5f08faa
Show file tree
Hide file tree
Showing 34 changed files with 97 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,4 @@ Icon
Network Trash Folder
Temporary Items
.apdisk
.ionide/symbolCache.db
27 changes: 27 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/AnalysisPrograms/bin/Debug/netcoreapp3.1/AnalysisPrograms.dll",
"args": [],
"cwd": "${workspaceFolder}/src/AnalysisPrograms",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
42 changes: 42 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/AnalysisPrograms/AnalysisPrograms.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/src/AnalysisPrograms/AnalysisPrograms.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/src/AnalysisPrograms/AnalysisPrograms.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
27 changes: 18 additions & 9 deletions ap.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,28 @@

}
],
"extensions": {
"recommendations": [
"ms-dotnettools.csharp",
"ms-vscode.powershell",
"ionide.ionide-fsharp"
]
},
"settings": {
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"src/Acoustics.*/**": true,
"src/AcousticWorkbench": true,
"src/AED": true,
"src/AudioAnalysisTools": true,
"src/TowseyLibrary": true,
"src/AnalysisPrograms/**": true,
"src/AnalysisBase/**": true,
"tests": true,
"TestResults": true
// "src/Acoustics.*/**": true,
// "src/AcousticWorkbench": true,
// "src/AED": true,
// "src/AudioAnalysisTools": true,
// "src/TowseyLibrary": true,
// "src/AnalysisPrograms/**": true,
// "src/AnalysisBase/**": true,
// "tests": true,
// "TestResults": true
},
"omnisharp.enableRoslynAnalyzers": true,
"omnisharp.enableEditorConfigSupport": true,
}
}
Empty file modified build/build_docker.ps1
100644 → 100755
Empty file.
Empty file modified build/download_ap.Tests.ps1
100644 → 100755
Empty file.
Empty file modified build/download_ap.ps1
100644 → 100755
Empty file.
Empty file modified build/package.ps1
100644 → 100755
Empty file.
Empty file modified build/release.ps1
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions build/set_permissions.ps1
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/pwsh

#Requires -Version 6

$tools = @(
"ffmpeg",
Expand Down
Empty file modified build/tag.ps1
100644 → 100755
Empty file.
Empty file modified build/update_audio_utils.ps1
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/linux-arm/ffmpeg/ffmpeg
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/linux-arm/ffmpeg/ffprobe
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/linux-musl-x64/ffmpeg/ffmpeg
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/linux-musl-x64/ffmpeg/ffprobe
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/linux-x64/ffmpeg/ffmpeg
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/linux-x64/ffmpeg/ffprobe
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/osx-x64/ffmpeg/ffmpeg
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/osx-x64/ffmpeg/ffprobe
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/osx-x64/sox/sox
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/osx-x64/sox/soxi
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/osx-x64/wavpack/wvunpack
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/win-arm64/ffmpeg/ffmpeg.exe
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/win-arm64/ffmpeg/ffprobe.exe
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/win-x64/ffmpeg/ffmpeg.exe
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/win-x64/ffmpeg/ffprobe.exe
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/win-x64/sox/sox.exe
100644 → 100755
Empty file.
Empty file modified lib/audio-utils/win-x64/wavpack/wvunpack.exe
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/Acoustics.Shared/AppConfigHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ internal static string GetExeFile(string name, bool required = true)
return null;
}

private static void CheckForExecutePermission(string executablePath)
internal static void CheckForExecutePermission(string executablePath)
{
// check we have required permissions
if (!IsOSPlatform(Windows))
Expand Down
1 change: 0 additions & 1 deletion src/AnalysisPrograms/AnalysisPrograms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.5.0" />
<PackageReference Include="Microsoft.Bcl.Build" Version="1.0.21" />
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-unstable0024" />
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-unstable0024" />
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-unstable0702" />
Expand Down
5 changes: 5 additions & 0 deletions style.ruleset
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="New Rule Set" Description=" " ToolsVersion="15.0">
<Include Path="allrules.ruleset" Action="Default" />
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp" RuleNamespace="Microsoft.CodeAnalysis.CSharp">
<Rule Id="CS1573" Action="Hidden" /> <!-- https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs1573-->
<Rule Id="CS1591" Action="Hidden" /> <!-- https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs1591 -->

</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1005" Action="None" />
<Rule Id="SA1512" Action="None" />
Expand Down
1 change: 0 additions & 1 deletion tests/Acoustics.Test/Acoustics.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-unstable0024" />
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-unstable0702" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-unstable0421" />
<PackageReference Include="Microsoft.Bcl.Build" Version="1.0.21" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.164">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
3 changes: 1 addition & 2 deletions tests/Acoustics.Test/Shared/AppConfigHelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ namespace Acoustics.Test.Shared
using System.Runtime.InteropServices;
using Acoustics.Shared;
using Acoustics.Test.TestHelpers;
using Acoustics.Test.TestHelpers.Fixtures;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Mono.Unix;
using static Acoustics.Shared.AppConfigHelper;

Expand Down

0 comments on commit 5f08faa

Please sign in to comment.