Browse code

In windows, show error messagebox when cannot init

Dario Rodriguez authored on 23/07/2025 21:34:18
Showing 2 changed files
... ...
@@ -11,7 +11,7 @@ imgmover.exe: imgmover.c win32_pipe.c roboto_regular.c
11 11
 	sh -c "if [ ! -e test-icon_256x256.png ] ; then convert -size 256x256 xc:white test-icon_256x256.png ; fi"
12 12
 	toolchain-zig/compile.sh imgmover.c -c -o imgmover-windows.o
13 13
 	toolchain-zig/compile.sh win32_pipe.c -c -o win32_pipe-windows.o
14
-	toolchain-zig/link.sh -icon test-icon_256x256.png imgmover.exe imgmover-windows.o win32_pipe-windows.o toolchain-zig/windows-msys2-mingw/lib/libraylib.a toolchain-zig/windows-msys2-mingw/lib/libpthread.a
14
+	toolchain-zig/link.sh -icon test-icon_256x256.png imgmover.exe imgmover-windows.o win32_pipe-windows.o toolchain-zig/windows-msys2-mingw/lib/libraylib.a toolchain-zig/windows-msys2-mingw/lib/libpthread.a toolchain-zig/windows-msys2-mingw/lib/w32api/libuser32.a
15 15
 
16 16
 roboto_regular.c: ttf2h.sh fonts/Roboto-Regular.ttf
17 17
 	./ttf2h.sh fonts/Roboto-Regular.ttf
... ...
@@ -59,9 +59,9 @@
59 59
 
60 60
 #define UTF8DOWNARROW "\xe2\x86\x86" /* U+2186 in UTF-8 */
61 61
 
62
-#ifndef ANDROID
63
-#define SIMANDROID
64
-#endif
62
+//#ifndef ANDROID
63
+//#define SIMANDROID
64
+//#endif
65 65
 
66 66
 #define TARGETFPS 30
67 67
 
... ...
@@ -78,7 +78,14 @@
78 78
 #define FONTHUGESIZE 128
79 79
 #define ADDREMOVEDIRDATAHEIGHT 128
80 80
 #else
81
-#define ROOTDIR "/var/www/default/animeshot/"
81
+#if !defined(__linux__) && !defined(ANDROID)
82
+#define ROOTDIR "Z:\\"
83
+#define SEP "\\"
84
+#else
85
+//#define ROOTDIR "/var/www/default/animeshot/"
86
+#define ROOTDIR "/"
87
+#define SEP "/"
88
+#endif
82 89
 #define DEFAULTWIDTH 1280
83 90
 #define DEFAULTHEIGHT 768
84 91
 #define LEFTSIZE 720
... ...
@@ -100,7 +107,6 @@
100 107
 
101 108
 #define WHEELSTEP LEFTIMAGESIDELEN
102 109
 
103
-#define SEP "/"
104 110
 
105 111
 #define BLOCKLISTINGBUF 2048
106 112
 #define BLOCKLISTINGELEMS 1024
... ...
@@ -359,6 +365,9 @@ main(int argc, char *argv[])
359 365
         win32pipe_init();
360 366
 #endif
361 367
         if((im=im_init("Fichero\nAjustes\nSalir\n\nEditar\nNuevo directorio\n\nAyuda\nInformación sobre el programa\n\n",ROOTDIR))==NULL) {
368
+#if !defined(__linux__) && !defined(ANDROID)
369
+                MessageBoxA(NULL,"Couldn't init interface","imgmover",0);
370
+#endif
362 371
                 return(1);
363 372
         }
364 373
         flag_ignorelmb=0;