Merge pull request #54 from carif/linux

This commit is contained in:
Anthony Lavado 2024-10-05 11:01:16 -04:00 committed by GitHub
commit 74da0d2568
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 59 additions and 24 deletions

11
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"ms-dotnettools.csharp",
"editorconfig.editorconfig"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}

12
.vscode/settings.json vendored
View File

@ -1,15 +1,19 @@
{ {
// jellyfinDir : The directory of the cloned jellyfin server project // jellyfinDir : The directory of the cloned jellyfin server project
// This needs to be built once before it can be used // This needs to be built once before it can be used
"jellyfinDir" : "${workspaceFolder}/../jellyfin/Jellyfin.Server", "jellyfinDir": "${workspaceFolder}/../jellyfin/Jellyfin.Server",
// jellyfinWebDir : The directory of the cloned jellyfin-web project // jellyfinWebDir : The directory of the cloned jellyfin-web project
// This needs to be built once before it can be used // This needs to be built once before it can be used
"jellyfinWebDir" : "${workspaceFolder}/../jellyfin-web", "jellyfinWebDir": "${workspaceFolder}/../jellyfin-web",
// jellyfinDataDir : the root data directory for a running jellyfin instance // jellyfinDataDir : the root data directory for a running jellyfin instance
// This is where jellyfin stores its configs, plugins, metadata etc // This is where jellyfin stores its configs, plugins, metadata etc
// This is platform specific by default, but on Windows defaults to // This is platform specific by default, but on Windows defaults to
// ${env:LOCALAPPDATA}/jellyfin // ${env:LOCALAPPDATA}/jellyfin
"jellyfinDataDir" : "${env:LOCALAPPDATA}/jellyfin", // and on Linux, it defaults to
// ${env:XDG_DATA_HOME}/jellyfin
// However ${env:XDG_DATA_HOME} does not work in Visual Studio Code's development container!
"jellyfinWindowsDataDir": "${env:LOCALAPPDATA}/jellyfin",
"jellyfinLinuxDataDir": "$HOME/.local/share/jellyfin",
// The name of the plugin // The name of the plugin
"pluginName" : "Jellyfin.Plugin.Template", "pluginName": "Jellyfin.Plugin.Template",
} }

56
.vscode/tasks.json vendored
View File

@ -7,7 +7,11 @@
// jellyfin server's plugin directory // jellyfin server's plugin directory
"label": "build-and-copy", "label": "build-and-copy",
"dependsOrder": "sequence", "dependsOrder": "sequence",
"dependsOn": ["build", "make-plugin-dir", "copy-dll"] "dependsOn": [
"build",
"make-plugin-dir",
"copy-dll"
]
}, },
{ {
// Build the plugin // Build the plugin
@ -27,29 +31,45 @@
"problemMatcher": "$msCompile" "problemMatcher": "$msCompile"
}, },
{ {
// Ensure the plugin directory exists before trying to use it // Ensure the plugin directory exists before trying to use it
"label": "make-plugin-dir", "label": "make-plugin-dir",
"type": "shell", "type": "shell",
"command": "mkdir", "command": "mkdir",
"windows": {
"args": [ "args": [
"-Force", "-Force",
"-Path", "-Path",
"${config:jellyfinDataDir}/plugins/${config:pluginName}/" "${config:jellyfinWindowsDataDir}/plugins/${config:pluginName}/"
] ]
},
"linux": {
"args": [
"-p",
"${config:jellyfinLinuxDataDir}/plugins/${config:pluginName}/"
]
}
}, },
{ {
// Copy the plugin dll to the jellyfin plugin install path // Copy the plugin dll to the jellyfin plugin install path
// This command copies every .dll from the build directory to the plugin dir // This command copies every .dll from the build directory to the plugin dir
// Usually, you probablly only need ${config:pluginName}.dll // Usually, you probablly only need ${config:pluginName}.dll
// But some plugins may bundle extra requirements // But some plugins may bundle extra requirements
"label": "copy-dll", "label": "copy-dll",
"type": "shell", "type": "shell",
"command": "cp", "command": "cp",
"windows": {
"args": [ "args": [
"./${config:pluginName}/bin/Debug/net6.0/publish/*", "./${config:pluginName}/bin/Debug/net6.0/publish/*",
"${config:jellyfinDataDir}/plugins/${config:pluginName}/" "${config:jellyfinWindowsDataDir}/plugins/${config:pluginName}/"
] ]
},
"linux": {
"args": [
"-r",
"./${config:pluginName}/bin/Debug/net6.0/publish/*",
"${config:jellyfinLinuxDataDir}/plugins/${config:pluginName}/"
]
}
}, },
] ]
} }