From 324dd164f20f7dba9cb4e5d899a524cdf885670b Mon Sep 17 00:00:00 2001
From: odrling <florianbadie@odrling.xyz>
Date: Fri, 20 Nov 2020 02:42:36 +0100
Subject: [PATCH] fix build (again)

---
 .github/workflows/msys.yml | 17 ++++++++---------
 meson.build                |  1 -
 src/meson.build            | 28 +++++++++++++++++++++++-----
 src/res/res.rc             |  8 ++++----
 subprojects/boost.wrap     |  2 +-
 5 files changed, 36 insertions(+), 20 deletions(-)

diff --git a/.github/workflows/msys.yml b/.github/workflows/msys.yml
index f6f787648..126a8ee4f 100644
--- a/.github/workflows/msys.yml
+++ b/.github/workflows/msys.yml
@@ -25,24 +25,23 @@ jobs:
             mingw-w64-x86_64-ninja
             mingw-w64-x86_64-meson
             mingw-w64-x86_64-cmake
-            mingw-w64-x86_64-python-pip
-
-      - name: Irrational Python things
-        run: |
-          MSYSTEM= pip install --upgrade certifi
+            mingw-w64-x86_64-wxWidgets
+            mingw-w64-x86_64-boost
+            mingw-w64-x86_64-libass
+            mingw-w64-x86_64-glib2
+            mingw-w64-x86_64-ffms2
+            mingw-w64-x86_64-icu
+            mingw-w64-x86_64-imagemagick
 
       - name: Build Aegisub
         run: |
-          MSYSTEM= meson builddir -Dbuildtype=release -Ddefault_library=static
+          meson builddir -Dbuildtype=release -Ddefault_library=static
           ninja -C builddir
 
       - name: Create installer
         run: |
           tree
           curl -o "aegisub-codecs.zip" https://mugen.karaokes.moe/downloads/aegisub-codecs.zip
-          for i in po/*.po; do
-            msgfmt -o $(basename $i .po).mo $i
-          done
           cd packages/win_installer
           curl -o "innosetup.zip" https://hikari.butaishoujo.moe/b/52a01bb4/innosetup.zip
           unzip innosetup.zip
diff --git a/meson.build b/meson.build
index a4bf2f42b..2eecd4d43 100644
--- a/meson.build
+++ b/meson.build
@@ -123,7 +123,6 @@ if host_machine.system() == 'windows'
 endif
 
 deps += openssl_dep
-
 deps += dependency('zlib')
 
 wx_dep = dependency('wxWidgets', version: '>=3.0.0',
diff --git a/src/meson.build b/src/meson.build
index 7db5092dd..07ab8a329 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -211,12 +211,30 @@ foreach opt: opt_src
     endif
 endforeach
 
-# avisynth for windows build
 if host_machine.system() == 'windows'
-    aegisub_src += [
-        'audio_provider_avs.cpp',
-        'video_provider_avs.cpp',
-    ]
+    res_inc = include_directories(
+        'bitmaps/windows',
+    )
+
+    res_dep_files = files(
+        'bitmaps/windows/icon.ico',
+        'bitmaps/windows/eyedropper.cur',
+    )
+  
+    raw_wx_windres_args = wx_dep.get_variable(configtool : 'rescomp').split()
+    wx_windres_args = []
+    foreach arg : raw_wx_windres_args
+        if arg != 'windres'
+            wx_windres_args += arg
+        endif
+    endforeach
+    windows = import('windows')
+
+    aegisub_src += windows.compile_resources('res/res.rc',
+        args : wx_windres_args,
+        depend_files : res_dep_files,
+        include_directories : [res_inc, version_inc]
+    )
 endif
     
 
diff --git a/src/res/res.rc b/src/res/res.rc
index 45616b8cb..5b26f4ee5 100644
--- a/src/res/res.rc
+++ b/src/res/res.rc
@@ -21,9 +21,9 @@ eyedropper_cursor CURSOR "../bitmaps/windows/eyedropper.cur"
 
 // We supply the manifest ourselves
 #define wxUSE_NO_MANIFEST 1
-#include "wx/msw/wx.rc"
+#include <wx/msw/wx.rc>
 
-#include "../../build/git_version.h"
+#include "git_version.h"
 #include <Winver.h>
 
 #ifdef _DEBUG
@@ -53,8 +53,8 @@ eyedropper_cursor CURSOR "../bitmaps/windows/eyedropper.cur"
 #endif
 
 VS_VERSION_INFO VERSIONINFO
-FILEVERSION    	RESOURCE_BASE_VERSION, BUILD_GIT_VERSION_NUMBER
-PRODUCTVERSION 	RESOURCE_BASE_VERSION, 0
+FILEVERSION    	0, BUILD_GIT_VERSION_NUMBER
+PRODUCTVERSION 	0, 0
 FILEFLAGSMASK  	VS_FFI_FILEFLAGSMASK
 FILEFLAGS      	(AGI_RC_FLAG_DEBUG|AGI_RC_FLAG_PRERELEASE)
 FILEOS         	VOS__WINDOWS32
diff --git a/subprojects/boost.wrap b/subprojects/boost.wrap
index b72cb5cdb..e66c7ff5b 100644
--- a/subprojects/boost.wrap
+++ b/subprojects/boost.wrap
@@ -1,6 +1,6 @@
 [wrap-file]
 directory = boost_1_74_0
-source_url = https://hikari.butaishoujo.moe/b/afff36d3/boost_1_74_0.tar.gz
+source_url = https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.gz
 source_filename = boost_1_74_0.tar.gz
 source_hash = afff36d392885120bcac079148c177d1f6f7730ec3d47233aa51b0afa4db94a5
 patch_directory = boost
-- 
GitLab