]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/deploy/libraries/windows/windows.factor
alien.libraries: add a "deploy-library" word that marks a library to have its dll...
[factor.git] / basis / tools / deploy / libraries / windows / windows.factor
1 ! (c)2010 Joe Groff bsd license
2 USING: alien.strings byte-arrays io.encodings.utf16n kernel
3 specialized-arrays system tools.deploy.libraries windows.kernel32
4 windows.types ;
5 FROM: alien.c-types => ushort ;
6 SPECIALIZED-ARRAY: ushort
7 IN: tools.deploy.libraries.windows
8
9 M: windows find-library-file
10     f DONT_RESOLVE_DLL_REFERENCES LoadLibraryEx [
11         [
12             32768 (ushort-array) [ 32768 GetModuleFileName drop ] keep
13             utf16n alien>string
14         ] [ FreeLibrary drop ] bi
15     ] [ f ] if* ;
16