-
Notifications
You must be signed in to change notification settings - Fork 1
Using devel : adding commands and packages
- '-' at the begining of an argument means the argument is an option and the arguent after this option is the value for it.
e.g.devel -<key> <value> <arg>-> key & value will do someting and then be skipped. - '--' at the begining of an argument means the argument is an option and does not take a value.
e.g.devel --<key> <arg>
This list is empty for now - there are none.
-
--nocopy: When you add a package, the source files are normally copied tosrc/Commands/mainorsrc/Commands/sub. This option disables that. It is primary for building the code with an IDE and projects (e.g. Visual Studio). If you use the Makefile, it is better to not use this option, because you would have to add your source to the Makefile manually. The Makefile takes alle .c files in the insrc/Commands/mainandsrc/Commands/subautomatically.
-
add msh_command_<type>_<name>: Adds the command namedmsh_command_<type>_<name>to the msh interpreter. -
package <filepath>: Adds a package to the msh interpreter.<filepath>must be the path to the folder of the package (without a/or\at the end!!).
Either type
make develop
./devel <commandline arguments>
or use devel over the Makefile (see below).
Download the packages repo code (or just the package you want). If the packages repo is next to the mshgit repo code on your desktop (the folders are in the same parent folder):
packages/
mshgit/
Then you don't have to change anything. Should that not be the case, you'll may have to change the includes in the files of the packages. The correct includes should already be commented above or below the activ includes.
Now got to the mshgit folder:
cd mshgit
and type
make command action=package data=<your path to the package folder>
In most cases you'll want:
make command action=package data=../packages/std-essential
Do not set the slash ("/") at the end!
This is similar to adding a package.
Copy your .c file to
mshgit/src/Commands/main
or
mshgit/src/Commands/sub
depending on what type your command is.
Got to the mshgit folder and type the following command:
make command action=add data=msh_command_<type>_<name of your command>
Finished :).
Build the devel project (don't forget the all.o file), set the commandline arguments in in the project properties under Debug and run it. Also see Building on Windows - Using Visual Studio