Skip to content

Commit 686b33a

Browse files
committed
compat with lc v2
1 parent 9135bd8 commit 686b33a

File tree

6 files changed

+44
-112
lines changed

6 files changed

+44
-112
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
bin
22
Debug
33
obj
4+
*.lcpkg

coreutils.csproj

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
7-
</PropertyGroup>
8-
9-
<ItemGroup>
10-
<Reference Include="ILeoConsole">
11-
<HintPath>/usr/include/LeoConsole/ILeoConsole.dll</HintPath>
12-
</Reference>
13-
</ItemGroup>
14-
15-
</Project>
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<Reference Include="ILeoConsole">
11+
<HintPath>/usr/lib/ILeoConsole.dll</HintPath>
12+
</Reference>
13+
</ItemGroup>
14+
15+
</Project>

ls.cs

Lines changed: 0 additions & 42 deletions
This file was deleted.

manifest.apkg.json

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
{
2-
"manifestVersion": 1.0,
3-
"packageName": "coreutils",
4-
"build": {
5-
"command": "dotnet",
6-
"args": "build",
7-
"folder": "."
8-
},
9-
"project": {
10-
"maintainer": "alexcoder04",
11-
"email": "[email protected]",
12-
"homepage": "https://github.com/alexcoder04/LeoConsole-coreutils",
13-
"bugTracker": "https://github.com/alexcoder04/LeoConsole-coreutils/issues"
14-
}
2+
"manifestVersion": 2.1,
3+
"packageName": "coreutils",
4+
"packageVersion": "0.2.0",
5+
"build": {
6+
"command": "dotnet",
7+
"args": ["build", "--nologo"],
8+
"folder": ".",
9+
"dlls": ["coreutils.dll"],
10+
"share": "./share"
11+
},
12+
"project": {
13+
"maintainer": "alexcoder04",
14+
"email": "[email protected]",
15+
"homepage": "https://github.com/alexcoder04/LeoConsole-coreutils",
16+
"bugTracker": "https://github.com/alexcoder04/LeoConsole-coreutils/issues"
17+
}
1518
}

mkdir.cs

Lines changed: 0 additions & 37 deletions
This file was deleted.

plugin.cs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ public class ConsoleData : IData {
1010
public string SavePath { get { return _SavePath; } set { _SavePath = value; } }
1111
public static string _DownloadPath;
1212
public string DownloadPath { get { return _DownloadPath; } set { _DownloadPath = value; } }
13-
public string Version { get { return "?"; } } // this will be removed soon
13+
public static string _Version;
14+
public string Version { get { return _Version; } set { _Version = value; } }
15+
public static string _CurrentWorkingPath;
16+
public string CurrentWorkingPath { get { return _CurrentWorkingPath; } set { _CurrentWorkingPath = value; } }
1417
}
1518

1619
public class ExamplePlugin : IPlugin {
@@ -24,22 +27,26 @@ public class ExamplePlugin : IPlugin {
2427
private List<ICommand> _Commands;
2528
public List<ICommand> Commands { get { return _Commands; } set { _Commands = value; } }
2629

27-
public void PluginMain() {
30+
public void PluginInit(){
2831
_data = new ConsoleData();
29-
32+
_Commands = new List<ICommand>();
33+
}
34+
35+
public void RegisterCommands() {
3036
_Commands = new List<ICommand>();
3137
_Commands.Add(new Basename());
3238
_Commands.Add(new Cat());
3339
_Commands.Add(new Date());
3440
_Commands.Add(new Clear());
3541
_Commands.Add(new Echo());
3642
_Commands.Add(new Hostname());
37-
_Commands.Add(new Ls());
38-
_Commands.Add(new Mkdir());
3943
_Commands.Add(new Printenv());
4044
_Commands.Add(new Sleep());
4145
_Commands.Add(new Yes());
4246
}
47+
48+
public void PluginMain() { }
49+
public void PluginShutdown() { }
4350
}
4451
}
4552

0 commit comments

Comments
 (0)