Skip to content

Commit 08dcf84

Browse files
committed
fix: replace \\ with / so the tool works on both linux and windows
(in theory it should also work on mac but I can't test that)
1 parent 0a1e2be commit 08dcf84

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

G2WwiseDataTool/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static void Main(string[] args)
2222
}
2323
else
2424
{
25-
SoundbanksInfoParser.ReadSoundbankInfo(options.inputPath, Path.TrimEndingDirectorySeparator(options.outputPath) + "\\", options.outputToFolderStructure, options.saveEventAndSoundBankPaths, options.verbose, options.filterSoundBanks);
25+
SoundbanksInfoParser.ReadSoundbankInfo(options.inputPath, Path.TrimEndingDirectorySeparator(options.outputPath) + "/", options.outputToFolderStructure, options.saveEventAndSoundBankPaths, options.verbose, options.filterSoundBanks);
2626
}
2727
}
2828

G2WwiseDataTool/SoundbanksInfoParser.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ public static void ReadSoundbankInfo(string inputPath, string outputPath, bool o
7575
entry.isStreamed = true;
7676
entry.wemAssemblyPath = "[assembly:/sound/wwise/originals/" + entry.wemPath + ".wav].pc_wem";
7777
entry.wemNameHash = MD5.ConvertStringtoMD5(entry.wemAssemblyPath);
78-
entry.wemLength = ProcessWems.GetWemLength(directoryPath + "\\" + entry.wemID);
79-
entry.wemData = ProcessWems.GetWemData(directoryPath + "\\" + entry.wemID);
78+
entry.wemLength = ProcessWems.GetWemLength(directoryPath + "/" + entry.wemID);
79+
entry.wemData = ProcessWems.GetWemData(directoryPath + "/" + entry.wemID);
8080
wwev.entries.Add(entry);
8181
wwev.isStreamed = true;
8282

@@ -105,7 +105,7 @@ public static void ReadSoundbankInfo(string inputPath, string outputPath, bool o
105105
string prefetchSize = excludedMemFile.SelectSingleNode("PrefetchSize")?.InnerText;
106106
UInt32 prefetchSizeUInt32 = Convert.ToUInt32(prefetchSize);
107107
entry.prefetchSize = Convert.ToUInt32(prefetchSize);
108-
entry.prefetchBuffer = ProcessWems.GetWemBuffer(directoryPath + "\\" + entry.wemID, Convert.ToInt32(prefetchSize));
108+
entry.prefetchBuffer = ProcessWems.GetWemBuffer(directoryPath + "/" + entry.wemID, Convert.ToInt32(prefetchSize));
109109
wwev.isPrefetched = true;
110110
}
111111
}
@@ -115,8 +115,8 @@ public static void ReadSoundbankInfo(string inputPath, string outputPath, bool o
115115
{
116116
EventWriter.Event.Entry entry = new EventWriter.Event.Entry();
117117
entry.wemID = excludedMemFile.Attributes["Id"].Value;
118-
entry.wemLength = ProcessWems.GetWemLength(directoryPath + "\\" + entry.wemID);
119-
entry.wemData = ProcessWems.GetWemData(directoryPath + "\\" + entry.wemID);
118+
entry.wemLength = ProcessWems.GetWemLength(directoryPath + "/" + entry.wemID);
119+
entry.wemData = ProcessWems.GetWemData(directoryPath + "/" + entry.wemID);
120120
wwev.entries.Add(entry);
121121
wwev.isMemory = true;
122122
}
@@ -203,7 +203,7 @@ public static void ReadSoundbankInfo(string inputPath, string outputPath, bool o
203203

204204
if (entry.isStreamed)
205205
{
206-
File.Copy(directoryPath + "\\" + entry.wemID + ".wem", finalOutputPathWem, true);
206+
File.Copy(directoryPath + "/" + entry.wemID + ".wem", finalOutputPathWem, true);
207207
wwemMetaData.hashValue = entry.wemNameHash;
208208
MetaFiles.GenerateMeta(ref wwemMetaData, finalOutputPath + ".meta.json");
209209
}

0 commit comments

Comments
 (0)