feat: CLI-only version (without GTK)

Modify the build system and the source
files to support building a CLI-only
version with only glib2 as a dependency.
Use CLI_ONLY=1 ./configure, then make clean all.
This commit is contained in:
Stéphane Lesimple
2020-08-18 18:26:24 +02:00
parent 4f480905dc
commit 99b27b982a
59 changed files with 9419 additions and 7349 deletions

View File

@@ -23,6 +23,7 @@
#ifndef RS03INCLUDES_H
#define RS03INCLUDES_H
#ifndef CLI
/* Data structs from rs03-window.c */
typedef struct
@@ -117,6 +118,7 @@ typedef struct
int dataBytes;
int percent, lastPercent;
} RS03Widgets;
#endif
/*
* local working closure for internal checksums
@@ -131,6 +133,7 @@ typedef struct
* These are exported via the Method struct
*/
#ifndef CLI
void CreateRS03EncWindow(Method*, GtkWidget*);
void CreateRS03FixWindow(Method*, GtkWidget*);
void CreateRS03PrefsPage(Method*, GtkWidget*);
@@ -141,6 +144,7 @@ void ReadRS03Preferences(Method*);
void ResetRS03VerifyWindow(Method*);
void CreateRS03VerifyWindow(Method*, GtkWidget*);
#endif
/*
* These are exported (resp. only used) in ecc-rs03.c and rs03*.c
@@ -196,11 +200,13 @@ void RS03Fix(Image*);
int RS03RecognizeFile(LargeFile*, EccHeader**);
int RS03RecognizeImage(Image*);
#ifndef CLI
/* rs03-window.c */
void RS03AddFixValues(RS03Widgets*, int, int);
void RS03SetFixMaxValues(RS03Widgets*, int, int, gint64);
void RS03UpdateFixResults(RS03Widgets*, gint64, gint64);
#endif
/* rs03-verify.c */
@@ -211,7 +217,9 @@ void RS03Verify(Image*);
/* temporary single threaded versions */
void RS03SCreate(void);
#ifndef CLI
void CreateRS03SEncWindow(Method*, GtkWidget*);
void ResetRS03SEncWindow(Method*);
#endif
#endif