Namecoin v3.50 Windows Beta Build for testing

Namecoin, NMControl
Post Reply
phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Namecoin v3.50 Windows Beta Build for testing

Post by phelix »

my first xcoin build ever. backup your wallet and be safe.

please test:
http://bitcoinx.com/namecoin_v350_win32betabuild.zip
edit: New download link: http://bitcoinx.com/namecoin/builds/nam ... _win32.zip

no changes to source.

these need cleaning etc.:

makefile.mingw

Code: Select all

# Copyright (c) 2009-2010 Satoshi Nakamoto
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.

BUILDROOT = C:/_temp/_namecoin
#khalahan-namecoin-82c140e/src

INCLUDEPATHS= \
	-I"$(BUILDROOT)/boost-1.43.0-mgw" \
	-I"$(BUILDROOT)/db-4.7.25.NC-mgw/build_unix" \
	-I"$(BUILDROOT)/openssl-1.0.0j-mgw" \
	-I"$(BUILDROOT)/openssl-1.0.0j-mgw/include" \
	-I"$(BUILDROOT)/openssl-1.0.0j-mgw/include/openssl" \
	-I"$(BUILDROOT)/wxWidgets-2.9.4-mgw/lib/gcc_lib/mswud" \
	-I"$(BUILDROOT)/wxWidgets-2.9.4-mgw/include"


LIBPATHS= \
 -L"$(BUILDROOT)/boost-1.43.0-mgw/stage/lib" \
 -L"$(BUILDROOT)/db-4.7.25.NC-mgw/build_unix" \
 -L"$(BUILDROOT)/openssl-1.0.0j-mgw" \
 -L"$(BUILDROOT)/wxWidgets-2.9.4-mgw/lib/gcc_lib"

WXLIBS= \
 -l wxmsw29ud_html -l wxmsw29ud_core -l wxmsw29ud_adv -l wxbase29ud -l wxtiffd -l wxjpegd -l wxpngd -l wxzlibd

LIBS= \
	-l boost_system-mgw44-mt-s-1_43 \
	-l boost_filesystem-mgw44-mt-s-1_43 \
	-l boost_program_options-mgw44-mt-s-1_43 \
	-l boost_thread-mgw44-mt-s-1_43 \
	-l db_cxx \
	-l ssl \
	-l crypto \
	-l eay32

DEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH -DUSE_SSL
DEBUGFLAGS=-g -D__WXDEBUG__
CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS)
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
	script.h db.h net.h irc.h keystore.h main.h wallet.h rpc.h uibase.h ui.h noui.h init.h \
	auxpow.h


bitcoin.exe: USE_UPNP:=1
	ifdef USE_UPNP
		INCLUDEPATHS += -I"$(BUILDROOT)/upnpc-exe-win32-20110215"
		LIBPATHS += -L"$(BUILDROOT)/upnpc-exe-win32-20110215"
		LIBS += -l miniupnpc -l iphlpapi
		DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
	endif

bitcoind.exe: USE_UPNP:=0
	ifdef USE_UPNP
		INCLUDEPATHS += -I"$(BUILDROOT)/upnpc-exe-win32-20110215"
		LIBPATHS += -L"$(BUILDROOT)/upnpc-exe-win32-20110215"
		LIBS += -l miniupnpc -l iphlpapi
		DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
	endif

LIBS += -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi

BASE_OBJS= \
	obj/auxpow.o \
	obj/util.o \
	obj/script.o \
	obj/db.o \
	obj/net.o \
	obj/irc.o \
	obj/keystore.o \
	obj/main.o \
	obj/wallet.o \
	obj/rpc.o \
	obj/init.o \
	cryptopp/obj/sha.o \
	cryptopp/obj/cpu.o

OBJS = \
	$(BASE_OBJS) \
	obj/hook.o

all: namecoind.exe
#all: bitcoind.exe


obj/%.o: %.cpp $(HEADERS)
	g++ -c $(CFLAGS) -DGUI -o $@ $<

cryptopp/obj/%.o: cryptopp/%.cpp
	g++ -c $(CFLAGS) -O3 -DCRYPTOPP_X86_ASM_AVAILABLE -o $@ $<

obj/ui_res.o: ../share/ui.rc  ../share/pixmaps/bitcoin.ico ../share/pixmaps/check.ico ../share/pixmaps/send16.bmp ../share/pixmaps/send16mask.bmp ../share/pixmaps/send16masknoshadow.bmp ../share/pixmaps/send20.bmp ../share/pixmaps/send20mask.bmp ../share/pixmaps/addressbook16.bmp ../share/pixmaps/addressbook16mask.bmp ../share/pixmaps/addressbook20.bmp ../share/pixmaps/addressbook20mask.bmp
	windres $(DEFS) $(INCLUDEPATHS) -o $@ -i $<

#bitcoin.exe: $(OBJS) obj/ui.o obj/uibase.o obj/ui_res.o
	#g++ $(CFLAGS) -mwindows -Wl,--subsystem,windows -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)

obj/nogui/%.o: %.cpp $(HEADERS)
	g++ -c $(CFLAGS) -o $@ $<

#bitcoind.exe: $(OBJS:obj/%=obj/nogui/%) obj/ui_res.o
	#g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)

#obj/test/%.o: obj/test/%.cpp $(HEADERS)
#	g++ -c $(CFLAGS) -o $@ $<

#test_bitcoin: obj/test/test_bitcoin.o
	#g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
	
obj/nogui/namecoin.o: namecoin.h

namecoind.exe: $(BASE_OBJS:obj/%=obj/nogui/%) obj/nogui/namecoin.o
	g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)

#strip namecoind.exe

clean:
	-del /Q bitcoin bitcoind test_bitcoin
	-del /Q obj/*
	-del /Q obj/nogui/*
	-del /Q obj/test/*
	-del /Q cryptopp/obj/*
	-del /Q test/*.o
	-del /Q headers.h.gch
updated windows build instructions

Code: Select all

most of this taken from: https://bitcointalk.org/index.php?topic=5851.msg86700#msg86700
thanks Matt :]

INSTALL
MinGW Automated Installer
http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/mingw-get-inst-20110316/mingw-get-inst-20110316.exe/download. 
Install with the C++ and MSYS options checked.

Activestate Perl (for building openssl)
http://www.activestate.com/activeperl/downloads
You don't need anything except ActivePerl and Perl, none of the other fancy crap.  You do want to add Perl to your PATH (its an option in the installer).


DOWNLOAD
#WxWidgets 2.9.1: http://sourceforge.net/projects/wxwindows/files/2.9.1/wxWidgets-2.9.1.zip/download.  Unzip to C:\wxWidgets-2.9.1-mgw
Instead of c:\ you can also use a directory to put everything (including the namecoin dir)

OpenSSL 1.0.0j: http://www.openssl.org/source/openssl-1.0.0j.tar.gz
Untar to C:\openssl-1.0.0j-mgw 
(yes bitcoin is designed to build with 1.0.0c, but might as well use the latest version since it works right?) 
untar using the tar binary which is included in MinGW using cd \c\ && tar xvvf \c\Users\Matt\Downloads\openssl-1.0.0j.tar.gz && mv openssl-1.0.0j openssl-1.0.0j-mgw in the msys shell
otherwise you will have to do this: http://stackoverflow.com/questions/7256087/error-compiling-openssl-with-mingw-msys/8376364#8376364
Note the subtle differences in versions/paths 1.0.0 vs 1.0.1 and 1.0.1c vs 1.0.1d - what a pita.

Berkeley DB 4.7.25 NC: http://download.oracle.com/berkeley-db/db-4.7.25.NC.zip.  Unzip to C:\db-4.7.25.NC-mgw
Boost 1.43.0: http://sourceforge.net/projects/boost/files/boost/1.43.0/boost_1_43_0.zip/download.  Unzip to C:\boost-1.43.0-mgw
Boost Jam: http://sourceforge.net/projects/boost/files/boost-jam/3.1.18/boost-jam-3.1.18-1-ntx86.zip/download.  Unzip wherever you like, I used C:\bjam
miniUPnPc binary http://miniupnp.tuxfamily.org/files/download.php?file=upnpc-exe-win32-20110215.zip.  Unzip to C:\upnpc-exe-win32-20110215
miniUPnPc source http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.5.20110215.tar.gz.  Untar to C:\upnpc-exe-win32-20110215\miniupnpc (you only need *.h, but the others won't hurt) untar with cd \c\upnpc-exe-win32-20110215 && tar xvvf \c\Users\Matt\Downloads\miniupnpc-1.5.20110215.tar.gz && mv miniupnpc-1.5.20110215 miniupnpc
Matt: Note that the reason for using the binary miniupnpc release is that I was unable to get it to build on my system.

Add C:\MinGW\bin to your PATH environment variable (Google is your friend as it depends on your Windows Version).
or use a path like this "\Program Files\MinGW\bin\mingw32-make.exe"   (Tab is your friend.)

BUILD
In the DOS Shell:
#wxWidgets:
#cd \wxWidgets-2.9.1-mgw\build\msw
#mingw32-make -f makefile.gcc

Boost:
cd \boost-1.43.0-mgw
\bjam\bjam.exe toolset=gcc --build-type=complete stage

In the msys Shell (MinGW shell in your start folder or C:\MinGW\msys\1.0\msys.bat, might require a reboot after installation):
OpenSSL:
cd /c/openssl-1.0.0c-mgw
./config
make
perl util/mkdef.pl 32 libeay enable-static-engine > libeay32.def
dllwrap --dllname libeay32.dll --output-lib libeay32.a --def libeay32.def libcrypto.a -lws2_32 -lgdi32
Copy the libeay32.dll file to the folder where you are building/running bitcoin.

In the msys Shell :
Berkeley DB:
cd /c/db-4.7.25.NC-mgw/build_unix
sh ../dist/configure --enable-mingw --enable-cxx
make

In the msys Shell:
namecoind.exe
get the latest linux version from here: https://dot-bit.org/Main_Page

In the msys shell, cd to the unzipped location and

make -f makefile.mingw

If you need to alter the makefile be careful - make is a whitespace bitch (beginning/end of line)  and will often give you completely worthless error messages.

Run with namecoind.exe 
make sure you have the libeay32.dll in the same folder
copy from c:\program files\mingw\bin\ libstdc++-6.dll and libgcc_s_dw2-1.dll

Last edited by phelix on Tue Sep 25, 2012 7:43 am, edited 1 time in total.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

iopq
Posts: 5
Joined: Fri Jul 29, 2011 7:22 pm
os: windows

Re: Namecoin v3.50 Windows Beta Build for testing

Post by iopq »

works for me

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: Namecoin v3.50 Windows Beta Build for testing

Post by phelix »

iopq wrote:works for me
thanks for testing :)

I used it for quite a bit now, without trouble.

Time for release.

New download link: http://bitcoinx.com/namecoin/builds/nam ... _win32.zip
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

Post Reply