summaryrefslogtreecommitdiff
path: root/wrapper-icon
diff options
context:
space:
mode:
authorPrzemyslaw <prymula76@outlook.com>2024-04-01 09:01:24 +0200
committerPrzemyslaw <prymula76@outlook.com>2024-04-01 09:01:24 +0200
commit18e499686d1c9991b65dc79272038b291bc14c5d (patch)
tree00b9d71f9c609e5e6fe990ea937822c3768032c9 /wrapper-icon
Init
Diffstat (limited to 'wrapper-icon')
-rw-r--r--wrapper-icon/Icon.rc1
-rw-r--r--wrapper-icon/Makefile.old.win33
-rw-r--r--wrapper-icon/Makefile.win36
-rw-r--r--wrapper-icon/config.txt1
-rw-r--r--wrapper-icon/icon/Jttt.icobin0 -> 2686 bytes
-rw-r--r--wrapper-icon/icon/Trefle.icobin0 -> 47826 bytes
-rw-r--r--wrapper-icon/icon/colorsmemory.icobin0 -> 2686 bytes
-rw-r--r--wrapper-icon/icon/ufo-small.icobin0 -> 2190 bytes
-rw-r--r--wrapper-icon/wrapper.c71
9 files changed, 142 insertions, 0 deletions
diff --git a/wrapper-icon/Icon.rc b/wrapper-icon/Icon.rc
new file mode 100644
index 0000000..7e45ea3
--- /dev/null
+++ b/wrapper-icon/Icon.rc
@@ -0,0 +1 @@
+id ICON "icon/colorsmemory.ico"
diff --git a/wrapper-icon/Makefile.old.win b/wrapper-icon/Makefile.old.win
new file mode 100644
index 0000000..107331f
--- /dev/null
+++ b/wrapper-icon/Makefile.old.win
@@ -0,0 +1,33 @@
+CPP = g++.exe
+CC = gcc.exe
+
+WINDRES = windres.exe
+RES =
+OBJ = wrapper.o $(RES)
+LINKOBJ = wrapper.o $(RES)
+#LIBS = -L"/lib" -lsdl -lsdl_ttf -mwindows
+LIBS = -static-libgcc
+INCS =
+CXXINCS =
+BIN = wrapper.exe
+CXXFLAGS = $(CXXINCS) -g
+CFLAGS = $(INCS)
+RM = rm
+
+.PHONY: all all-before all-after clean clean-custom
+
+all: all-before wrapper.exe all-after
+
+
+clean: clean-custom
+ ${RM} $(OBJ)
+ ${RM} $(BIN)
+
+
+$(BIN): $(OBJ)
+ $(CC) $(LINKOBJ) -o "wrapper.exe" $(LIBS)
+
+wrapper.o: wrapper.c
+ $(CC) -c wrapper.c -o wrapper.o $(CFLAGS) -DNO_STDIO_REDIRECT
+
+
diff --git a/wrapper-icon/Makefile.win b/wrapper-icon/Makefile.win
new file mode 100644
index 0000000..05bdd53
--- /dev/null
+++ b/wrapper-icon/Makefile.win
@@ -0,0 +1,36 @@
+CPP = g++.exe
+CC = i686-w64-mingw32-g++
+
+WINDRES = i686-w64-mingw32-windres
+RES =
+OBJ = wrapper.o $(RES)
+LINKOBJ = wrapper.o $(RES)
+#LIBS = -L"/lib" -lsdl -lsdl_ttf -mwindows
+LIBS = -static-libgcc
+INCS =
+CXXINCS =
+BIN = wrapper.exe
+CXXFLAGS = $(CXXINCS) -g
+CFLAGS = $(INCS)
+RM = rm
+
+.PHONY: all all-before all-after clean clean-custom
+
+all: all-before wrapper.exe all-after
+
+
+clean: clean-custom
+ ${RM} $(OBJ)
+ ${RM} $(BIN)
+
+ $(WINDRES) Icon.rc Icon.res
+
+
+$(BIN): $(OBJ)
+ $(WINDRES) Icon.rc -O coff -o icon.o
+ $(CC) $(LINKOBJ) -o "wrapper.exe" $(LIBS) icon.o
+
+wrapper.o: wrapper.c
+ $(CC) -c wrapper.c -o wrapper.o $(CFLAGS) -DNO_STDIO_REDIRECT
+
+
diff --git a/wrapper-icon/config.txt b/wrapper-icon/config.txt
new file mode 100644
index 0000000..3618f18
--- /dev/null
+++ b/wrapper-icon/config.txt
@@ -0,0 +1 @@
+.\jre\bin\javaw.exe -jar ColorsMemory.jar
diff --git a/wrapper-icon/icon/Jttt.ico b/wrapper-icon/icon/Jttt.ico
new file mode 100644
index 0000000..c5e9ee6
--- /dev/null
+++ b/wrapper-icon/icon/Jttt.ico
Binary files differ
diff --git a/wrapper-icon/icon/Trefle.ico b/wrapper-icon/icon/Trefle.ico
new file mode 100644
index 0000000..c753797
--- /dev/null
+++ b/wrapper-icon/icon/Trefle.ico
Binary files differ
diff --git a/wrapper-icon/icon/colorsmemory.ico b/wrapper-icon/icon/colorsmemory.ico
new file mode 100644
index 0000000..eb2475a
--- /dev/null
+++ b/wrapper-icon/icon/colorsmemory.ico
Binary files differ
diff --git a/wrapper-icon/icon/ufo-small.ico b/wrapper-icon/icon/ufo-small.ico
new file mode 100644
index 0000000..44ed689
--- /dev/null
+++ b/wrapper-icon/icon/ufo-small.ico
Binary files differ
diff --git a/wrapper-icon/wrapper.c b/wrapper-icon/wrapper.c
new file mode 100644
index 0000000..5ea19f8
--- /dev/null
+++ b/wrapper-icon/wrapper.c
@@ -0,0 +1,71 @@
+#include <stdio.h> // printf
+#include <stdlib.h> // exit
+#include <string.h>
+#include <unistd.h> // sleep access
+
+/*
+char * current(char * name){
+ char *file;
+
+ if (!getenv("CD")) {
+ printf ("Zmienna srodowiskowa \"CD\" nie istnieje !\n");
+ exit (1);
+ }
+ file=malloc(strlen(getenv("CD")+strlen(name)+1));
+ strcpy(file, getenv("CD"));
+ strcat(file, name);
+
+ return file;
+}
+*/
+
+char * file_exist(){
+ char * name = (char *)".\\config.txt";
+ //char *file = current(name);
+ char *file = name;
+
+ if (access(file, F_OK)==0){
+ printf("PLIK istnieje %s\n",file);
+ free(file);
+ return file;
+ }
+ printf("PLIK nie istnieje %s\n",file);
+ free(file);
+ return NULL;
+}
+
+
+
+void load(){
+
+ char * file = file_exist();
+ char bufor1[128];
+ char bufor2[128];
+ char bufor3[128];
+ char run[384];
+
+ if (!file) exit(1);
+
+ FILE * f = fopen(file, "r");
+ fscanf(f, "%s %s %s", bufor1,bufor2,bufor3);
+ fclose(f);
+ strcpy(run, bufor1);
+ strcat(run, " ");
+ strcat(run, bufor2);
+ strcat(run, " ");
+ strcat(run, bufor3);
+ printf("Uruchamiam %s \n",run);
+ free(file);
+
+ system(run);
+
+
+
+
+}
+
+int main (){
+ load();
+
+ return 0;
+}