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

Windows - staticly compiled TZ database #776

Open
Kaaml opened this issue Feb 25, 2023 · 3 comments
Open

Windows - staticly compiled TZ database #776

Kaaml opened this issue Feb 25, 2023 · 3 comments

Comments

@Kaaml
Copy link

Kaaml commented Feb 25, 2023

Hi,

Is there option to staticly compile IANA Timezones database in file? I don't want any additional files then executable to realase my program.

I don't see such option after studying source code, but maybe I'm missed something.

@HowardHinnant
Copy link
Owner

You are correct. There is currently no option to compile the IANA database into your own executable. The rationale to-date for this is that your executable would be obsolete within a matter of months as the IANA database is updated several times a year.

I am toying with a design that would put the IANA database into a run-time-loadable dynamic library which would be accessed via the existing API. It would be loaded automatically on use. And one could choose to install a new DLL and switch to it while your application is running.

This development is in very early stages, and may never become shippable. But I am curious if you believe such a solution might be something that could be used in your application.

@Kaaml
Copy link
Author

Kaaml commented Feb 25, 2023

@HowardHinnant

The idea with DLL sounds great this will be usable for me, but staticly linked will be the best option for me to avoid dependency from one DLL to another with timezone databasse. I realize, that staticly linked data can't be changed, but in my case this is only pros.

Does Windows provide such information? I'm not familar with Windows API, so this is only idea, how to get those data.

Another option is IMHO to use static linked libraries for 7z and curl to avoid dependencies from Windows environment.

Yeah, I know is lots of proposals, but undependency from environmet tools should be most desirable feature of library, so there is my vote 👍

PS If you have any idea, let me know, maybe I will find some time to help you with it.

@HowardHinnant
Copy link
Owner

If I do this, it will ship as C++ source files with instructions on how to compile it to a dynamic library. You could simply disobey those instructions and compile it to a static library. :-)

Unfortunately this is still very preliminary, so it doesn't solve your current problem.

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

No branches or pull requests

2 participants