x64 support
This commit is contained in:
parent
e87888b7c5
commit
84342e99e5
@ -2,9 +2,9 @@ The MIT License (MIT)
|
||||
|
||||
RaspberryJamMod Copyright (c) 2015 Alexander R. Pruss
|
||||
Lua Copyright (c) 1994–2015 Lua.org, PUC-Rio.
|
||||
luasocket Copyright (c) Diego Nehab
|
||||
tools.lua adapted from lua-websockets Copyright (c) 2012 Gerhard Lipp
|
||||
base64.lua Copyright (c) 2014 Mark Rogaski and (C) 2012 Paul Moore (changed to MIME encoding)
|
||||
luasocket Copyright (c) Diego Nehab (with socket.lua changed by ARP to load x64/x86 as needed)
|
||||
tools.lua adapted from lua-websockets Copyright (c) 2012 Gerhard Lipp (with base64 inactivated)
|
||||
base64.lua Copyright (c) 2014 Mark Rogaski and (C) 2012 Paul Moore (changed by ARP to MIME encoding)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -10,7 +10,12 @@
|
||||
local base = _G
|
||||
local string = require("string")
|
||||
local math = require("math")
|
||||
local socket = require("socket.core")
|
||||
local socket
|
||||
local status,err = pcall(function() socket = require("socket.core") end)
|
||||
if not status then
|
||||
socket = require("socket.cx64")
|
||||
end
|
||||
|
||||
module("socket")
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
BIN
raspberryjammod/socket/core-x64.dll
Executable file
BIN
raspberryjammod/socket/core-x64.dll
Executable file
Binary file not shown.
BIN
raspberryjammod/socket/cx64.dll
Executable file
BIN
raspberryjammod/socket/cx64.dll
Executable file
Binary file not shown.
14
raspberryjammod/socket/patch-x64.lua
Normal file
14
raspberryjammod/socket/patch-x64.lua
Normal file
@ -0,0 +1,14 @@
|
||||
--
|
||||
-- core-x64.dll is compiled with msvc 12, without any changes to the luasockets
|
||||
-- source. Unfortunately, this forces it to be named core.dll, which doesn't work
|
||||
-- well with what I did to socket.lua to make it load the x64 version as needed.
|
||||
-- So we patch it.
|
||||
--
|
||||
|
||||
local f = assert(io.open("core-x64.dll", "rb"))
|
||||
local data = f:read("*all")
|
||||
f:close()
|
||||
data = data:gsub("luaopen_socket_core", "luaopen_socket_cx64")
|
||||
local f = assert(io.open("cx64.dll", "wb"))
|
||||
f:write(data)
|
||||
f:close()
|
@ -189,9 +189,9 @@ end
|
||||
|
||||
return {
|
||||
sha1 = sha1_crypto or sha1_wiki,
|
||||
base64 = {
|
||||
encode = base64_encode
|
||||
},
|
||||
-- base64 = {
|
||||
-- encode = base64_encode
|
||||
-- },
|
||||
parse_url = parse_url,
|
||||
generate_key = generate_key,
|
||||
read_int8 = read_int8,
|
||||
|
Loading…
x
Reference in New Issue
Block a user