Dec 08, 2022Kuina-chan
This is a tutorial for people who are new to Kuin Programming Language, and for exe execution environments.
Once you have Kuin, run kuin.exe first (Figure 1-1).
For development with Kuin, you mainly use only (1) kuin.exe. (2) kuincl.exe is a tool for compiling from the command prompt.
When you run kuin.exe, the screen shown in Figure 1-2 will appear.
This kuin.exe is a set of program editor, compiling and debugging functions. Write your program in (1) and press (2) to compile and run it.
In (3), you can select the kind of program to be generated. Choose Window for a window application, or CUI for an application that runs on a command prompt.
The log of the compilation result will be output to (4), and you can check the error content here.
First of all, with no program written, try "Compile & Run" or press the F5 key on your keyboard. If you see "Hello, world!" on the screen, compilation and execution are successful (Figure 1-3).
Sometimes, antivirus software will warn you about this (the act of generating an exe seems to be trapped?) However, if you do not see any problem, please exclude the following from the checklist: "C:\Users\AppData\Roaming\Kuin\".
In Kuin, if you do not write any program, it will be a program that displays "Hello, world!" on the screen.
By the way, if you select CUI to compile and run the program, it will look like Figure 1-4.
After that, you are free to write, compile and run your own programs.
Finally, when the program is finished and you want to distribute it, do a release build (Figure 1-5).
Click "Release Build" in (1), and save the archive file with a name of your choice (.zip). Then, a fast executable file will be generated along with various files in a minimal form so that you can distribute the zip file as is.
During normal development, press "Compile & Run" to generate a debug build that compiles fast and you can detect errors in detail, and when you are finished and ready to distribute, do a release build that runs fast and is suitable for distribution.
If you create a folder named res in the same location as the source file (.kn) to be compiled, the entire contents of the folder will be copied to the location of the executable file when it is compiled, so it is convenient to put the resource files used in the program in the res folder (Figure 1-6).
The res folder will be encrypted and combined into a single file when it is built in the release.
In the samples folder, you will find some samples. These samples have been created using a variety of techniques, so make use of them.
To open the samples or the program you made, click (1) in Figure 2-1.
By the way, (2) allows you to save the program you have created.
Let's open "samples/0000_kuinvaders/main.kn". Compile and run it in Window mode, and Kuinvaders will be executed (Figure 2-2).
All of the included samples are programs for Window mode.
The included samples are shown in Table 2-1.
|Folder Name||Screen||Summary||Number Of Lines|
That's all for the tutorial For Beginners In Kuin. In the tutorials that follow, I will explain in turn while creating specific programs so that even a programming beginner can create a practical application.