Skip to content

Commit

Permalink
compat with lc v2
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcoder04 committed Jun 8, 2022
1 parent 9135bd8 commit 686b33a
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 112 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
bin
Debug
obj
*.lcpkg
30 changes: 15 additions & 15 deletions coreutils.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<Reference Include="ILeoConsole">
<HintPath>/usr/include/LeoConsole/ILeoConsole.dll</HintPath>
</Reference>
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<Reference Include="ILeoConsole">
<HintPath>/usr/lib/ILeoConsole.dll</HintPath>
</Reference>
</ItemGroup>

</Project>
42 changes: 0 additions & 42 deletions ls.cs

This file was deleted.

29 changes: 16 additions & 13 deletions manifest.apkg.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"manifestVersion": 1.0,
"packageName": "coreutils",
"build": {
"command": "dotnet",
"args": "build",
"folder": "."
},
"project": {
"maintainer": "alexcoder04",
"email": "[email protected]",
"homepage": "https://github.com/alexcoder04/LeoConsole-coreutils",
"bugTracker": "https://github.com/alexcoder04/LeoConsole-coreutils/issues"
}
"manifestVersion": 2.1,
"packageName": "coreutils",
"packageVersion": "0.2.0",
"build": {
"command": "dotnet",
"args": ["build", "--nologo"],
"folder": ".",
"dlls": ["coreutils.dll"],
"share": "./share"
},
"project": {
"maintainer": "alexcoder04",
"email": "[email protected]",
"homepage": "https://github.com/alexcoder04/LeoConsole-coreutils",
"bugTracker": "https://github.com/alexcoder04/LeoConsole-coreutils/issues"
}
}
37 changes: 0 additions & 37 deletions mkdir.cs

This file was deleted.

17 changes: 12 additions & 5 deletions plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ public class ConsoleData : IData {
public string SavePath { get { return _SavePath; } set { _SavePath = value; } }
public static string _DownloadPath;
public string DownloadPath { get { return _DownloadPath; } set { _DownloadPath = value; } }
public string Version { get { return "?"; } } // this will be removed soon
public static string _Version;
public string Version { get { return _Version; } set { _Version = value; } }
public static string _CurrentWorkingPath;
public string CurrentWorkingPath { get { return _CurrentWorkingPath; } set { _CurrentWorkingPath = value; } }
}

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

public void PluginMain() {
public void PluginInit(){
_data = new ConsoleData();

_Commands = new List<ICommand>();
}

public void RegisterCommands() {
_Commands = new List<ICommand>();
_Commands.Add(new Basename());
_Commands.Add(new Cat());
_Commands.Add(new Date());
_Commands.Add(new Clear());
_Commands.Add(new Echo());
_Commands.Add(new Hostname());
_Commands.Add(new Ls());
_Commands.Add(new Mkdir());
_Commands.Add(new Printenv());
_Commands.Add(new Sleep());
_Commands.Add(new Yes());
}

public void PluginMain() { }
public void PluginShutdown() { }
}
}

Expand Down

0 comments on commit 686b33a

Please sign in to comment.