Skip to content

Commit d494219

Browse files
author
cloned-doy
committed
build for multimachines
1 parent 33d636b commit d494219

14 files changed

+109
-45
lines changed

.gitignore

+9-8
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ __init__.py
1616

1717
# excluding build *.h files
1818
whatsfly/__init__.pyc
19+
whatsfly/dependencies/libwapp.so
1920
whatsfly/dependencies/wapp.db
20-
whatsfly/dependencies/whatsmeow-linux-386.h
21-
whatsfly/dependencies/whatsmeow-linux-686.h
22-
whatsfly/dependencies/whatsmeow-linux-amd64.h
23-
whatsfly/dependencies/whatsmeow-linux-arm64.h
24-
whatsfly/dependencies/whatsmeow-windows-32.h
25-
whatsfly/dependencies/whatsmeow-windows-64.h
26-
whatsfly/dependencies/whatsmeow-darwin-amd64.h
27-
whatsfly/dependencies/whatsmeow-darwin-arm64.h
21+
whatsfly/dependencies/whatsmeow/whatsmeow-linux-386.h
22+
whatsfly/dependencies/whatsmeow/whatsmeow-linux-686.h
23+
whatsfly/dependencies/whatsmeow/whatsmeow-linux-amd64.h
24+
whatsfly/dependencies/whatsmeow/whatsmeow-linux-arm64.h
25+
whatsfly/dependencies/whatsmeow/whatsmeow-windows-32.h
26+
whatsfly/dependencies/whatsmeow/whatsmeow-windows-64.h
27+
whatsfly/dependencies/whatsmeow/whatsmeow-darwin-amd64.h
28+
whatsfly/dependencies/whatsmeow/whatsmeow-darwin-arm64.h

MANIFEST.in

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include whatsfly/dependencies/whatsmeow/*.so
2+
include whatsfly/dependencies/whatsmeow/*.dll

setup.py

+8-16
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
#!/usr/bin/env python
2-
from setuptools import setup, find_packages, Extension
2+
from setuptools import setup, find_packages
3+
# , Extension
34
from codecs import open
4-
import glob
5-
import os
6-
7-
data_files = []
8-
directories = glob.glob('whatsfly/dependencies/')
9-
for directory in directories:
10-
files = glob.glob(directory+'*')
11-
data_files.append(('whatsfly/dependencies', files))
5+
# import glob
6+
# import os
127

138
setup(
149
name='whatsfly',
@@ -18,17 +13,14 @@
1813
author_email='[email protected]',
1914
url='https://github.com/cloned-doy/whatsfly',
2015
keywords='whatsfly',
21-
install_requires=[
22-
'requests',
23-
],
16+
# install_requires=[
17+
# 'requests',
18+
# ],
2419
description="WhatsApp on the fly.",
2520
long_description=open("README.md", encoding="utf-8").read(),
2621
long_description_content_type="text/markdown",
2722
packages=find_packages(),
2823
include_package_data=True,
29-
package_data={
30-
'': ['*'],
31-
},
3224
classifiers=[
3325
"Environment :: Web Environment",
3426
"Intended Audience :: Developers",
@@ -38,7 +30,7 @@
3830
"Operating System :: Microsoft :: Windows",
3931
"Programming Language :: Python",
4032
"Programming Language :: Python :: 3",
41-
"Topic :: Internet :: WWW/HTTP",
33+
"Topic :: WhatsApp :: WhatsApp Library",
4234
"Topic :: Software Development :: Libraries",
4335
]
4436
)

whatsfly/dependencies/build.sh

+9-16
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,26 @@
11
#!/bin/sh
22

3-
# This build.sh file was borrowed from https://github.com/bogdanfinn/tls-client/blob/master/cffi_dist/build.sh
4-
5-
# """
3+
# This build.sh file was borrowed from https://github.com/bogdanfinn/tls-client/blob/master/cffi_whatsmeow/build.sh
64
# make sure you have installed all build tools on your machine
7-
# """
85

96
# echo 'Build OSX'
10-
# GOOS=darwin GOARCH=arm64 go build -o ./dist/whatsmeow-darwin-arm64.dylib -buildmode=c-shared main.go
11-
# GOOS=darwin GOARCH=amd64 go build -buildmode=c-shared -o ./dist/whatsmeow-darwin-amd64.dylib main.go
12-
13-
# rm -rf ~/.cache/go-build
7+
# GOOS=darwin GOARCH=arm64 go build -o ./whatsmeow/whatsmeow-darwin-arm64.dylib -buildmode=c-shared main.go
8+
# GOOS=darwin GOARCH=amd64 go build -buildmode=c-shared -o ./whatsmeow/whatsmeow-darwin-amd64.dylib main.go
149

1510
echo 'Build for Linux Ubuntu'
16-
GOOS=linux CGO_ENABLED=1 GOARCH=amd64 go build -buildmode=c-shared -ldflags=-s -o ./dist/whatsmeow-linux-amd64.so main.go
11+
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -buildmode=c-shared -ldflags=-s -o ./whatsmeow/whatsmeow-linux-amd64.so main.go
1712

1813
# echo 'Build Linux ARM64'
19-
# GOOS=linux CGO_ENABLED=1 GOARCH=arm64 go build -buildmode=c-shared -ldflags=-s -o ./dist/whatsmeow-linux-arm64.so main.go
14+
# GOOS=linux GOARCH=arm64 CGO_ENABLED=1 go build -buildmode=c-shared -ldflags=-s -o ./whatsmeow/whatsmeow-linux-arm64.so main.go
2015

2116
echo 'Build for Linux 686'
22-
GOOS=linux CGO_ENABLED=1 GOARCH=386 go build -buildmode=c-shared -o ./dist/whatsmeow-linux-686.so main.go
17+
GOOS=linux GOARCH=386 CGO_ENABLED=1 go build -buildmode=c-shared -o ./whatsmeow/whatsmeow-linux-686.so main.go
2318

2419
echo 'Build for Linux 386'
25-
GOOS=linux CGO_ENABLED=1 GOARCH=386 go build -buildmode=c-shared -o ./dist/whatsmeow-linux-386.so main.go
26-
27-
rm -rf ~/.cache/go-build
20+
GOOS=linux GOARCH=386 CGO_ENABLED=1 go build -buildmode=c-shared -o ./whatsmeow/whatsmeow-linux-386.so main.go
2821

2922
echo 'Build for Windows 32 Bit'
30-
GOOS=windows GOARCH=386 CGO_ENABLED=1 CC=i686-w64-mingw32-gcc go build -buildmode=c-shared -o ./dist/whatsmeow-windows-32.dll main.go
23+
GOOS=windows GOARCH=386 CGO_ENABLED=1 CC=i686-w64-mingw32-gcc go build -buildmode=c-shared -o ./whatsmeow/whatsmeow-windows-32.dll main.go
3124

3225
echo 'Build for Windows amd64 Bit'
33-
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc go build -buildmode=c-shared -o ./dist/whatsmeow-windows-64.dll main.go
26+
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc go build -buildmode=c-shared -o ./whatsmeow/whatsmeow-windows-64.dll main.go

whatsfly/dependencies/go.mod

+19
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,28 @@ require (
1111

1212
require (
1313
filippo.io/edwards25519 v1.0.0 // indirect
14+
github.com/dustin/go-humanize v1.0.0 // indirect
1415
github.com/google/go-cmp v0.5.9 // indirect
16+
github.com/google/uuid v1.3.0 // indirect
1517
github.com/gorilla/websocket v1.5.0 // indirect
18+
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
19+
github.com/mattn/go-isatty v0.0.16 // indirect
20+
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
1621
go.mau.fi/libsignal v0.1.0 // indirect
1722
golang.org/x/crypto v0.5.0 // indirect
23+
golang.org/x/mod v0.3.0 // indirect
24+
golang.org/x/sys v0.4.0 // indirect
25+
golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78 // indirect
26+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
27+
lukechampine.com/uint128 v1.2.0 // indirect
28+
modernc.org/cc/v3 v3.40.0 // indirect
29+
modernc.org/ccgo/v3 v3.16.13 // indirect
30+
modernc.org/libc v1.22.3 // indirect
31+
modernc.org/mathutil v1.5.0 // indirect
32+
modernc.org/memory v1.5.0 // indirect
33+
modernc.org/opt v0.1.3 // indirect
34+
modernc.org/sqlite v1.21.0 // indirect
35+
modernc.org/strutil v1.1.3 // indirect
36+
modernc.org/token v1.0.1 // indirect
1837
rsc.io/qr v0.2.0 // indirect
1938
)

whatsfly/dependencies/go.sum

+58
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,86 @@
11
filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek=
22
filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=
3+
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
4+
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
35
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
46
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
57
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
68
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
9+
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
10+
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
711
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
812
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
13+
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
14+
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
915
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
1016
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
17+
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
18+
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
1119
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
1220
github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
1321
github.com/mdp/qrterminal v1.0.1/go.mod h1:Z33WhxQe9B6CdW37HaVqcRKzP+kByF3q/qLxOGe12xQ=
1422
github.com/mdp/qrterminal/v3 v3.0.0 h1:ywQqLRBXWTktytQNDKFjhAvoGkLVN3J2tAFZ0kMd9xQ=
1523
github.com/mdp/qrterminal/v3 v3.0.0/go.mod h1:NJpfAs7OAm77Dy8EkWrtE4aq+cE6McoLXlBqXQEwvE0=
24+
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
25+
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
26+
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
27+
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
1628
go.mau.fi/libsignal v0.1.0 h1:vAKI/nJ5tMhdzke4cTK1fb0idJzz1JuEIpmjprueC+c=
1729
go.mau.fi/libsignal v0.1.0/go.mod h1:R8ovrTezxtUNzCQE5PH30StOQWWeBskBsWE55vMfY9I=
1830
go.mau.fi/whatsmeow v0.0.0-20230226124255-e5c8f3c95d78 h1:HXq3VXJhSL/S6kZkrCYMUhCELinVrfpPhDFpklZvHnA=
1931
go.mau.fi/whatsmeow v0.0.0-20230226124255-e5c8f3c95d78/go.mod h1:zoTtv1CupGEyTew7TOwnBmTbHB4pVad2OzjTf5CVwa0=
32+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
33+
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
34+
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
2035
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
2136
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
37+
golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
38+
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
39+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
40+
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
41+
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
42+
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
43+
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
44+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
2245
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
46+
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
47+
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
48+
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
49+
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
50+
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
51+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
52+
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
53+
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
54+
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
55+
golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78 h1:M8tBwCtWD/cZV9DZpFYRUgaymAYAr+aIUTWzDaM3uPs=
56+
golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
57+
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
58+
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
2359
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
60+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
61+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
2462
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
2563
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
2664
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
65+
lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
66+
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
67+
modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw=
68+
modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0=
69+
modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw=
70+
modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY=
71+
modernc.org/libc v1.22.3 h1:D/g6O5ftAfavceqlLOFwaZuA5KYafKwmr30A6iSqoyY=
72+
modernc.org/libc v1.22.3/go.mod h1:MQrloYP209xa2zHome2a8HLiLm6k0UT8CoHpV74tOFw=
73+
modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ=
74+
modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
75+
modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds=
76+
modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU=
77+
modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
78+
modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
79+
modernc.org/sqlite v1.21.0 h1:4aP4MdUf15i3R3M2mx6Q90WHKz3nZLoz96zlB6tNdow=
80+
modernc.org/sqlite v1.21.0/go.mod h1:XwQ0wZPIh1iKb5mkvCJ3szzbhk+tykC8ZWqTRTgYRwI=
81+
modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY=
82+
modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw=
83+
modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg=
84+
modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
2785
rsc.io/qr v0.2.0 h1:6vBLea5/NRMVTz8V66gipeLycZMl/+UlFmk8DvqQ6WY=
2886
rsc.io/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs=

whatsfly/dependencies/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"go.mau.fi/whatsmeow/types"
1717
waLog "go.mau.fi/whatsmeow/util/log"
1818
"google.golang.org/protobuf/proto"
19-
// _ "modernc.org/sqlite"
19+
_ "modernc.org/sqlite"
2020
// sqlite3 "github.com/mattn/go-sqlite3"
2121

2222
)
@@ -36,7 +36,7 @@ func Connect() {
3636
}
3737

3838
// Connect to the database
39-
container, err := sqlstore.New("sqlite3", "file:"+dbPath+"?_foreign_keys=on", waLog.Noop)
39+
container, err := sqlstore.New("sqlite", "file:"+dbPath+"?_foreign_keys=on", waLog.Noop)
4040
if err != nil {
4141
panic(err)
4242
}
-10.5 MB
Binary file not shown.

whatsfly/whatsmeow.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@
2525
file_ext = '-linux-amd64.so'
2626

2727
root_dir = os.path.abspath(os.path.dirname(__file__))
28-
lib = ctypes.CDLL(f'{root_dir}/dependencies/whatsmeow{file_ext}')
28+
lib = ctypes.cdll.LoadLibrary(f'{root_dir}/dependencies/whatsmeow/whatsmeow{file_ext}')
2929

30-
# Define the Connect function
30+
# Define the Connect() and SendMessage() functions
3131
ClientConnect = lib.Connect
3232
ClientConnect.argtypes = []
3333
ClientConnect.restype = None
3434

35-
# Define the argument and return types of the SendMessage function
3635
SendMessage = lib.SendMessage
3736
SendMessage.argtypes = [ctypes.c_char_p, ctypes.c_char_p]
3837
SendMessage.restype = ctypes.c_int

0 commit comments

Comments
 (0)