🔼Upgrading from API v1.3
Follow the compatibility notes when upgrading your mods from API v1.3
When upgrading your modification from the target of the later version of Nitrocid KS that declares itself to be from the API v1.3, you must make necessary changes to be able to use your mod in a Nitrocid KS version which you use to test your mod. These changes will be listed starting from 0.0.16 to the last version in this API revision.
From 0.0.16
This version refined the kernel in various aspects, including the enhancements of the coloring system and the addition of various useful features.
⭐v0.0.16.x seriesTemplateSet() and ParseCurrentTheme()
One of the useful features added to this version series of Nitrocid KS is the dynamic theme support, which takes any theme information formatted in JSON format and parses it to the theme manager to set the necessary colors according to the color types.
This function was implemented to set the kernel colors from any theme name. However, the major caveat that affected this function was that themes depended on the supporting variables for each theme, which ultimately resulted in the API pollution that we had to clean up. Refining the theme feature caused us to remove this function and replace it with something saner.
If you want to apply your theme from either the pre-defined kernel themes or the custom theme file, use one of the three functions. Their method signatures are shown below.
The second function, ParseCurrentTheme()
, was actually checking the kernel colors against all the themes that were defined and, if matched, returned the appropriate theme name. Such function is not available as an alternative in the current version of the kernel and may not arrive soon.
ListDrivers()
This function listed all the parsed hardware that Inxi.NET parsed. Since 0.0.16, a better alternative to this function, ListHardware()
, surfaced, causing this function to be removed from the public API.
ListHardware()
offers the same functionality as this function, except that it now takes a specific hardware type or all the types. To upgrade your mod to the latest API, you need to use the below function.
NotEnoughArgumentsException class
Due to how the shell worked in API 1.2 or earlier, this exception was implemented to try to tell the user that they didn't provide enough arguments for each command that required arguments to be provided. As the recent shell breakthroughs happened, we've removed the entire exception to replace it with a faster alternative.
It's clunky to throw this exception each time insufficient arguments were provided, so we advice you to cease using this function.
Synth system
Beep synth system was implemented to create your PC speaker songs using only the frequencies in hertz and lengths in milliseconds. It was removed because it was later realized that the beep method used wasn't cross-platform according to the .NET 6.0 manual as described in the below link:
As a result, the entire synth system was removed.
This function was deemed not to work on systems that aren't using Windows. If you want to continue using the synth system, compile the mod example that holds the source code of the system from source. If you want your mod to work in Linux, either implement your own wrapper to the beep system for your Linux kernel version, or stop using this function and start implementing visual alerts.
GetCultureFromLang()
This method used to return culture names from the current kernel language. However, it was later found to be using hard-coded culture names because a lot of maintenance affected it regarding names that worked in both Windows and Linux, causing it to be later vanished.
The same functionality made a return, but, this time, we used variables.
Configuration Renovation
We had three types of different configuration renovation that caused API removals during the development period of 0.0.16.
User configuration renovation
This function first appeared at the start of API v1.2 as a private API function to get encrypted user password.
Alias configuration renovation
It was used as a shortcut to close the old-style alias list file.
Central configuration renovation
The functions that were found in the Config module were used solely to check the existing kernel configuration file for updates and rebuilds the configuration file to make upgrades between kernel versions go smoother.
The last routine, however, converts the kernel configuration file created by API v1.0 kernels to the usable form.
All of the functions were removed as a result of the deprecation of the converter tool that last shipped with API v2.1 kernels.
True color writers
These functions used the ancient RGB class implemented by the kernel itself to specify the true RGB values of any color we want. However, as the Color class came (now in ColorSeq), this caused us to merge these functions to the Color class.
You can still use Write()
and their siblings using the Color class.
ParseMods()
This function was used as an on/off lever to trigger all mods in one go. It got split to two separate functions, StartMods()
and StopMods()
.
You can still use the two separate functions in the latest kernel version series. But, be careful if you're using these APIs! You could be stopping your own mods! Their method signatures are shown below.
SFTPPromptForPassword()
This function was used to prompt the user for the SFTP password for the specified address. As GetConnectionInfo() got implemented, we've removed this function.
We advice you to cease using this function.
From 0.0.17
This version was released as a small update to add minor features and general improvements.
🌃v0.0.17.x seriesInitTimesInZones()
This function used to populate all the available time zones from your computer to cache it to the public field containing timezones. However, it was later removed for said reason.
We advice you to cease using this function.
ShowTimesInZones()
This routine was used to show information about all or selected time zone, including the UTC offsets. This function was later split to three separate functions.
To use this function in the latest API revision, use these three functions listed in the below code block.
From 0.0.18
This version added some more features to the kernel, including the custom startup banner support.
🥁v0.0.18.x seriesAll help functions
These functions were used to populate help information for all shells. However, their functions have been moved to the help list field initializers, marking these routines as null and void.
These functions were never meant to be available to the public API in the first place. We advice you to cease using this function to update built-in help entries. The enhanced help system introduced in recent API series adapts to such changes.
Last updated