jamarju / easyflash Goto Github PK
View Code? Open in Web Editor NEWEasyflash 3 toolset for macOS (fork of: http://bitbucket.org/skoe/easyflash)
Easyflash 3 toolset for macOS (fork of: http://bitbucket.org/skoe/easyflash)
I wanted to compile EasyTransfer:
make: *** No rule to make target 3/_Tools_also_MacOS/_MacOS/easyflash-master/easyflash-master/EasyTransfer/archive/%.tar.gz', needed by
Flash'. Stop.
Hello! I just thought I'd leave some recent hints here, in case somebody else is looking to compile this repo.
According to the docs:
brew install acme cc65 libftdi0 cmake confuse imagemagick
In my experience, you also want to:
brew install gcc libusb libusb-compat libftdi0 imagemagick
Then there is an issue I wasn't able to solve: brew install wxwidgets --with-static
doesn't work anymore, because option "--with-static" was removed. My solution was to remove --static
from WXCONFIGLIBS and just link dynamically, because I didn't manage to build wxWidgets in a way on Apple Silicon that would allow for static linking ¯_(ツ)_/¯ For the bold, you can try to follow this: https://www.betamaster.us/blog/?p=1999 and contribute back here if you manage to make it work.
Then there are a couple of code changes, since applications now needs to add the Security framework if they use libusb-1.0.a.
diff --git a/EasyTransfer/Makefile b/EasyTransfer/Makefile
index 3702699..9c1848a 100644
--- a/EasyTransfer/Makefile
+++ b/EasyTransfer/Makefile
@@ -53,7 +53,7 @@ ifeq ($(win32), yes)
else
LIBDIR := /usr/local/lib
# Link to static wx
- WXCONFIGLIBS := $(shell wx-config --static --libs)
+ WXCONFIGLIBS := $(shell wx-config --libs)
# Link to static dependencies, too
WXCONFIGLIBS := $(WXCONFIGLIBS:-lpng=$(LIBDIR)/libpng.a)
WXCONFIGLIBS := $(WXCONFIGLIBS:-ljpeg=$(LIBDIR)/libjpeg.a)
@@ -63,9 +63,9 @@ else
cxx := c++
cc := gcc
outbase := $(top_dir)/out
- cxxflags += $(shell wx-config --static --cxxflags)
- cxxlibs += $(LIBDIR)/libftdi.a $(LIBDIR)/libusb.a $(LIBDIR)/libusb-1.0.a $(WXCONFIGLIBS) -lpthread
- clibs += $(LIBDIR)/libftdi.a $(LIBDIR)/libusb.a $(LIBDIR)/libusb-1.0.a -framework IOKit -framework CoreFoundation
+ cxxflags += $(shell wx-config --cxxflags)
+ cxxlibs += $(LIBDIR)/libftdi.a $(LIBDIR)/libusb.a $(LIBDIR)/libusb-1.0.a $(WXCONFIGLIBS) -lpthread -framework Security
+ clibs += $(LIBDIR)/libftdi.a $(LIBDIR)/libusb.a $(LIBDIR)/libusb-1.0.a -framework IOKit -framework CoreFoundation -framework Security
archive_fmt := tar.bz2
icon_resize :=
@@ -274,7 +274,7 @@ $(objdir)/%.o: $(objdir)/%.c $(headers) | pre_deps
$(objdir)/%.c: $(srcdir)/%.prg | $(objdir) pre_deps
mkdir -p $(dir $@)
- python make/bin2c.py $< $@ $(notdir $(basename $@))
+ python3 make/bin2c.py $< $@ $(notdir $(basename $@))
$(objdir)/%.res.o: $(srcdir)/%.rc | $(objdir) pre_deps
$(windres) -I $(objdir) $< $@
diff --git a/EasyTransfer/make/bin2c.py b/EasyTransfer/make/bin2c.py
index 3816ae8..95ade9d 100644
--- a/EasyTransfer/make/bin2c.py
+++ b/EasyTransfer/make/bin2c.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import sys
@@ -7,14 +7,14 @@ if __name__ == '__main__':
if sys.argv[1] == '-':
instream = sys.stdin
else:
- instream = file(sys.argv[1],'rb')
+ instream = open(sys.argv[1],'rb')
if sys.argv[2] == '-':
outstream = sys.stdout
else:
- outstream = file(sys.argv[2], 'wt')
+ outstream = open(sys.argv[2], 'wt')
varname = sys.argv[3]
else:
- print "Usage: bin2c infile outfile varname"
+ print("Usage: bin2c infile outfile varname")
sys.exit(0)
outstream.write("\n\nconst unsigned char %s[] = {\n " % varname)
@@ -31,3 +31,4 @@ if __name__ == '__main__':
outstream.write("\nint %s_size = %i;\n\n" % (varname, written))
sys.exit(0)
+
diff --git a/EasyTransfer/src/ef3xfer_log.c b/EasyTransfer/src/ef3xfer_log.c
index 638de48..cdb6625 100644
--- a/EasyTransfer/src/ef3xfer_log.c
+++ b/EasyTransfer/src/ef3xfer_log.c
@@ -23,6 +23,7 @@
#include <stdarg.h>
#include <string.h>
+#include <stdio.h>
#include <ftdi.h>
diff --git a/EasyTransfer/src/ef3xfer_usb_test.c b/EasyTransfer/src/ef3xfer_usb_test.c
index 2de5210..264cd4d 100644
--- a/EasyTransfer/src/ef3xfer_usb_test.c
+++ b/EasyTransfer/src/ef3xfer_usb_test.c
@@ -31,7 +31,7 @@
static int test_sequence(void);
static int check_usb_with_value(uint8_t val);
-
+int run_usb_test();
/*****************************************************************************/
/**
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.