v6.0BETA1 release v6.0BETA1
authorMichael McMaster <michael@codesrc.com>
Tue, 31 May 2016 11:04:44 +0000 (21:04 +1000)
committerMichael McMaster <michael@codesrc.com>
Tue, 31 May 2016 11:04:44 +0000 (21:04 +1000)
doc/SCSI2SD_QuickStartGuide.odt
src/scsi2sd-util6/Makefile
src/scsi2sd-util6/scsi2sd-util.cc

index 5c278a0..61b1bba 100644 (file)
Binary files a/doc/SCSI2SD_QuickStartGuide.odt and b/doc/SCSI2SD_QuickStartGuide.odt differ
index dabd550..3cd88aa 100755 (executable)
@@ -69,6 +69,7 @@ ifeq ($(TARGET),Win64)
 endif
 ifeq ($(TARGET),Linux)
        VPATH += hidapi/linux
+       CPPFLAGS += -DHAS_LIBUSB
        LDFLAGS += -ludev -lexpat -lusb-1.0
        BUILD := $(PWD)/build/linux
 endif
@@ -82,7 +83,7 @@ ifeq ($(TARGET),Darwin)
        BUILD := $(PWD)/build/mac
 all: $(BUILD)/scsi2sd-util6.dmg
 
-$(BUILD)/scsi2sd-util6.dmg: $(BUILD)/scsi2sd-util6 $(BUILD)/scsi2sd-monitor
+$(BUILD)/scsi2sd-util6.dmg: $(BUILD)/scsi2sd-util6
        mkdir -p $(dir $@)/dmg
        cp $(BUILD)/scsi2sd-util6 $(dir $@)/dmg
        chmod a+rx $(dir $@)/dmg/*
@@ -179,10 +180,6 @@ $(BUILD)/scsi2sd-util6$(EXE): $(OBJ) $(BUILD)/scsi2sd-util.o
        mkdir -p $(dir $@)
        $(CXX) $(CXXFLAGS) $^ $(LDFLAGS_WX) $(LDFLAGS) -o $@
 
-$(BUILD)/scsi2sd-monitor$(EXE): $(OBJ) $(BUILD)/scsi2sd-monitor.o
-       mkdir -p $(dir $@)
-       $(CXX) $(CXXFLAGS) $^ $(LDFLAGS_WX) $(LDFLAGS) -o $@
-
 clean:
        rm $(BUILD)/scsi2sd-util6$(EXE) $(OBJ) $(BUILD)/libzipper/buildstamp
 
@@ -198,7 +195,7 @@ dist:
                ../SCSI2SD/src/hidpacket.c ../../include/hidpacket.h ../../include/scsi2sd.h \
               libzipper-1.0.4 Makefile \
                SCSI2SD_Bootloader.cc SCSI2SD_Bootloader.hh SCSI2SD_HID.cc SCSI2SD_HID.hh \
-              scsi2sd-monitor.cc scsi2sd-util.cc TargetPanel.cc TargetPanel.hh \
+              scsi2sd-util.cc TargetPanel.cc TargetPanel.hh \
               BoardPanel.cc BoardPanel.hh \
               $(NAME)-$(VERSION)
        tar jcvf $(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION)
index 2fbbfdb..8f1d23f 100644 (file)
@@ -58,7 +58,9 @@ using std::shared_ptr;
 using std::tr1::shared_ptr;
 #endif
 
+#ifdef HAS_LIBUSB
 #include <libusb-1.0/libusb.h>
+#endif
 
 using namespace SCSI2SD;
 
@@ -110,6 +112,7 @@ void ProgressUpdate(unsigned char arrayId, unsigned short rowNum)
 namespace
 {
 bool hasDFUdevice() {
+#ifdef HAS_LIBUSB
        bool found = false;
 
        libusb_device **list;
@@ -130,6 +133,9 @@ bool hasDFUdevice() {
        libusb_free_device_list(list, 1);
 
        return found;
+#else
+       return false;
+#endif
 }
 
 
@@ -565,7 +571,11 @@ private:
 
                std::string cmd = ss.str();
                int result = system(cmd.c_str());
+#ifdef WIN32
+               if (result != 0)
+#else
                if (WEXITSTATUS(result) != 0)
+#endif
                {
                        wxMessageBox(
                                "Update failed",
@@ -930,7 +940,9 @@ class App : public wxApp
 public:
        virtual bool OnInit()
        {
+#ifdef HAS_LIBUSB
                libusb_init(NULL);
+#endif
                AppFrame* frame = new AppFrame();
                frame->Show(true);
                SetTopWindow(frame);