Patch about auto gen version string (#114)

* new: about app中,显示当前构建的git commit sha1以及构建时间

* bugfix: 修复shell的exec命令对绝对路径的拼接错误问题
This commit is contained in:
login
2022-12-17 17:49:12 +08:00
committed by GitHub
parent 83a7aaa46b
commit 7a818da88a
5 changed files with 45 additions and 23 deletions

View File

@ -1,3 +1,4 @@
#include "sys_version.h" // 这是系统的版本头文件,在编译过程中自动生成
#include <libc/src/math.h>
#include <libc/src/stdio.h>
#include <libc/src/stdlib.h>
@ -18,8 +19,10 @@ void print_copyright()
printf(" DragonOS - An opensource operating system.\n");
printf(" Copyright: fslongjin & DragonOS Community. 2022, All rights reserved.\n");
printf(" Version: ");
put_string("V0.1.1 - 20221127\n", COLOR_GREEN, COLOR_BLACK);
printf(" You can visit the project via:\n");
put_string("V0.1.2\n", COLOR_GREEN, COLOR_BLACK);
printf(" Git commit SHA1: %s\n", DRAGONOS_GIT_COMMIT_SHA1);
printf(" Build time: %s %s\n", __DATE__, __TIME__);
printf(" \nYou can visit the project via:\n");
printf("\n");
put_string(" Official Website: https://DragonOS.org\n", COLOR_INDIGO, COLOR_BLACK);
put_string(" GitHub: https://github.com/fslongjin/DragonOS\n", COLOR_ORANGE, COLOR_BLACK);
@ -34,13 +37,9 @@ void print_copyright()
int main()
{
// printf("Hello World!\n");
print_ascii_logo();
print_copyright();
// exit(0);
// while (1)
// ;
return 0;
}