From: <av...@us...> - 2011-02-14 21:50:33
|
Revision: 7274 http://openhpi.svn.sourceforge.net/openhpi/?rev=7274&view=rev Author: avpak Date: 2011-02-14 21:50:26 +0000 (Mon, 14 Feb 2011) Log Message: ----------- More on feature requests #3153081 and #3031797 Modified Paths: -------------- openhpi/trunk/Makefile.am openhpi/trunk/Makefile.mingw32 openhpi/trunk/Makefile.mingw32.def openhpi/trunk/README.windows openhpi/trunk/clients/Makefile.mingw32 openhpi/trunk/clients/clients.c openhpi/trunk/clients/hpixml/Makefile.mingw32 openhpi/trunk/openhpid/Makefile.mingw32 Removed Paths: ------------- openhpi/trunk/clients/hpixml/manifest.rc openhpi/trunk/clients/manifest.rc openhpi/trunk/mingw32/app.manifest openhpi/trunk/mingw32/openhpi.windows.libraries.manifest openhpi/trunk/mingw32/openhpi.windows.plugins.manifest openhpi/trunk/mingw32/openhpid.manifest openhpi/trunk/openhpid/manifest.rc Modified: openhpi/trunk/Makefile.am =================================================================== --- openhpi/trunk/Makefile.am 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/Makefile.am 2011-02-14 21:50:26 UTC (rev 7274) @@ -47,11 +47,8 @@ README.windows \ Makefile.mingw32 \ Makefile.mingw32.def \ - mingw32/app.manifest \ mingw32/config.h \ - mingw32/openhpi.windows.libraries.manifest \ - mingw32/openhpi.windows.plugins.manifest \ - mingw32/openhpid.manifest \ + mingw32/openhpi.conf.example \ $(shell find $(srcdir)/include -name '*.h') AUTOMAKE_OPTIONS = foreign Modified: openhpi/trunk/Makefile.mingw32 =================================================================== --- openhpi/trunk/Makefile.mingw32 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/Makefile.mingw32 2011-02-14 21:50:26 UTC (rev 7274) @@ -1,11 +1,13 @@ include Makefile.mingw32.def -out := openhpi-${VERSION}-win32 -doc := ${out}/doc -libs := ${out}/openhpi.windows.libraries -devel := ${out}/devel +out := openhpi-${VERSION}-win32-${ARCH} +doc := ${out} +deps := ${out} +libs := ${out} +devel := ${out} progs := ${out} -plugins := ${out}/openhpi.windows.plugins +plugins := ${out} +conf := ${out} openhpi_libs := utils \ transport \ @@ -35,15 +37,15 @@ mkdir -p ${out} mkdir -p ${doc} cp README.windows ${doc}/README.windows.txt + mkdir -p ${deps} + cp ${GLIB_DIR}/bin/libglib-2.0-0.dll ${deps} + cp ${GLIB_DIR}/bin/libgmodule-2.0-0.dll ${deps} + cp ${GLIB_DIR}/bin/libgthread-2.0-0.dll ${deps} mkdir -p ${libs} cp transport/libopenhpitransport.dll ${libs} cp marshal/libopenhpimarshal.dll ${libs} cp utils/libopenhpiutils.dll ${libs} cp baselib/libopenhpi.dll ${libs} - cp ${GLIB_DIR}/bin/libglib-2.0-0.dll ${libs} - cp ${GLIB_DIR}/bin/libgmodule-2.0-0.dll ${libs} - cp ${GLIB_DIR}/bin/libgthread-2.0-0.dll ${libs} - cp mingw32/openhpi.windows.libraries.manifest ${libs} mkdir -p ${devel} cat include/SaHpi.h | sed -e 's/ __attribute__.*/;/' -e 's/#define SAHPI_API/#define SAHPI_API __declspec(dllimport)/' > ${devel}/SaHpi.h cp include/oHpi.h ${devel} @@ -51,12 +53,12 @@ cp utils/libopenhpiutils.def ${devel} cp baselib/libopenhpi.a ${devel} cp baselib/libopenhpi.def ${devel} - cp mingw32/app.manifest ${devel} mkdir -p ${progs} cp clients/*.exe ${progs} cp clients/hpixml/hpixml.exe ${progs} cp openhpid/openhpid.exe ${progs} mkdir -p ${plugins} cp plugins/slave/libslave.dll ${plugins} - cp mingw32/openhpi.windows.plugins.manifest ${plugins} + mkdir -p ${conf} + cp mingw32/openhpi.conf.example ${conf}/openhpi.conf Modified: openhpi/trunk/Makefile.mingw32.def =================================================================== --- openhpi/trunk/Makefile.mingw32.def 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/Makefile.mingw32.def 2011-02-14 21:50:26 UTC (rev 7274) @@ -1,3 +1,7 @@ +############################################################################ +ARCH := x86 +#ARCH := amd64 + VERSION := 2.17.0 ############################################################################ @@ -6,7 +10,6 @@ CC := ${TOOLCHAIN_PATH}/bin/i386-mingw32-gcc CXX := ${TOOLCHAIN_PATH}/bin/i386-mingw32-g++ AS := ${TOOLCHAIN_PATH}/bin/i386-mingw32-as -RC := ${TOOLCHAIN_PATH}/bin/i386-mingw32-windres GLIB_DIR := /home/avpak/usr/cross/mingw32/i386-mingw32/glib-2.0 Modified: openhpi/trunk/README.windows =================================================================== --- openhpi/trunk/README.windows 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/README.windows 2011-02-14 21:50:26 UTC (rev 7274) @@ -68,7 +68,7 @@ point to valid directories with glib headers and libraries. - Run "make -f Makefile.mingw32". - Run "make -f Makefile.mingw32 out". -- The bin sub-directory will contain all produced stuff. +- The openhpi-${VERSION}-win32 sub-directory will contain all produced stuff. - Optional step - strip produced exe and dll files. ======================================================================== @@ -141,7 +141,7 @@ The uid map file will be used for persistent resource id <-> entity path mapping. -NB: Flags -v is for verbose messages and can be omitted. +NB: -v is optional flag for verbose messages. ======================================================================== Troubleshouting: Modified: openhpi/trunk/clients/Makefile.mingw32 =================================================================== --- openhpi/trunk/clients/Makefile.mingw32 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/clients/Makefile.mingw32 2011-02-14 21:50:26 UTC (rev 7274) @@ -37,12 +37,9 @@ all : ${TARGETS} -manifest.o: manifest.rc - ${RC} -i $^ -o $@ - -%.exe : %.o clients.o manifest.o +%.exe : %.o clients.o ${CXX} -o $@ $^ ${LIBS} clean: - rm -f ${OBJS} ${TARGETS} manifest.o clients.o + rm -f ${OBJS} ${TARGETS} clients.o Modified: openhpi/trunk/clients/clients.c =================================================================== --- openhpi/trunk/clients/clients.c 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/clients/clients.c 2011-02-14 21:50:26 UTC (rev 7274) @@ -69,6 +69,20 @@ }; +#ifdef _WIN32 +/*--------------------------------------------------------------------*/ +/* Function: setenv */ +/*--------------------------------------------------------------------*/ +static int setenv(const char * var, const char * val, int overwrite) +{ + static const size_t BUFSIZE = 1024; + char buf[BUFSIZE]; + snprintf(buf, BUFSIZE, "%s=%s", var, val); + return _putenv(buf); +} +#endif /* _WIN32 */ + + void oh_prog_version(const char *prog_name, const char *svn_rev_str) { SaHpiUint32T ohpi_major = oHpiVersionGet() >> 48; Modified: openhpi/trunk/clients/hpixml/Makefile.mingw32 =================================================================== --- openhpi/trunk/clients/hpixml/Makefile.mingw32 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/clients/hpixml/Makefile.mingw32 2011-02-14 21:50:26 UTC (rev 7274) @@ -3,19 +3,19 @@ TARGET := hpixml.exe SRC := \ + ../clients.c \ hpi.cpp \ hpi_xml_writer.cpp \ schema.S \ main.cpp \ - manifest.rc \ xml_writer.cpp -OBJ := $(patsubst %.rc, %.o, $(patsubst %.S, %.o, $(patsubst %.cpp, %.o, ${SRC} ) ) ) +OBJ := $(patsubst %.S, %.o,$(patsubst %.c, %.o, $(patsubst %.cpp, %.o, ${SRC} ) ) ) DEFS := -DG_LOG_DOMAIN=\"hpixml\" -DSCHEMA=\"schema.xsd\" INCLUDES := ${GLIB_INCLUDES} -INCLUDES += -I ../../mingw32 -I ../../include -I ../../utils +INCLUDES += -I ../../mingw32 -I ../../include -I ../../utils -I ../ LIBS := ${GLIB_LIBS} LIBS += -L ../../utils -lopenhpiutils @@ -27,9 +27,6 @@ all : ${TARGET} -manifest.o: manifest.rc - ${RC} -i $^ -o $@ - ${TARGET} : ${OBJ} ${CXX} -o $@ $^ ${LIBS} Deleted: openhpi/trunk/clients/hpixml/manifest.rc =================================================================== --- openhpi/trunk/clients/hpixml/manifest.rc 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/clients/hpixml/manifest.rc 2011-02-14 21:50:26 UTC (rev 7274) @@ -1,3 +0,0 @@ -#include <winuser.h> - -CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "../../mingw32/app.manifest" Deleted: openhpi/trunk/clients/manifest.rc =================================================================== --- openhpi/trunk/clients/manifest.rc 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/clients/manifest.rc 2011-02-14 21:50:26 UTC (rev 7274) @@ -1,3 +0,0 @@ -#include <winuser.h> - -CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "../mingw32/app.manifest" Deleted: openhpi/trunk/mingw32/app.manifest =================================================================== --- openhpi/trunk/mingw32/app.manifest 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/mingw32/app.manifest 2011-02-14 21:50:26 UTC (rev 7274) @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> - <assemblyIdentity type="win32" name="openhpi.windows.app" version="2.17.0.3" processorArchitecture="x86"/> - <dependency> - <dependentAssembly> - <assemblyIdentity type="win32" name="openhpi.windows.libraries" version="2.17.0.3" processorArchitecture="x86"/> - </dependentAssembly> - </dependency> -</assembly> - Deleted: openhpi/trunk/mingw32/openhpi.windows.libraries.manifest =================================================================== --- openhpi/trunk/mingw32/openhpi.windows.libraries.manifest 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/mingw32/openhpi.windows.libraries.manifest 2011-02-14 21:50:26 UTC (rev 7274) @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> - <assemblyIdentity type="win32" name="openhpi.windows.libraries" version="2.17.0.3" processorArchitecture="x86"/> - <file name="libopenhpi.dll"/> - <file name="libopenhpimarshal.dll"/> - <file name="libopenhpitransport.dll"/> - <file name="libopenhpiutils.dll"/> - <file name="libglib-2.0-0.dll"/> - <file name="libgmodule-2.0-0.dll"/> - <file name="libgthread-2.0-0.dll"/> -</assembly> Deleted: openhpi/trunk/mingw32/openhpi.windows.plugins.manifest =================================================================== --- openhpi/trunk/mingw32/openhpi.windows.plugins.manifest 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/mingw32/openhpi.windows.plugins.manifest 2011-02-14 21:50:26 UTC (rev 7274) @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> - <assemblyIdentity type="win32" name="openhpi.windows.plugins" version="2.17.0.3" processorArchitecture="x86"/> - <file name="libslave.dll"/> -</assembly> Deleted: openhpi/trunk/mingw32/openhpid.manifest =================================================================== --- openhpi/trunk/mingw32/openhpid.manifest 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/mingw32/openhpid.manifest 2011-02-14 21:50:26 UTC (rev 7274) @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> - <assemblyIdentity type="win32" name="openhpi.windows.openhpid" version="2.17.0.3" processorArchitecture="x86"/> - <dependency> - <dependentAssembly> - <assemblyIdentity type="win32" name="openhpi.windows.libraries" version="2.17.0.3" processorArchitecture="x86"/> - </dependentAssembly> - </dependency> - <dependency> - <dependentAssembly> - <assemblyIdentity type="win32" name="openhpi.windows.plugins" version="2.17.0.3" processorArchitecture="x86"/> - </dependentAssembly> - </dependency> -</assembly> - Modified: openhpi/trunk/openhpid/Makefile.mingw32 =================================================================== --- openhpi/trunk/openhpid/Makefile.mingw32 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/openhpid/Makefile.mingw32 2011-02-14 21:50:26 UTC (rev 7274) @@ -15,10 +15,9 @@ session.c \ threaded.c \ server.cpp \ - openhpid-win32.cpp \ - manifest.rc + openhpid-win32.cpp -OBJ := $(patsubst %.rc, %.o, $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, ${SRC} ) ) ) +OBJ := $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, ${SRC} ) ) DEFS := -DG_LOG_DOMAIN=\"openhpid\" @@ -36,9 +35,6 @@ all : ${TARGET} -manifest.o: manifest.rc - ${RC} -i $^ -o $@ - ${TARGET} : ${OBJ} ${CXX} -o $@ $^ ${LIBS} Deleted: openhpi/trunk/openhpid/manifest.rc =================================================================== --- openhpi/trunk/openhpid/manifest.rc 2011-02-14 12:53:05 UTC (rev 7273) +++ openhpi/trunk/openhpid/manifest.rc 2011-02-14 21:50:26 UTC (rev 7274) @@ -1,3 +0,0 @@ -#include <winuser.h> - -CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "../mingw32/openhpid.manifest" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |