Skip to content

Commit 74da0d2

Browse files
Merge pull request #54 from carif/linux
2 parents 2ddd082 + 4de36a8 commit 74da0d2

File tree

3 files changed

+59
-24
lines changed

3 files changed

+59
-24
lines changed

.vscode/extensions.json

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

.vscode/settings.json

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
{
22
// jellyfinDir : The directory of the cloned jellyfin server project
33
// This needs to be built once before it can be used
4-
"jellyfinDir" : "${workspaceFolder}/../jellyfin/Jellyfin.Server",
4+
"jellyfinDir": "${workspaceFolder}/../jellyfin/Jellyfin.Server",
55
// jellyfinWebDir : The directory of the cloned jellyfin-web project
66
// This needs to be built once before it can be used
7-
"jellyfinWebDir" : "${workspaceFolder}/../jellyfin-web",
7+
"jellyfinWebDir": "${workspaceFolder}/../jellyfin-web",
88
// jellyfinDataDir : the root data directory for a running jellyfin instance
99
// This is where jellyfin stores its configs, plugins, metadata etc
1010
// This is platform specific by default, but on Windows defaults to
1111
// ${env:LOCALAPPDATA}/jellyfin
12-
"jellyfinDataDir" : "${env:LOCALAPPDATA}/jellyfin",
12+
// and on Linux, it defaults to
13+
// ${env:XDG_DATA_HOME}/jellyfin
14+
// However ${env:XDG_DATA_HOME} does not work in Visual Studio Code's development container!
15+
"jellyfinWindowsDataDir": "${env:LOCALAPPDATA}/jellyfin",
16+
"jellyfinLinuxDataDir": "$HOME/.local/share/jellyfin",
1317
// The name of the plugin
14-
"pluginName" : "Jellyfin.Plugin.Template",
15-
}
18+
"pluginName": "Jellyfin.Plugin.Template",
19+
}

.vscode/tasks.json

+39-19
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
// jellyfin server's plugin directory
88
"label": "build-and-copy",
99
"dependsOrder": "sequence",
10-
"dependsOn": ["build", "make-plugin-dir", "copy-dll"]
10+
"dependsOn": [
11+
"build",
12+
"make-plugin-dir",
13+
"copy-dll"
14+
]
1115
},
1216
{
1317
// Build the plugin
@@ -27,29 +31,45 @@
2731
"problemMatcher": "$msCompile"
2832
},
2933
{
30-
// Ensure the plugin directory exists before trying to use it
31-
"label": "make-plugin-dir",
32-
"type": "shell",
33-
"command": "mkdir",
34+
// Ensure the plugin directory exists before trying to use it
35+
"label": "make-plugin-dir",
36+
"type": "shell",
37+
"command": "mkdir",
38+
"windows": {
39+
"args": [
40+
"-Force",
41+
"-Path",
42+
"${config:jellyfinWindowsDataDir}/plugins/${config:pluginName}/"
43+
]
44+
},
45+
"linux": {
3446
"args": [
35-
"-Force",
36-
"-Path",
37-
"${config:jellyfinDataDir}/plugins/${config:pluginName}/"
47+
"-p",
48+
"${config:jellyfinLinuxDataDir}/plugins/${config:pluginName}/"
3849
]
50+
}
3951
},
4052
{
41-
// Copy the plugin dll to the jellyfin plugin install path
42-
// This command copies every .dll from the build directory to the plugin dir
43-
// Usually, you probablly only need ${config:pluginName}.dll
44-
// But some plugins may bundle extra requirements
45-
"label": "copy-dll",
46-
"type": "shell",
47-
"command": "cp",
53+
// Copy the plugin dll to the jellyfin plugin install path
54+
// This command copies every .dll from the build directory to the plugin dir
55+
// Usually, you probablly only need ${config:pluginName}.dll
56+
// But some plugins may bundle extra requirements
57+
"label": "copy-dll",
58+
"type": "shell",
59+
"command": "cp",
60+
"windows": {
61+
"args": [
62+
"./${config:pluginName}/bin/Debug/net6.0/publish/*",
63+
"${config:jellyfinWindowsDataDir}/plugins/${config:pluginName}/"
64+
]
65+
},
66+
"linux": {
4867
"args": [
49-
"./${config:pluginName}/bin/Debug/net6.0/publish/*",
50-
"${config:jellyfinDataDir}/plugins/${config:pluginName}/"
68+
"-r",
69+
"./${config:pluginName}/bin/Debug/net6.0/publish/*",
70+
"${config:jellyfinLinuxDataDir}/plugins/${config:pluginName}/"
5171
]
52-
72+
}
5373
},
5474
]
55-
}
75+
}

0 commit comments

Comments
 (0)