diff --git a/.vscode/launch.json b/.vscode/launch.json index ced5401..8a67338 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,11 +5,12 @@ "version": "0.2.0", "configurations": [ { - "name": "Launch", - "type": "xamarin", - "request": "launch", - "package": "com.your.app.package", - "intent": "" + "preLaunchTask": "build-and-start-debug-server", + "name": "Debug", + "type": "mono", + "request": "attach", + "address": "localhost", + "port": 55555 } ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..d07de90 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,50 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "command": "msbuild", + "args": [ + // Ask msbuild to generate full paths for file names. + "/property:GenerateFullPaths=true", + "/t:build" + ], + "group": "build", + "presentation": { + // Reveal the output only if unrecognized errors occur. + "reveal": "silent" + }, + // Use the standard MS compiler pattern to detect errors, warnings and infos + "problemMatcher": "$msCompile" + }, + { + "label": "build-and-start-debug-server", + "type": "shell", + "isBackground": true, + "command": "./start.sh", + // This task is run before some debug tasks. + // Problem is, it's a watch script, and since it never exits, VSCode + // complains. All this is needed so VSCode just lets it run. + "problemMatcher": [ + { + "pattern": [ + { + "regexp": ".", + "file": 1, + "location": 2, + "message": 3 + } + ], + "background": { + "activeOnStart": true, + "beginsPattern": ".", + "endsPattern": ".", + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Aurora.gtk/Aurora.gtk.csproj b/Aurora.gtk/Aurora.gtk.csproj index 5716ed4..570b39c 100644 --- a/Aurora.gtk/Aurora.gtk.csproj +++ b/Aurora.gtk/Aurora.gtk.csproj @@ -450,6 +450,9 @@ + + PreserveNewest + diff --git a/Aurora.gtk/libvlc.dylib b/Aurora.gtk/libvlc.dylib new file mode 100755 index 0000000..a1af725 Binary files /dev/null and b/Aurora.gtk/libvlc.dylib differ diff --git a/Aurora/App.xaml.cs b/Aurora/App.xaml.cs index 1b5a40a..2faa215 100644 --- a/Aurora/App.xaml.cs +++ b/Aurora/App.xaml.cs @@ -1,5 +1,6 @@ using System; using Aurora.Frontend.Views.Main; +using LibVLCSharp.Shared; using Xamarin.Forms; using Xamarin.Forms.Xaml; @@ -10,6 +11,7 @@ namespace Aurora public App() { InitializeComponent(); + Core.Initialize(); MainPage = new MainView(); } diff --git a/Aurora/Backend/Services/PlayerService.cs b/Aurora/Backend/Services/PlayerService.cs index e9d0624..8958158 100644 --- a/Aurora/Backend/Services/PlayerService.cs +++ b/Aurora/Backend/Services/PlayerService.cs @@ -12,7 +12,6 @@ namespace Aurora.Backend.Services public void Play(BaseSong song) { - Core.Initialize(); using (var libVLC = new LibVLC()) { song.Load(); diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..5959ce7 --- /dev/null +++ b/start.sh @@ -0,0 +1,2 @@ +msbuild +mono --debug --debugger-agent=transport=dt_socket,server=y,address=127.0.0.1:55555 Aurora.gtk/bin/Debug/Aurora.gtk.exe