Considerando che non mi serve a nulla chiamare l'help in htm dalla versione commandline e che la libgen e' usata solo per la funzione basename() si puo' fare a meno di entrambe:
--- Makefile 2008-05-25 15:12:44 +0000
+++ wavprg34_ian\Makefile 2008-05-26 20:31:46 +0000
@@ -10,5 +10,6 @@
wavprg.exe: $(BASE_OBJECTS) $(WAV2PRG_OBJECTS) $(PRG2WAV_OBJECTS) $(WINDOWS_OBJECTS) $(WINDOWS_DEFS)
- $(CC) $(LDFLAGS) -mwindows -Wl,--out-implib=wavprg.lib -o $@ $^ -lcomdlg32 -lhtmlhelp
+ $(CC) $(LDFLAGS) -mwindows -Wl,--out-implib=wavprg.lib -o $@ $^ -lcomdlg32
+# -lhtmlhelp
windows_gui/wavprg-resources.o:windows_gui/wavprg.rc
--- windows_gui/prg2wav_gui.c 2008-05-13 21:10:34 +0000
+++ wavprg34_ian/windows_gui/prg2wav_gui.c 2008-05-26 20:31:52 +0000
@@ -24,5 +24,5 @@
#include <commctrl.h>
#include <string.h>
-#include <htmlhelp.h>
+//#include <htmlhelp.h>
#include "resource.h"
#include "../t64utils.h"
@@ -636,7 +636,7 @@
return FALSE;
}
- case WM_HELP:
- HtmlHelpA(hwndDlg,"docs\\wavprg.chm::/prg2wav_main.htm",HH_DISPLAY_TOPIC,0);
- return TRUE;
+ //case WM_HELP:
+ //HtmlHelpA(hwndDlg,"docs\\wavprg.chm::/prg2wav_main.htm",HH_DISPLAY_TOPIC,0);
+ //return TRUE;
default:
return FALSE;
--- windows_gui/wav2prg_gui.c 2008-05-20 22:01:06 +0000
+++ wavprg34_ian/windows_gui/wav2prg_gui.c 2008-05-26 20:32:00 +0000
@@ -21,5 +21,5 @@
#include <stdio.h>
#include <shlobj.h>
-#include <htmlhelp.h>
+//#include <htmlhelp.h>
#include "resource.h"
#include "../2prg_api.h"
@@ -617,7 +617,7 @@
}
return TRUE;
- case WM_HELP:
- HtmlHelpA(hwndDlg,"docs\\wavprg.chm::/wav2prg_main.htm",HH_DISPLAY_TOPIC,0);
- return TRUE;
+ //case WM_HELP:
+ //HtmlHelpA(hwndDlg,"docs\\wavprg.chm::/wav2prg_main.htm",HH_DISPLAY_TOPIC,0);
+ //return TRUE;
default:
return FALSE;
--- windows_gui/wavprg_main.c 2008-05-11 23:07:04 +0000
+++ wavprg34_ian/windows_gui/wavprg_main.c 2008-05-26 20:32:04 +0000
@@ -16,5 +16,5 @@
#include <windows.h>
-#include <htmlhelp.h>
+//#include <htmlhelp.h>
#if (defined WIN32 && !defined __CYGWIN__)
#include "../mswin_compatibility.h"
@@ -101,7 +101,7 @@
}
return TRUE;
- case WM_HELP:
- HtmlHelpA(hwnd,"docs\\wavprg.chm",HH_DISPLAY_TOC,0);
- return TRUE;
+ //case WM_HELP:
+ //HtmlHelpA(hwnd,"docs\\wavprg.chm",HH_DISPLAY_TOC,0);
+ //return TRUE;
case WM_CLOSE:
DestroyWindow(hwnd);
--- command_line/process_input_files.c 2008-05-12 21:43:30 +0000
+++ wavprg34_ian/command_line/process_input_files.c 2008-05-26 20:41:12 +0000
@@ -16,5 +16,10 @@
#include <stdio.h>
#include <string.h>
-#include <libgen.h>
+//#include <libgen.h>
+#ifdef WIN32
+#define SLASH '\\'
+#else
+#define SLASH '/'
+#endif
#include <errno.h>
@@ -163,5 +168,10 @@
/* first, strip off path from filename */
- stripped = basename(filename);
+ //stripped = basename(filename);
+
+ if( (stripped=strrchr(filename,SLASH))!=NULL)
+ stripped++;
+ else
+ stripped = filename;
/* then ignore .prg at end if present */
poi una volta creato wav2prg.def copiandolo da wavprg.def si compilano entrambi, prg2wav e wav2prg. questo pero' va rinominato wavprg se no va a donnine allegre il meccanismo dei plugins.
Quindi:
Ian@CHOJIN ~/wavprg34_ian
$ make
gcc -c -o audiotap_file.o audiotap_file.c
gcc -c -o 2prg_api.o 2prg_api.c
gcc -c -o tapfile_read.o tapfile_read.c
gcc -c -o wav2prg_core.o wav2prg_core.c
gcc -c -o create_t64.o create_t64.c
gcc -c -o t64utils.o t64utils.c
gcc -c -o tapfile_write.o tapfile_write.c
gcc -c -o prg2wav_core.o prg2wav_core.c
gcc -c -o windows_gui/wav2prg_gui.o windows_gui/wav2prg_gui.c
gcc -c -o windows_gui/wavprg_main.o windows_gui/wavprg_main.c
windres --include=windows_gui -o windows_gui/wavprg-resources.o windows_gui/wavprg.rc
gcc -c -o windows_gui/wavprg_status_window.o windows_gui/wavprg_status_window.c
gcc -c -o windows_gui/prg2wav_gui.o windows_gui/prg2wav_gui.c
gcc -mwindows -Wl,--out-implib=wavprg.lib -o wavprg.exe audiotap_file.o 2prg_api.o tapfile_read.o wav2prg_core.o create_t64.o t64utils.o tapfile_write.o prg2wav_core.o windows_gui/wav2prg_gui.o windows_gui/wavprg_main.o windows_gui/wavprg-resources.o windows_gui/wavprg_status_window.o windows_gui/prg2wav_gui.o wavprg.def -lcomdlg32
Creating library file: wavprg.lib
Ian@CHOJIN ~/wavprg34_ian
$ make prg2wav.exe
gcc -c -o command_line/messages.o command_line/messages.c
gcc -c -o command_line/progressmeter.o command_line/progressmeter.c
gcc -c -o command_line/prg2wav.o command_line/prg2wav.c
gcc -c -o command_line/process_input_files.o command_line/process_input_files.c
gcc -o prg2wav.exe audiotap_file.o t64utils.o tapfile_write.o prg2wav_core.o command_line/messages.o command_line/progressmeter.o command_line/prg2wav.o command_line/process_input_files.o
Ian@CHOJIN ~/wavprg34_ian
$ make wav2prg.exe
gcc -c -o command_line/wav2prg.o command_line/wav2prg.c
gcc -c -o command_line/parse_options.o command_line/parse_options.c
gcc -Wl,--out-implib=wav2prg.lib -o wav2prg.exe audiotap_file.o 2prg_api.o tapfile_read.o wav2prg_core.o create_t64.o command_line/messages.o command_line/progressmeter.o command_line/wav2prg.o command_line/parse_options.o wav2prg.def
Creating library file: wav2prg.lib
Ian@CHOJIN ~/wavprg34_ian
$ mv wav2prg.exe wavprg.exe
Ian@CHOJIN ~/wavprg34_ian
$ strip *.exe -s
e poi si copiano gli exe dove stanno anche i plugins. Tutto regolare. =)