We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please Compile This Project
#1
I Found A Project Called Light Develop Can You Please Compile It 

LINK:https://github.com/Knowif/LightDevelop

Also I Am A New MEmber  Smile 

My KeyBoard Extension For Smallbasic:
Reply
#2
Hi z-s,

This compiles easily using Visual Studio 2022, so you should have no problem compiling it.

However, windows 11 thinks it contains a virus and I have to disable anti-virus to compile or run it.  While this is probably a false positive I am not keen to do this this with something I know nothing about.

It was last worked on over 7 years ago and looks like a cut down VB IDE.  If you want to use Visual Basic I would recommend starting with Small Basic, then when you want more, move directly to free Visual Studio.

Did you write a keyboard extension for Small Basic?
[-] The following 1 user Likes litdev's post:
  • z-s
Reply
#3
Yes This Is My Keyboard Extension

LINK:https://www.mediafire.com/file/zices7kf9cyzq54/zs.rar/file

Visual Studio Is Highly Sized And Require Large RAM
Reply
#4
I have compiled LightDevelop and uploaded a zip of it to http://litdev.uk/forum/LightDevelop.zip.  I had to compile it with anti-virus turned off, so beware!

I downlloaded your SB extension.  I assume your question about intellisense is related to this.  Your extension dll does not have any associated xml.

I tried a small test - I am unsure what the full intention of the extension is but the following works for me.

Code:
zs.Q = "Hello"
TextWindow.WriteLine(zs.Q)

In order to generate intellisence xml, this needs to be set as a compile time option and the intellisence added as metadata using /// to your functions.  An example of the latter is below from LitDev extension.

Code:
    /// <summary>
    /// Gets the Standard SmallBasic colours and other colour utilities.
    /// </summary>
    public static class LDColours
    {
        /// <summary>
        /// Convert a Hue, Saturation, Lightness (HSL) color to a Red, Green, Blue (RGB) colour used by SmallBasic.
        /// </summary>
        /// <param name="H">Hue (0 to 360).</param>
        /// <param name="S">Saturation (0 to 1).</param>
        /// <param name="L">Lightness (0 to 1).</param>
        /// <returns>An RGB colour</returns>
        public static Primitive HSLtoRGB(Primitive H, Primitive S, Primitive L)
        {
            try
            {
                double[] RGB = HSL2RGB(H, S, L);
                return ColorTranslator.ToHtml(Color.FromArgb((int)(255 * RGB[0] + 0.5), (int)(255 * RGB[1] + 0.5), (int)(255 * RGB[2] + 0.5))).ToString();
            }
            catch (Exception ex)
            {
                Utilities.OnError(Utilities.GetCurrentMethod(), ex);
                return "#000000";
            }
        }

Google "generate xml documentation file" for more information on this.

Use ILSpy (google and download it) to decompile .Net like LitDev.dll or SmallBasicLibarary.dll to see how shuff is done.

Since you say VS is too heavy for your use I don't know how you are compiling your extension and how to set the option to export xml - if all these are related and you want to use LightDevlop to create the extension, then it may be hard to set this option.  But I am just guessing that these questions are related in this way?
Reply
#5
That ExtensionIs Made Using FremyExtension Complier ReCompiled By You So It Dont Have Xml Feuature And That Extension Have KeyCodes Stored in Simple Launage

Example:
GraphicsWindow.KeyDown = OnKeyDown
Sub OnKeyDown
If (GraphicsWindow.LastKey = ZS.Q) Then
LDDialogs.Confirm("HII","SAMPLE")
EndIf
EndSub


I already Have ILSPY
i want The Code for intelnise in SB

And THANKS FOR COMPILING
Reply
#6
OK,

First, your sample program works fine, but no intellisense.

Intellisence comes from the accompanying xml file, like LitDev.xml is the intellisense for LitDev.dll for example.

This xml can be automatically generated using VS if you add the /// comments before commands.

If you don't have VS, then it will obviously be harder.

You could create the xml directly (it is just text) by copying the format from an existing extension xml file - the format will have to be exactly correct.  Perhaps write an SB program to write it?

To help you I created a VS project using ILSpy on your extension ZS.dll and added some /// comments for a couple public methods and exported the resulting xml as a template for you.

This is the source code showing segments I modified.

Code:
/// <summary>
/// ZS Keyboard extension
/// </summary>
[SmallBasicType]
public sealed class ZS
{
    private static Primitive q;

    private static Primitive w;

...

    /// <summary>
    /// The letter Q.  Set or get this property.
    /// </summary>
    public static Primitive Q
    {
        get
        {
            return ZS.q;
        }
        set
        {
            ZS.q = value;
        }
    }

...


Below is the resulting ZS.xml file I got compiling with VS for ZS and Q property - different syntax may be needed (T: is type, P: is property, M: is method and E: is event) for events and objects, but you will see this by looking at other examples of extension xml.

Code:
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>ZS</name>
    </assembly>
    <members>
        <member name="T:ZS">
            <summary>
            ZS Keyboard extension
            </summary>
        </member>
        <member name="P:ZS.Q">
            <summary>
            The letter Q.  Set or get this property.
            </summary>
        </member>
    </members>
</doc>

Try using it as a starting point perhaps.
[-] The following 1 user Likes litdev's post:
  • AbsoluteBeginner
Reply
#7
An alternative to using VS IDE is to just use c# command line compiler, depending on your OS and hardware, this may be possible and much lighter than using the IDE.

See this article https://learn.microsoft.com/en-us/previo...de-library.  It also shows how to create xml output, you would need to reference SmallBasicLibrary.dll as well.  

This may be a learning curve or not possible with your hardware/OS.  csc.exe c# compiler should come with .Net framework - no need for any additional VS download, see http://www.tipsntracks.com/52/get-a-free...piler.html for example.

UPDATE

I was able to compile the C# code (ZS.cs) extracted from your dll using ILSpy with additional /// comments added for xml described earlier, using the command below from a cmd window in the folder containing the ZS.cs file.  Assuming you can get this version of csc.exe which should be the same place as mine if you have .Net 4 runtime installed it should work for you too.  You can put the command in a bat file for repeat calls.

Code:
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe" /target:library /reference:"C:\Program Files (x86)\Microsoft\Small Basic\SmallBasicLibrary.dll" /out:ZS.dll /doc:ZS.xml ZS.cs
[-] The following 2 users Like litdev's post:
  • AbsoluteBeginner, stevantosic
Reply
#8
Thanks For Answering I will Make A Software For XML Generating
[-] The following 1 user Likes z-s's post:
  • litdev
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)