parent
e46c1743ce
commit
d0d2508562
6 changed files with 71 additions and 9 deletions
@ -0,0 +1,32 @@ |
|||||||
|
#!/usr/bin/env python3 |
||||||
|
|
||||||
|
import os, urllib.request, shutil, subprocess |
||||||
|
from glob import glob |
||||||
|
|
||||||
|
sdl_url = 'http://libsdl.org/release/SDL2-devel-2.0.3-VC.zip' |
||||||
|
sdl_filename = 'SDL2-devel-2.0.3-VC.zip' |
||||||
|
sdl_dir = 'SDL2-2.0.3' |
||||||
|
|
||||||
|
shutil.rmtree('build', ignore_errors=True) |
||||||
|
os.mkdir('build') |
||||||
|
|
||||||
|
if not os.path.exists(sdl_filename): |
||||||
|
response = urllib.request.urlopen(sdl_url) |
||||||
|
data = response.read() |
||||||
|
open(sdl_filename, 'wb').write(data) |
||||||
|
|
||||||
|
shutil.unpack_archive(sdl_filename, 'build') |
||||||
|
|
||||||
|
libs = glob(os.path.join('build', sdl_dir, 'lib/x86/*')) |
||||||
|
[shutil.copy(x, 'build') for x in libs] |
||||||
|
|
||||||
|
# Sorry for this hack but this needs to work during development |
||||||
|
# when Meson is not in path. |
||||||
|
subprocess.check_call(['python3', r'..\..\meson.py', 'build', |
||||||
|
'--backend=ninja', '--buildtype=release']) |
||||||
|
subprocess.check_call(['ninja'], cwd='build') |
||||||
|
shutil.copy('myapp.iss', 'build') |
||||||
|
subprocess.check_call([r'\Program Files\Inno Setup 5\ISCC.exe', 'myapp.iss'], |
||||||
|
cwd = 'build') |
||||||
|
shutil.copy('build/setup.exe', 'myapp 1.0.exe') |
||||||
|
shutil.rmtree('build') |
@ -0,0 +1,18 @@ |
|||||||
|
; Innosetup file for My app. |
||||||
|
|
||||||
|
[Setup] |
||||||
|
AppName=My App |
||||||
|
AppVersion=1.0 |
||||||
|
DefaultDirName={pf}\My App |
||||||
|
DefaultGroupName=My App |
||||||
|
UninstallDisplayIcon={app}\myapp.exe |
||||||
|
Compression=lzma2 |
||||||
|
SolidCompression=yes |
||||||
|
OutputDir=. |
||||||
|
|
||||||
|
[Files] |
||||||
|
Source: "myapp.exe"; DestDir: "{app}" |
||||||
|
Source: "SDL2.dll"; DestDir: "{app}" |
||||||
|
|
||||||
|
;[Icons] |
||||||
|
;Name: "{group}\My App"; Filename: "{app}\myapp.exe" |
@ -1,12 +1,12 @@ |
|||||||
This directory shows how you can build redistributable binaries. On |
This directory shows how you can build redistributable binaries. On |
||||||
OSX this menans building an app bundle and a .dmg installer. On Linux |
OSX this menans building an app bundle and a .dmg installer. On Linux |
||||||
it means building a binary that bundles its dependencies. On Windows |
it means building a binary that bundles its dependencies. On Windows |
||||||
it means probably building an .exe installer or something (not done |
it means building an .exe installer. |
||||||
yet). |
|
||||||
|
|
||||||
To build each package you run the corresponding build_ARCH.sh build script. |
To build each package you run the corresponding build_ARCH.sh build |
||||||
|
script. |
||||||
|
|
||||||
On Linux you must build the package on the oldest distribution you |
On Linux you must build the package on the oldest distribution you |
||||||
plan to support (Debian stable/oldstable and old CentOS are usually |
plan to support (Debian stable/oldstable and old CentOS are the common |
||||||
the choice here). |
choice here). |
||||||
|
|
||||||
|
Loading…
Reference in new issue