mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:47:35 +00:00
Demos: Remove "RetroFetch"
We should just get good enough to run "neofetch" or something like that instead of having this half-baked thing.
This commit is contained in:
parent
0d2659c0a2
commit
f2d1e591b6
4 changed files with 0 additions and 93 deletions
|
@ -1,21 +0,0 @@
|
||||||
include ../../Makefile.common
|
|
||||||
|
|
||||||
OBJS = main.o
|
|
||||||
|
|
||||||
APP = RetroFetch
|
|
||||||
|
|
||||||
DEFINES += -DUSERLAND
|
|
||||||
|
|
||||||
all: $(APP)
|
|
||||||
|
|
||||||
$(APP): $(OBJS)
|
|
||||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lc
|
|
||||||
|
|
||||||
.cpp.o:
|
|
||||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@echo "CLEAN"; rm -f $(APP) $(OBJS) *.d
|
|
||||||
|
|
|
@ -1,70 +0,0 @@
|
||||||
#include <AK/Assertions.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
static void moveto(int row, int column)
|
|
||||||
{
|
|
||||||
printf("\033[%d;%dH", row, column);
|
|
||||||
fflush(stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
printf("\033[3J\033[H\033[2J");
|
|
||||||
fflush(stdout);
|
|
||||||
int fd = open("/res/serenity.ansi.txt", O_RDONLY);
|
|
||||||
if (fd < 0) {
|
|
||||||
perror("open");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
for (;;) {
|
|
||||||
char buffer[BUFSIZ];
|
|
||||||
int nread = read(fd, buffer, sizeof(buffer));
|
|
||||||
if (nread < 0) {
|
|
||||||
perror("read");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
if (nread == 0)
|
|
||||||
break;
|
|
||||||
int nwritten = write(STDOUT_FILENO, buffer, nread);
|
|
||||||
if (nwritten < 0) {
|
|
||||||
perror("write");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
ASSERT(nwritten == nread);
|
|
||||||
}
|
|
||||||
close(fd);
|
|
||||||
|
|
||||||
printf("\n");
|
|
||||||
printf("\033[s");
|
|
||||||
|
|
||||||
char hostname[128];
|
|
||||||
int rc = gethostname(hostname, sizeof(hostname));
|
|
||||||
if (rc < 0) {
|
|
||||||
perror("gethostname");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int column = 42;
|
|
||||||
|
|
||||||
moveto(3, column);
|
|
||||||
printf("%s@%s\n", getlogin(), hostname);
|
|
||||||
|
|
||||||
moveto(4, column);
|
|
||||||
printf("\033[34;1mOS:\033[0m Serenity\n");
|
|
||||||
|
|
||||||
moveto(5, column);
|
|
||||||
printf("\033[34;1mKernel:\033[0m ");
|
|
||||||
fflush(stdout);
|
|
||||||
system("uname -nrm");
|
|
||||||
|
|
||||||
moveto(6, column);
|
|
||||||
printf("\033[34;1mUptime:\033[0m ");
|
|
||||||
fflush(stdout);
|
|
||||||
system("uptime");
|
|
||||||
|
|
||||||
printf("\033[u\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -93,7 +93,6 @@ cp ../Applications/Help/Help mnt/bin/Help
|
||||||
cp ../Applications/Browser/Browser mnt/bin/Browser
|
cp ../Applications/Browser/Browser mnt/bin/Browser
|
||||||
cp ../Demos/HelloWorld/HelloWorld mnt/bin/HelloWorld
|
cp ../Demos/HelloWorld/HelloWorld mnt/bin/HelloWorld
|
||||||
cp ../Demos/HelloWorld2/HelloWorld2 mnt/bin/HelloWorld2
|
cp ../Demos/HelloWorld2/HelloWorld2 mnt/bin/HelloWorld2
|
||||||
cp ../Demos/RetroFetch/RetroFetch mnt/bin/RetroFetch
|
|
||||||
cp ../Demos/WidgetGallery/WidgetGallery mnt/bin/WidgetGallery
|
cp ../Demos/WidgetGallery/WidgetGallery mnt/bin/WidgetGallery
|
||||||
cp ../Demos/Fire/Fire mnt/bin/Fire
|
cp ../Demos/Fire/Fire mnt/bin/Fire
|
||||||
cp ../DevTools/HackStudio/HackStudio mnt/bin/HackStudio
|
cp ../DevTools/HackStudio/HackStudio mnt/bin/HackStudio
|
||||||
|
|
|
@ -69,7 +69,6 @@ build_targets="$build_targets ../Applications/Browser"
|
||||||
build_targets="$build_targets ../Demos/Fire"
|
build_targets="$build_targets ../Demos/Fire"
|
||||||
build_targets="$build_targets ../Demos/HelloWorld"
|
build_targets="$build_targets ../Demos/HelloWorld"
|
||||||
build_targets="$build_targets ../Demos/HelloWorld2"
|
build_targets="$build_targets ../Demos/HelloWorld2"
|
||||||
build_targets="$build_targets ../Demos/RetroFetch"
|
|
||||||
build_targets="$build_targets ../Demos/WidgetGallery"
|
build_targets="$build_targets ../Demos/WidgetGallery"
|
||||||
|
|
||||||
build_targets="$build_targets ../DevTools/HackStudio"
|
build_targets="$build_targets ../DevTools/HackStudio"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue