Skip to content

Commit

Permalink
Embed OpenCL program in source
Browse files Browse the repository at this point in the history
  • Loading branch information
TokugawaHeavyIndustries committed Sep 28, 2022
1 parent 4680821 commit fda2808
Show file tree
Hide file tree
Showing 19 changed files with 2,343 additions and 8 deletions.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
CUETools.Codecs.FLACCL\obj\
CUETools.Codecs.FLACCL/obj/
CUETools.Codecs/obj/
CUETools.Codecs.Flake/obj/
CUETools.FLACCL.cmd/obj/


### Windows ###
# Windows thumbnail cache files
Thumbs.db
Expand All @@ -24,3 +29,6 @@ $RECYCLE.BIN/

# Windows shortcuts
*.lnk
*.editorconfig
ThirdParty/openclnet/source/obj/Debug/net47/OpenCLNet.csproj.FileListAbsolute.txt
ThirdParty/openclnet/source/obj/Release/net47/OpenCLNet.pdb
4 changes: 1 addition & 3 deletions CUETools.Codecs.FLACCL/CUETools.Codecs.FLACCL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="flac.cl">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<EmbeddedResource Include="flac.cl" />
<EmbeddedResource Include="Properties\Resources.de-DE.resx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
Expand Down
7 changes: 6 additions & 1 deletion CUETools.Codecs.FLACCL/FLACCLWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
using CUETools.Codecs.Flake;
using OpenCLNet;
using Newtonsoft.Json;
using System.Reflection;

namespace CUETools.Codecs.FLACCL
{
Expand Down Expand Up @@ -1860,7 +1861,11 @@ public unsafe void InitTasks()

try
{
openCLProgram = OCLMan.CompileFile("flac.cl");
//Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("CUETools.Codecs.FLACCL.flac.cl");
//string[] pot;
//pot = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("CUETools.Codecs.FLACCL.flac.cl").ToString;
// openCLProgram = OCLMan.CompileFile(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("CUETools.Codecs.FLACCL.flac.cl"));
openCLProgram = OCLMan.CompileFile();
}
catch (OpenCLBuildException ex)
{
Expand Down
1 change: 1 addition & 0 deletions CUETools.FLACCL.cmd/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/


using System;
using System.Collections.Generic;
Expand Down
Loading

0 comments on commit fda2808

Please sign in to comment.