hxssl icon indicating copy to clipboard operation
hxssl copied to clipboard

Mobile builds

Open soywiz opened this issue 8 years ago • 1 comments

I have created a library for handling websockets: https://github.com/soywiz/haxe-ws

And I am using hxssl for secure websockets in sys platforms. But it happens that it is not including Android/iOS builds.

Is there any reason for that? May I help with this?

soywiz avatar Mar 08 '16 17:03 soywiz

  1. 1)openssl\project\tars\openssl-1.0.2e.tar.gz 解压到 openssl\project\unpack\openssl-1.0.2e 2)openssl\tools\Build.hx

    //run("tar", [ inBZ ? "xf" : "xzf", "tars/" + inTar, "--no-same-owner", "-C", baseDir ]); //if (inCheckDir!="") // File.saveContent(inCheckDir+"/.extracted","extracted");

    3)修改src\build.xml a)

            <lib name="-lssl"  />
  <lib name="-lcrypto"   />
	改成
	<lib name="../openssl/lib/Android/libopenssl${LIBSUFFIX}.a" if="android"/>
b)
<target id="hxssl.ndll" ...> 改成:
	<set name="DEBUGEXTRA" value="-debug" if="fulldebug" />

	<set name="DEBUGEXTRA" value="-debug" if="debug" />


	<set name="LIBSUFFIX" value="${HX_TARGET_SUFFIX}" if="HX_TARGET_SUFFIX" />

	<set name="LIBSUFFIX" value="${LIBEXTRA}" unless="LIBSUFFIX" />



	<target id="hxssl" tool="linker" toolid="dll" output="${LIBPREFIX}hxssl${DEBUGEXTRA}${LIBSUFFIX}">
c)  <target id="default">
	
	<target id="hxssl.ndll"/>

    </target>
改成:
    <target id="default">

	<target id="hxssl"/>

    </target>

cd openssl/tools; haxe compile.hxml

cd openssl/project; neko build.n android -v

cd src haxelib run hxcpp build.xml clean haxelib run hxcpp build.xml -Dandroid -DHXCPP_ARMV7 haxelib run hxcpp build.xml -Dandroid

hpgood avatar Dec 08 '16 06:12 hpgood