Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builds for android, ios, windows, linux, etc #5

Closed
isopen opened this issue Jan 7, 2018 · 14 comments
Closed

Builds for android, ios, windows, linux, etc #5

isopen opened this issue Jan 7, 2018 · 14 comments
Labels

Comments

@isopen
Copy link
Contributor

isopen commented Jan 7, 2018

Very cool work!

But...I do not have time to build a library through cmake and view the required dependencies(i'am sorry).
The documentation is good, but there are few practical examples of applying methods and necessary chains of methods. There are a lot of methods.

I have a few questions

  • Where there are ready assemblies for android, ios, windows, linux, etc?
    Will there be documentation in each pre-assembly? What for? (long unpacking)
    I managed to find a pre-build only for android. It is not known how relevant this is. You can render the documentation in a separate section for each pre-assembly (if there is an additional interface used, such as Java).
  • Python, C++ and C# the last languages where I would like to use tdlib(i'am sorry).
    How does this thing behave with javascript and is it possible? (I want an interface;))
    https://nodejs.org/api/addons.html may be for json interface, but need example.
  • Is there a test environment where can test the build?
@isopen isopen changed the title assemblies for android, ios, windows, linux, etc Assemblies for android, ios, windows, linux, etc Jan 7, 2018
@isopen isopen changed the title Assemblies for android, ios, windows, linux, etc Builds for android, ios, windows, linux, etc Jan 7, 2018
@levlam
Copy link
Contributor

levlam commented Jan 7, 2018

  1. The library has a minimum number of dependencies and supposed to be easily built on any of the supported architectures. There are too many supported operating systems, platforms and compilers to prebuilt all usable variants. We provide for now only prebuilt shared library for Android with corresponding Java interface, which is documented via Javadoc, because it is slightly harder to build the library for Java and Android.

  2. TDLib can be used virtually from any modern programming language including Javascript. Moreover TDLib JSON interface can be treated as a native interface for Javascript. For Node.JS the usage of library is mostly the same as from Python: you just need to load tdjson shared library. To use TDLib in browsers you need to compile it using Emscripten compiler. It is harder to use TDLib from browsers because of sandboxing, so we will publish our browser Javascript wrapper later.

  3. What do you mean by "where can test the build"?

@isopen
Copy link
Contributor Author

isopen commented Jan 7, 2018

Suppose we have built an application using tdlib.
Then it is necessary to check the correctness of displaying information in the lists and other interface elements.
I think this is allowed by a "mega-bot" on a specific phone number in one of the data centers. But here I can be wrong. I do not know the architecture on the backend. In one of the competitions on tdlib there was something like this. "It looks like it's gone".
Now testing applications with such a crazy speed is unrealistic on the bare channel.
I would like it to come to life :)

@k-egor-smirnov
Copy link

You can use my lib on node js https://github.com/k-egor-smirnov/node-tg-native

@levlam
Copy link
Contributor

levlam commented Jan 7, 2018

Sorry, but there is no such mega-bot. It was a usual user account and it is now unavailable, because someone has tested deletion of all chats. You can test everything using self-created accounts in the test DC.

@isopen
Copy link
Contributor Author

isopen commented Jan 7, 2018

Alexey, I would say, at the moment there are too many problems for the average user of the library.
It is completely unclear what for it is needed without a backend (if only for the soul).

@k-egor-smirnov thanks, but that's not what I need 👍
node -v
v8.9.1

But I think, if you send this thing to the heart of all sorts of angular, reactjs, it can make it easier for people to organize their communication systems. The truth is that the infa will be in the cloud somewhere.(there is a need for a cloud-based message viewer and other features)
A little humor :) "Scientists have created a preporat, which allows you to lose weight without dieting"
But the implementation of the interface will still be difficult. Too many features..

Thanks for the tips
The library code is cool!
Regards

@k-egor-smirnov
Copy link

k-egor-smirnov commented Jan 7, 2018

@isopen i took an mistake when wrote that my module is incompatible with node.js >=7. You can run module with node.js < 9
due the bug in ffi module node-ffi/node-ffi#439

@levlam levlam added the question label Jan 7, 2018
@isopen
Copy link
Contributor Author

isopen commented Jan 7, 2018

@k-egor-smirnov
"ffi" module doesn't compile on node <= 9 (see node-ffi/node-ffi#439)
node -v
v8.9.1
I'll try a little later :)

@isopen
Copy link
Contributor Author

isopen commented Jan 8, 2018

@k-egor-smirnov tried :)

I do not know where to write this. I'll leave it here.)

My OpenSSL 1.1.0f 25 May 2017

nodejs index.js

fs.js:646
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT: no such file or directory, open 'libssl.so.1.0.0'
    at Object.fs.openSync (fs.js:646:18)
    at fs.readFileSync (fs.js:551:33)
    at new DynamicLibrary (/home/mrmakss/prog/tdlib/npm/node_modules/ffi/lib/dynamic_library.js:67:21)
    at Object.Library (/home/mrmakss/prog/tdlib/npm/node_modules/ffi/lib/library.js:45:12)
    at Object.<anonymous> (/home/mrmakss/prog/tdlib/npm/node_modules/node-tg-native/lib/TD.js:15:19)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)

Then the next bike starts, which I will not do ;)

@k-egor-smirnov
Copy link

@isopen Can you open issue in my repository with information about your system and close this thread?

@isopen
Copy link
Contributor Author

isopen commented Jan 8, 2018

@k-egor-smirnov More information about the system can be found on this site.
https://www.debian.org/index.en.html

There is probably not even a problem in the system. Just asks tsl1.0.0
By the way trying to solve this problem, I lost one virtual machine.
In a certain year there were disturbing news about version 1.0.0

You can add this yourself to your repository and ask @levlam about when this report will be closed.

@seiya-git
Copy link

@isopen https://github.com/nodegin/tglib is working with latest node version.

@isopen
Copy link
Contributor Author

isopen commented Mar 15, 2018

@seiya-git Thanks. But that's not what I need.
Too much dependence on third-party module ffi-napi.
If @levlam will include your source code in the examples, then I will take great pleasure in using it.

@UnblockerUsername
Copy link

UnblockerUsername commented May 18, 2018

So back to this report. He alone can replace everything.
@levlam of all this is really lacking and no one seems to want to really help, except @isopen
What is the use of these gross interfaces on top, if there is no implementation for javascript.

@isopen isopen reopened this Sep 20, 2019
@isopen
Copy link
Contributor Author

isopen commented Sep 29, 2019

@levlam In which patch can I build it myself for android? According to instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants