Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added initial Windows support!
Currently only tested on XP and requires Firefox to be started as an
Administrator.

MozPopen build stuff is a bit of a mess so beware.

Added alternate backend to mozpopen that uses Boost.Process.
http://www.highscore.de/cpp/process/
Should work on all platforms, but just using on Windows for now due to
time constraints.
  • Loading branch information
codebutler committed Oct 21, 2010
1 parent e2e1616 commit 14f903f
Show file tree
Hide file tree
Showing 63 changed files with 8,489 additions and 42 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Expand Up @@ -13,6 +13,14 @@ missing

xpi/components
xpi/backend
xpi/platform
mozpopen/MozPopen.h
mozpopen/Debug

build/

*.suo
*.ncb
*.user
*.swp
*~
4 changes: 3 additions & 1 deletion Makefile.am
Expand Up @@ -2,12 +2,14 @@ SUBDIRS = mozpopen backend

all: zip

CHMOD=chmod 755 $(top_builddir)/xpi/backend/firesheep-backend
CHMOD=chmod 755 $(top_builddir)/xpi/platform/Darwin_x86-gcc3/firesheep-backend

zip:
mkdir -p $(top_builddir)/build
rm -f $(top_builddir)/build/firesheep.xpi
if PLATFORM_OSX
$(CHMOD) || sudo $(CHMOD)
endif
cd xpi && zip -r ../build/firesheep.xpi *

clean-local:
Expand Down
27 changes: 21 additions & 6 deletions backend/Makefile.am
Expand Up @@ -15,15 +15,24 @@ INCLUDES = \
-I deps/http-parser \
-I deps/json_spirit

LIBS = -lpcap

# OSX Specific
if PLATFORM_OSX
SOURCES += src/osx_platform.cpp
CFLAGS += -DPLATFORM_OSX
CFLAGS += -framework Security
CFLAGS += -framework SystemConfiguration
CFLAGS += -framework CoreFoundation

DEST = $(top_builddir)/xpi/backend
LIBS += -lpcap
DEST = $(top_builddir)/xpi/platform/Darwin_x86-gcc3
endif
if PLATFORM_WIN32
SOURCES += src/windows_platform.cpp
CFLAGS += -DPLATFORM_WIN32
CFLAGS += -I"/c/Program Files/boost/boost_1_44"
CFLAGS += -I"deps/winpcap/include"
CFLAGS += -L"deps/winpcap/lib"
LIBS += -lwpcap
DEST = $(top_builddir)/xpi/platform/WINNT_x86-msvc
endif

TARGET = $(DEST)/firesheep-backend

Expand All @@ -33,6 +42,12 @@ $(TARGET): $(SOURCES) Makefile
mkdir -p $(DEST)
rm -f $@
$(CXX) $(CFLAGS) $(INCLUDES) $(LIBS) -o $@ $(SOURCES)

if PLATFORM_WIN32
cp -f `which cygwin1.dll` $(DEST)
cp -f `which cygstdc++-6.dll` $(DEST)
cp -f `which cyggcc_s-1.dll` $(DEST)
endif

clean:
rm -f $(TARGET)
rm -f $(TARGET)

0 comments on commit 14f903f

Please sign in to comment.