From b8b7b96a1c933fc5232178e924ef387aee855db2 Mon Sep 17 00:00:00 2001 From: Andrew Tonner Date: Sun, 22 Jan 2017 19:39:16 -0800 Subject: [PATCH 1/3] put build tools first in the path rather than last --- SheepShaver/src/Windows/build_on_msys.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SheepShaver/src/Windows/build_on_msys.py b/SheepShaver/src/Windows/build_on_msys.py index de343777..19ca81c0 100644 --- a/SheepShaver/src/Windows/build_on_msys.py +++ b/SheepShaver/src/Windows/build_on_msys.py @@ -114,9 +114,14 @@ def extract_zip(zip_filename, target_dir): def env_augmented_with_paths(*path_dirs_to_add): env_copy = dict(os.environ) path_dirs = env_copy["PATH"].split(os.pathsep) + + paths_adding = [] for d in path_dirs_to_add: if d not in path_dirs: - path_dirs.append(d) + paths_adding.append(d) + + path_dirs = paths_adding + path_dirs + env_copy["PATH"] = os.pathsep.join(path_dirs) return env_copy From fcfa19ca27f0599f66d48a7553ec0efb00135919 Mon Sep 17 00:00:00 2001 From: Andrew Tonner Date: Sun, 22 Jan 2017 21:08:55 -0800 Subject: [PATCH 2/3] python build scripts: URLs cleanup --- SheepShaver/src/Windows/build_on_msys.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SheepShaver/src/Windows/build_on_msys.py b/SheepShaver/src/Windows/build_on_msys.py index 19ca81c0..ad65a3a5 100644 --- a/SheepShaver/src/Windows/build_on_msys.py +++ b/SheepShaver/src/Windows/build_on_msys.py @@ -20,6 +20,10 @@ import shutil MACEMU_CFLAGS = "-mwin32" MACEMU_CXXFLAGS = "-mwin32 -std=gnu++11" +MINGW_GET_URL = "https://downloads.sourceforge.net/project/mingw/Installer/mingw-get/" \ + "mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" +SDL_ZIP_URL = "http://www.libsdl.org/release/SDL-1.2.15.zip" + script_path = os.path.dirname(os.path.abspath(__file__)) @@ -155,8 +159,7 @@ def install(make_args, show_build_environment, use_precompiled_dyngen, build_jit # get msys / mingw tools we need to build - mingw_get_zip = download("https://downloads.sourceforge.net/project/mingw/Installer/mingw-get/" - "mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip") + mingw_get_zip = download(MINGW_GET_URL) mingw_get_dir = MINGW_EXTRACT_PATH extract_zip(mingw_get_zip, mingw_get_dir) @@ -196,7 +199,7 @@ def install(make_args, show_build_environment, use_precompiled_dyngen, build_jit # build SDL - sdl_zip_filename = download("http://www.libsdl.org/release/SDL-1.2.15.zip") + sdl_zip_filename = download(SDL_ZIP_URL) sdl_dir = os.path.join(get_download_dir(), "SDL-1.2.15") with dep_tracker.rebuilding_if_needed("sdl_extract_zip", sdl_zip_filename) as needs_rebuild: if needs_rebuild: From 519276d788de225d2636e3b3ce29be998f1a6eb8 Mon Sep 17 00:00:00 2001 From: Andrew Tonner Date: Sun, 22 Jan 2017 21:11:01 -0800 Subject: [PATCH 3/3] python build script: added gtk donwload/install --- SheepShaver/src/Windows/build_on_msys.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/SheepShaver/src/Windows/build_on_msys.py b/SheepShaver/src/Windows/build_on_msys.py index ad65a3a5..48eafff8 100644 --- a/SheepShaver/src/Windows/build_on_msys.py +++ b/SheepShaver/src/Windows/build_on_msys.py @@ -20,6 +20,8 @@ import shutil MACEMU_CFLAGS = "-mwin32" MACEMU_CXXFLAGS = "-mwin32 -std=gnu++11" +GTK_INSTALL_URL = "https://downloads.sourceforge.net/project/gladewin32/gtk%2B-win32-devel/2.12.9/" \ + "gtk-dev-2.12.9-win32-2.exe" MINGW_GET_URL = "https://downloads.sourceforge.net/project/mingw/Installer/mingw-get/" \ "mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" SDL_ZIP_URL = "http://www.libsdl.org/release/SDL-1.2.15.zip" @@ -28,6 +30,7 @@ script_path = os.path.dirname(os.path.abspath(__file__)) MINGW_EXTRACT_PATH = r"c:\mingw-sheep" +GTK_INSTALL_DIR = r"C:\GTK_DIR" def parse_args(): @@ -197,6 +200,16 @@ def install(make_args, show_build_environment, use_precompiled_dyngen, build_jit show_env_dict(our_env) print "" + # download & install GTK + + gtk_install_filename = download(GTK_INSTALL_URL) + with dep_tracker.rebuilding_if_needed("gtk_install", gtk_install_filename) as needs_rebuild: + if needs_rebuild: + run([gtk_install_filename, "/S", "/D=" + GTK_INSTALL_DIR], shell=True) + + gtk_pkg_config_path = os.path.join(GTK_INSTALL_DIR, "lib", "pkgconfig") + our_env["PKG_CONFIG_PATH"] = gtk_pkg_config_path + # build SDL sdl_zip_filename = download(SDL_ZIP_URL)