This PR adds, in addition to the existing windows CMake pipeline, a Github Action to build release and debug installers for Windows. It includes the espeak-ng-data path fix from https://github.com/espeak-ng/espeak-ng/issues/1705. ~~Unfortunately, in order to build successfully, it removes Arabic and Faroese from the Windows installer for the reasons listed in https://github.com/espeak-ng/espeak-ng/issues/1774~~ (which incidentally, I think, demonstrates the value of having this as a separate CI pipeline)master
| @@ -0,0 +1,43 @@ | |||
| name: windows-msbuild | |||
| on: | |||
| workflow_dispatch: | |||
| push: | |||
| branches: [master] | |||
| pull_request: | |||
| branches: [master] | |||
| jobs: | |||
| build: | |||
| runs-on: windows-latest | |||
| name: "build: ${{ matrix.config }}" | |||
| strategy: | |||
| fail-fast: false | |||
| matrix: | |||
| config: [Debug, Release] | |||
| steps: | |||
| - name: Setup MSBuild | |||
| uses: microsoft/setup-msbuild@v2 | |||
| - name: Install Windows 8.1 SDK | |||
| shell: powershell | |||
| run: | | |||
| Invoke-WebRequest -Method Get -Uri https://go.microsoft.com/fwlink/p/?LinkId=323507 -OutFile sdksetup.exe -UseBasicParsing | |||
| Start-Process -Wait sdksetup.exe -ArgumentList "/q", "/norestart", "/features", "OptionId.WindowsDesktopSoftwareDevelopmentKit", "OptionId.NetFxSoftwareDevelopmentKit" | |||
| - name: Install WiX | |||
| run: dotnet tool install --global wix | |||
| - name: Checkout repo | |||
| uses: actions/checkout@v4 | |||
| - name: Checkout pcaudiolib | |||
| uses: actions/checkout@v4 | |||
| with: | |||
| repository: "espeak-ng/pcaudiolib" | |||
| path: "src/pcaudiolib" | |||
| - name: Do build | |||
| working-directory: "src/windows" | |||
| run: msbuild espeak-ng.sln /p:Configuration=${{ matrix.config }} /p:Platform=x64 | |||
| - name: Upload MSI installer | |||
| uses: actions/upload-artifact@v4 | |||
| with: | |||
| name: windows-${{ matrix.config }}-msi | |||
| path: "src/windows/installer/bin/x64/${{ matrix.config }}/espeak-ng.msi" | |||
| @@ -75,7 +75,7 @@ extern "C" | |||
| // will look for espeak_data directory here, and also in user's home directory | |||
| #ifndef PATH_ESPEAK_DATA | |||
| #define PATH_ESPEAK_DATA "/usr/share/espeak-ng-data" | |||
| #define PATH_ESPEAK_DATA ("%cespeak-ng-data", PATHSEP) | |||
| #endif | |||
| void cancel_audio(void); | |||
| @@ -167,6 +167,9 @@ | |||
| <Target Name="fi" Inputs="$(ProjectDir)..\..\dictsource\fi_rules;$(ProjectDir)..\..\dictsource\fi_list" Outputs="$(ProjectDir)..\..\espeak-ng-data\fi_dict" DependsOnTargets="Phonemes"> | |||
| <Exec Command="cd $(ProjectDir)..\..\dictsource && $(TargetDir)espeak-ng.exe --path=$(ProjectDir)..\.. --compile=fi" /> | |||
| </Target> | |||
| <Target Name="fo" Inputs="$(ProjectDir)..\..\dictsource\fo_rules;$(ProjectDir)..\..\dictsource\fo_list" Outputs="$(ProjectDir)..\..\espeak-ng-data\fo_dict" DependsOnTargets="Phonemes"> | |||
| <Exec Command="cd $(ProjectDir)..\..\dictsource && $(TargetDir)espeak-ng.exe --path=$(ProjectDir)..\.. --compile=fo" /> | |||
| </Target> | |||
| <Target Name="fr" Inputs="$(ProjectDir)..\..\dictsource\fr_rules;$(ProjectDir)..\..\dictsource\fr_list" Outputs="$(ProjectDir)..\..\espeak-ng-data\fr_dict" DependsOnTargets="Phonemes"> | |||
| <Exec Command="cd $(ProjectDir)..\..\dictsource && $(TargetDir)espeak-ng.exe --path=$(ProjectDir)..\.. --compile=fr" /> | |||
| </Target> | |||
| @@ -428,6 +431,6 @@ | |||
| <Target Name="yue" Inputs="$(ProjectDir)..\..\dictsource\yue_rules;$(ProjectDir)..\..\dictsource\yue_list;$(ProjectDir)..\..\dictsource\yue_listx" Outputs="$(ProjectDir)..\..\espeak-ng-data\yue_dict" DependsOnTargets="Phonemes;Extdict"> | |||
| <Exec Command="cd $(ProjectDir)..\..\dictsource && $(TargetDir)espeak-ng.exe --path=$(ProjectDir)..\.. --compile=yue" /> | |||
| </Target> | |||
| <Target Name="Dictionaries" DependsOnTargets="af;am;an;ar;as;az;ba;be;bg;bn;bpy;bs;ca;chr;cmn;cs;cv;cy;da;de;el;en;eo;es;et;eu;fa;fi;fr;ga;gd;gn;grc;gu;hak;haw;he;hi;hr;ht;hu;hy;ia;id;io;is;it;ja;jbo;ka;kk;kl;kn;ko;kok;ku;ky;la;lb;lfn;lt;lv;mi;mk;ml;mr;ms;mt;my;nci;ne;nl;no;nog;om;or;pa;pap;piqd;pl;pt;py;qdb;quc;qu;qya;ro;ru;sd;shn;si;sjn;sk;sl;smj;sq;sr;sv;sw;ta;te;th;tk;tn;tr;tt;ug;uk;ur;uz;vi;xex;yue" /> | |||
| <Target Name="Dictionaries" DependsOnTargets="af;am;an;ar;as;az;ba;be;bg;bn;bpy;bs;ca;chr;cmn;cs;cv;cy;da;de;el;en;eo;es;et;eu;fa;fi;fo;fr;ga;gd;gn;grc;gu;hak;haw;he;hi;hr;ht;hu;hy;ia;id;io;is;it;ja;jbo;ka;kk;kl;kn;ko;kok;ku;ky;la;lb;lfn;lt;lv;mi;mk;ml;mr;ms;mt;my;nci;ne;nl;no;nog;om;or;pa;pap;piqd;pl;pt;py;qdb;quc;qu;qya;ro;ru;sd;shn;si;sjn;sk;sl;smj;sq;sr;sv;sw;ta;te;th;tk;tn;tr;tt;ug;uk;ur;uz;vi;xex;yue" /> | |||
| </Project> | |||