Created
April 30, 2015 13:53
-
-
Save i-namekawa/0d5779e88038727ac52a to your computer and use it in GitHub Desktop.
script to copy Geany header etc to C:/libs on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import glob, os, shutil | |
VERSION = '1.25' | |
DEST = r'C:/libs' | |
# header files | |
shutil.rmtree(r'%s\include\geany' % DEST, ignore_errors=True) | |
shutil.copytree(r'geany-%s\include\geany' % VERSION, r'%s\include\geany' % DEST) | |
# geany-0.dll | |
dlls = glob.glob(r'geany-%s\bin\geany*.dll' % VERSION) | |
for filename in dlls: | |
# copy it to lib\ instead bin\ so the lookup works | |
# rename the file to geany.dll, as the linker uses '-lgeany' | |
# this loop will overwrite previously copied files if there is more | |
# one geany*.dll in the source directory, this should not happen | |
shutil.copy(filename, r'%s\lib\geany.dll' % DEST) | |
# geany.pc | |
shutil.copy(r'geany-%s\lib\pkgconfig\geany.pc' % VERSION, r'%s\lib\pkgconfig' % DEST) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment