On Tue, 16 Apr 2013, Jake wrote:
First off, thanks for all your hard work on Concordance - I've been using it
for awhile now and it's *far* better than Logitech's Harmony software :)
I noticed that 1.0 was released today so I tried to build some Windows
binaries for it. In both Visual C++ 2008 Express and Visual C++ 2010 Express
I'm getting failed builds - here's what the build logs look like:
OK, here's a patch for the first round of fixes for the Windows build.
This only fixes the compile issues with the code - I'm still fiddling with
how to deal with the project files, especially with including zziplib and
zlib. Right now, I'm thinking about just including the project files for
zziplib and zlib because I had to modify them. I figured it was probably
better just to make that a separate patch as it's going to be a bunch of
possibly understandable XML.
There are still some warnings but the ones that remain need to be examined
closely before making any changes.Fix Windows build issues. Also, resolve issues with newer autoconf.
Signed-off-by: Scott Talbert <s...@techie.net>
Index: concordance/concordance.c
===================================================================
RCS file: /cvsroot/concordance/concordance/concordance/concordance.c,v
retrieving revision 1.47
diff -u -p -r1.47 concordance.c
--- concordance/concordance.c 11 Apr 2013 04:18:43 -0000 1.47
+++ concordance/concordance.c 23 Apr 2013 03:16:14 -0000
@@ -173,6 +173,10 @@ void cb_print_percent_status(uint32_t st
const uint32_t *stages)
{
+#ifdef WIN32
+ CONSOLE_SCREEN_BUFFER_INFO sbi;
+#endif
+
if (stage_id == LC_CB_STAGE_NUM_STAGES) {
#if _DEBUG
printf("Num stages: %d\n", count);
@@ -180,10 +184,6 @@ void cb_print_percent_status(uint32_t st
return;
}
-#ifdef WIN32
- CONSOLE_SCREEN_BUFFER_INFO sbi;
-#endif
-
if (count != 0) {
#ifdef WIN32
GetConsoleScreenBufferInfo(con, &sbi);
Index: concordance/configure.ac
===================================================================
RCS file: /cvsroot/concordance/concordance/concordance/configure.ac,v
retrieving revision 1.9
diff -u -p -r1.9 configure.ac
--- concordance/configure.ac 10 Apr 2013 04:35:38 -0000 1.9
+++ concordance/configure.ac 23 Apr 2013 03:16:14 -0000
@@ -1,5 +1,6 @@
AC_INIT([concordance], [1.0], [bug-autom...@gnu.org])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+AM_PROG_CC_C_O
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_LIBTOOL
AC_PROG_CXX
Index: libconcord/configure.ac
===================================================================
RCS file: /cvsroot/concordance/concordance/libconcord/configure.ac,v
retrieving revision 1.11
diff -u -p -r1.11 configure.ac
--- libconcord/configure.ac 10 Apr 2013 04:32:16 -0000 1.11
+++ libconcord/configure.ac 23 Apr 2013 03:16:14 -0000
@@ -1,6 +1,7 @@
AC_INIT([libconcord], [1.0], [bug-autom...@gnu.org])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_MACRO_DIR([m4])
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_PROG_LIBTOOL
AC_PROG_CXX
a=1
Index: libconcord/libconcord.cpp
===================================================================
RCS file: /cvsroot/concordance/concordance/libconcord/libconcord.cpp,v
retrieving revision 1.43
diff -u -p -r1.43 libconcord.cpp
--- libconcord/libconcord.cpp 10 Apr 2013 04:17:05 -0000 1.43
+++ libconcord/libconcord.cpp 23 Apr 2013 03:16:14 -0000
@@ -33,7 +33,9 @@
#include <errno.h>
#include <zzip/lib.h>
#include <list>
+#ifndef WIN32
#include <unistd.h>
+#endif
#include <vector>
#include "libconcord.h"
#include "lc_internal.h"
@@ -791,7 +793,7 @@ int _get_identity(lc_callback cb, void *
int get_identity(lc_callback cb, void *cb_arg)
{
_report_stages(cb, cb_arg, 1, NULL);
- _get_identity(cb, cb_arg, LC_CB_STAGE_GET_IDENTITY);
+ return _get_identity(cb, cb_arg, LC_CB_STAGE_GET_IDENTITY);
}
int reset_remote(lc_callback cb, void *cb_arg)
@@ -852,7 +854,7 @@ int _invalidate_flash(lc_callback cb, vo
int invalidate_flash(lc_callback cb, void *cb_arg)
{
- _invalidate_flash(cb, cb_arg, LC_CB_STAGE_INVALIDATE_FLASH);
+ return _invalidate_flash(cb, cb_arg, LC_CB_STAGE_INVALIDATE_FLASH);
}
int post_preconfig(lc_callback cb, void *cb_arg)
@@ -1113,7 +1115,7 @@ int _verify_remote_config(lc_callback cb
int verify_remote_config(lc_callback cb, void *cb_arg)
{
- _verify_remote_config(cb, cb_arg, LC_CB_STAGE_VERIFY_CONFIG);
+ return _verify_remote_config(cb, cb_arg, LC_CB_STAGE_VERIFY_CONFIG);
}
int _prep_config(lc_callback cb, void *cb_arg, uint32_t cb_stage)
@@ -1362,7 +1364,7 @@ int _erase_firmware(int direct, lc_callb
int erase_firmware(int direct, lc_callback cb, void *cb_arg)
{
- _erase_firmware(direct, cb, cb_arg, LC_CB_STAGE_ERASE_FLASH);
+ return _erase_firmware(direct, cb, cb_arg, LC_CB_STAGE_ERASE_FLASH);
}
int read_firmware_from_remote(uint8_t **out, uint32_t *size, lc_callback cb,
Index: libconcord/libconcord.h
===================================================================
RCS file: /cvsroot/concordance/concordance/libconcord/libconcord.h,v
retrieving revision 1.23
diff -u -p -r1.23 libconcord.h
--- libconcord/libconcord.h 10 Apr 2013 04:17:05 -0000 1.23
+++ libconcord/libconcord.h 23 Apr 2013 03:16:14 -0000
@@ -32,6 +32,8 @@ typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned __int64 uint64_t;
+#define sleep(x) Sleep((x) * 1000)
+#define snprintf _snprintf
#else
Index: libconcord/remote.h
===================================================================
RCS file: /cvsroot/concordance/concordance/libconcord/remote.h,v
retrieving revision 1.21
diff -u -p -r1.21 remote.h
--- libconcord/remote.h 10 Apr 2013 04:17:06 -0000 1.21
+++ libconcord/remote.h 23 Apr 2013 03:16:14 -0000
@@ -243,7 +243,7 @@ public:
virtual int UpdateConfig(const uint32_t len,
const uint8_t *wr, lc_callback cb, void *cb_arg,
uint32_t cb_stage=0, uint32_t xml_size=0,
- uint8_t *xml=NULL) {};
+ uint8_t *xml=NULL) {return 0;};
int GetTime(const TRemoteInfo &ri, THarmonyTime &ht);
int SetTime(const TRemoteInfo &ri, const THarmonyTime &ht,
@@ -414,9 +414,6 @@ public:
void *cb_arg=NULL, uint32_t cb_stage=0);
int FinishConfig(const TRemoteInfo &ri, lc_callback cb=NULL,
void *cb_arg=NULL, uint32_t cb_stage=0);
- virtual int UpdateConfig(const uint32_t len,
- const uint8_t *wr, lc_callback cb, void *cb_arg,
- uint32_t cb_stage=0) {};
virtual int UpdateConfig(const uint32_t len, const uint8_t *wr,
lc_callback cb, void *cb_arg, uint32_t cb_stage=0,
uint32_t xml_size=0, uint8_t *xml=NULL);
Index: libconcord/remote_z.cpp
===================================================================
RCS file: /cvsroot/concordance/concordance/libconcord/remote_z.cpp,v
retrieving revision 1.26
diff -u -p -r1.26 remote_z.cpp
--- libconcord/remote_z.cpp 10 Apr 2013 04:17:06 -0000 1.26
+++ libconcord/remote_z.cpp 23 Apr 2013 03:16:14 -0000
@@ -22,8 +22,6 @@
*/
#include <string.h>
-#include <unistd.h>
-#include <arpa/inet.h>
#include "libconcord.h"
#include "lc_internal.h"
#include "hid.h"
@@ -386,9 +384,6 @@ int CRemoteZ_USBNET::UpdateConfig(const
{
int err = 0;
int cb_count = 0;
- uint8_t rsp[60];
- unsigned int rlen;
- uint8_t status;
cb(LC_CB_STAGE_INITIALIZE_UPDATE, cb_count++, 0, 2,
LC_CB_COUNTER_TYPE_STEPS, cb_arg, NULL);
@@ -947,7 +942,6 @@ int CRemoteZ_HID::ReadRegion(uint8_t reg
uint8_t rsp[60];
unsigned int rlen;
uint8_t status;
- CRemoteZ_Base::TParamList pl;
/* Start a TCP transfer */
if ((err = Write(TYPE_REQUEST, COMMAND_INITIATE_UPDATE_TCP_CHANNEL))) {
Index: libconcord/usblan.cpp
===================================================================
RCS file: /cvsroot/concordance/concordance/libconcord/usblan.cpp,v
retrieving revision 1.15
diff -u -p -r1.15 usblan.cpp
--- libconcord/usblan.cpp 10 Apr 2013 04:24:53 -0000 1.15
+++ libconcord/usblan.cpp 23 Apr 2013 03:16:14 -0000
@@ -105,6 +105,13 @@ int FindUsbLanRemote(void)
struct timeval tv;
tv.tv_sec = connect_timeout;
tv.tv_usec = 0;
+ #ifdef WIN32
+ u_long non_blocking = 1;
+ if(ioctlsocket(sock, FIONBIO, &non_blocking) != 0) {
+ report_net_error("ioctlsocket()");
+ return LC_ERROR_OS_NET;
+ }
+ #else
if((flags = fcntl(sock, F_GETFL, 0)) < 0) {
report_net_error("fcntl()");
return LC_ERROR_OS_NET;
@@ -113,6 +120,7 @@ int FindUsbLanRemote(void)
report_net_error("fcntl()");
return LC_ERROR_OS_NET;
}
+ #endif
if ((err = connect(sock,(struct sockaddr*)&sa,sizeof(sa)))) {
if (errno != EINPROGRESS) {
@@ -128,6 +136,12 @@ int FindUsbLanRemote(void)
// Change the socket back to blocking which should be fine now that we
// connected.
+ #ifdef WIN32
+ if(ioctlsocket(sock, FIONBIO, 0) != 0) {
+ report_net_error("ioctlsocket()");
+ return LC_ERROR_OS_NET;
+ }
+ #else
if((flags = fcntl(sock, F_GETFL, 0)) < 0) {
report_net_error("fcntl()");
return LC_ERROR_OS_NET;
@@ -136,6 +150,7 @@ int FindUsbLanRemote(void)
report_net_error("fcntl()");
return LC_ERROR_OS_NET;
}
+ #endif
debug("Connected to USB LAN driver!");
Index: libconcord/web.cpp
===================================================================
RCS file: /cvsroot/concordance/concordance/libconcord/web.cpp,v
retrieving revision 1.29
diff -u -p -r1.29 web.cpp
--- libconcord/web.cpp 10 Apr 2013 04:24:53 -0000 1.29
+++ libconcord/web.cpp 23 Apr 2013 03:16:14 -0000
@@ -294,7 +294,7 @@ int encode_ir_signal(uint32_t carrier_cl
return 0;
}
-int add_usbnet_headers(char *post_data, TRemoteInfo &ri)
+void add_usbnet_headers(char *post_data, TRemoteInfo &ri)
{
sprintf(post_data+strlen(post_data), post_xml_usbnet1, ri.home_id,
ri.node_id, ri.tid);
Index: libconcord/win/libconcord.def
===================================================================
RCS file: /cvsroot/concordance/concordance/libconcord/win/libconcord.def,v
retrieving revision 1.10
diff -u -p -r1.10 libconcord.def
--- libconcord/win/libconcord.def 14 Aug 2010 16:29:22 -0000 1.10
+++ libconcord/win/libconcord.def 23 Apr 2013 03:16:14 -0000
@@ -13,6 +13,7 @@ get_fw_ver_min
get_fw_type
get_hw_ver_maj
get_hw_ver_min
+get_hw_ver_mic
get_flash_size
get_flash_mfg
get_flash_id
@@ -31,6 +32,13 @@ get_serial
get_config_bytes_used
get_config_bytes_total
+; SUPPORT HELPERS
+;
+is_config_dump_supported
+is_config_update_supported
+is_fw_dump_supported
+is_fw_update_supported
+
; TIME ACCESSORS
;
get_time_second
@@ -46,9 +54,10 @@ get_time_timezone
; HELPER FUNCTIONS
;
lc_strerror
+lc_cb_stage_str
delete_blob
-read_file
-identify_file
+read_and_parse_file
+delete_opfile_obj
; GENERAL REMOTE INTERACTIONS
;
@@ -66,6 +75,7 @@ invalidate_flash
; CONFIGURATION INTERACTIONS
;
+update_configuration
read_config_from_remote
write_config_to_remote
write_config_to_file
@@ -73,7 +83,6 @@ verify_remote_config
prep_config
finish_config
erase_config
-find_config_binary
; SAFEMODE FIRMWARE INTERACTIONS
;
@@ -83,7 +92,7 @@ write_safemode_to_file
; FIRMWARE INTERACTIONS
;
-is_fw_update_supported
+update_firmware
is_config_safe_after_fw
prep_firmware
finish_firmware
@@ -91,7 +100,6 @@ erase_firmware
read_firmware_from_remote
write_firmware_to_remote
write_firmware_to_file
-extract_firmware_binary
; IR-stuff
get_key_names
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel