mirror of https://github.com/xqemu/xqemu.git
CI: Add Appveyor support for Windows builds
This commit is contained in:
parent
c0a6d0b285
commit
e675fc038c
|
@ -0,0 +1,38 @@
|
||||||
|
rem Matrix-driven Appveyor CI script for xqemu, borrowed from https://github.com/mypaint/libmypaint
|
||||||
|
rem Currently only does MSYS2 builds.
|
||||||
|
rem https://www.appveyor.com/docs/installed-software#mingw-msys-cygwin
|
||||||
|
rem Needs the following vars:
|
||||||
|
rem MSYS2_ARCH: x86_64 or i686
|
||||||
|
rem MSYSTEM: MINGW64 or MINGW32
|
||||||
|
|
||||||
|
rem Set the paths appropriately
|
||||||
|
PATH C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%PATH%
|
||||||
|
|
||||||
|
rem Upgrade the MSYS2 platform
|
||||||
|
bash -lc "pacman --noconfirm --sync --refresh --refresh pacman"
|
||||||
|
bash -lc "pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade"
|
||||||
|
|
||||||
|
rem Install required tools
|
||||||
|
bash -xlc "pacman --noconfirm -S --needed base-devel"
|
||||||
|
|
||||||
|
rem Install the relevant native dependencies
|
||||||
|
bash -xlc "pacman --noconfirm -S --needed git"
|
||||||
|
bash -xlc "pacman --noconfirm -S --needed python2"
|
||||||
|
bash -xlc "pacman --noconfirm -S --needed make"
|
||||||
|
bash -xlc "pacman --noconfirm -S --needed autoconf"
|
||||||
|
bash -xlc "pacman --noconfirm -S --needed automake-wrapper"
|
||||||
|
bash -xlc "pacman --noconfirm -S --needed mingw-w64-x86_64-libtool"
|
||||||
|
bash -xlc "pacman --noconfirm -S --needed mingw-w64-x86_64-pkg-config"
|
||||||
|
bash -xlc "pacman --noconfirm -S --needed mingw-w64-x86_64-glib2"
|
||||||
|
bash -xlc "pacman --noconfirm -S --needed mingw-w64-x86_64-glew"
|
||||||
|
bash -xlc "pacman --noconfirm -S --needed mingw-w64-x86_64-SDL2"
|
||||||
|
bash -xlc "pacman --noconfirm -S --needed mingw-w64-x86_64-pixman"
|
||||||
|
|
||||||
|
rem Invoke subsequent bash in the build tree
|
||||||
|
cd %APPVEYOR_BUILD_FOLDER%
|
||||||
|
set CHERE_INVOKING=yes
|
||||||
|
|
||||||
|
rem Build/test scripting
|
||||||
|
bash -xlc "set pwd"
|
||||||
|
bash -xlc "env"
|
||||||
|
bash -xlc "./build_windows.sh"
|
|
@ -0,0 +1,16 @@
|
||||||
|
environment:
|
||||||
|
matrix:
|
||||||
|
- MSYS2_ARCH: x86_64
|
||||||
|
MSYSTEM: MINGW64
|
||||||
|
# - MSYS2_ARCH: i686
|
||||||
|
# MSYSTEM: MINGW32
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- '%APPVEYOR_BUILD_FOLDER%\appveyor.bat'
|
||||||
|
|
||||||
|
deploy: off
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
- path: dist
|
||||||
|
name: xqemu
|
||||||
|
type: zip
|
|
@ -0,0 +1,40 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
"""
|
||||||
|
This script is used to collect all available DLLs
|
||||||
|
"""
|
||||||
|
from __future__ import print_function
|
||||||
|
import os
|
||||||
|
import os.path
|
||||||
|
import platform
|
||||||
|
import subprocess
|
||||||
|
import shutil
|
||||||
|
import sys
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
def main():
|
||||||
|
ap = argparse.ArgumentParser()
|
||||||
|
ap.add_argument('prog')
|
||||||
|
ap.add_argument('dest')
|
||||||
|
args = ap.parse_args()
|
||||||
|
|
||||||
|
if not os.path.exists(args.dest):
|
||||||
|
os.mkdir(args.dest)
|
||||||
|
elif not os.path.isdir(args.dest):
|
||||||
|
print('File exists with destination name')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
sout = subprocess.check_output(['ldd', args.prog])
|
||||||
|
for line in sout.splitlines():
|
||||||
|
line = line.strip().split()
|
||||||
|
dll_name, dll_path, dll_load_addr = line[0], line[2], line[3]
|
||||||
|
if dll_name.startswith('???'):
|
||||||
|
print('Unknown DLL?')
|
||||||
|
continue
|
||||||
|
if dll_path.lower().startswith('/c/windows') or dll_path.lower().startswith('c:/windows'):
|
||||||
|
print('Skipping system DLL %s' % dll_path)
|
||||||
|
continue
|
||||||
|
print('Copying %s...' % dll_path)
|
||||||
|
shutil.copyfile(dll_path, os.path.join(args.dest, dll_name))
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
Loading…
Reference in New Issue