mirror of
https://github.com/Ellpeck/GameBundle.git
synced 2024-11-22 16:48:34 +01:00
updated some console output
This commit is contained in:
parent
2e19daa047
commit
127ea75e3e
1 changed files with 14 additions and 7 deletions
|
@ -29,7 +29,7 @@ namespace GameBundle {
|
||||||
Console.WriteLine("Project file not found, aborting");
|
Console.WriteLine("Project file not found, aborting");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
Console.WriteLine("Bundling project " + proj.FullName);
|
Console.WriteLine($"Bundling project {proj.FullName}");
|
||||||
|
|
||||||
var builtAnything = false;
|
var builtAnything = false;
|
||||||
if (options.BuildWindows) {
|
if (options.BuildWindows) {
|
||||||
|
@ -97,7 +97,7 @@ namespace GameBundle {
|
||||||
|
|
||||||
// Zip the output if required
|
// Zip the output if required
|
||||||
if (options.Zip) {
|
if (options.Zip) {
|
||||||
var zipLocation = Path.Combine(buildDir.Parent.FullName, buildDir.Name + ".zip");
|
var zipLocation = Path.Combine(buildDir.Parent.FullName, $"{buildDir.Name}.zip");
|
||||||
File.Delete(zipLocation);
|
File.Delete(zipLocation);
|
||||||
ZipFile.CreateFromDirectory(buildDir.FullName, zipLocation, CompressionLevel.Optimal, true);
|
ZipFile.CreateFromDirectory(buildDir.FullName, zipLocation, CompressionLevel.Optimal, true);
|
||||||
buildDir.Delete(true);
|
buildDir.Delete(true);
|
||||||
|
@ -140,6 +140,9 @@ namespace GameBundle {
|
||||||
var resRegex = options.MacBundleResources.Select(GlobRegex).ToArray();
|
var resRegex = options.MacBundleResources.Select(GlobRegex).ToArray();
|
||||||
var ignoreRegex = options.MacBundleIgnore.Select(GlobRegex).ToArray();
|
var ignoreRegex = options.MacBundleIgnore.Select(GlobRegex).ToArray();
|
||||||
|
|
||||||
|
if (options.Verbose)
|
||||||
|
Console.WriteLine($"Creating app bundle {app}");
|
||||||
|
|
||||||
foreach (var file in buildDir.GetFiles()) {
|
foreach (var file in buildDir.GetFiles()) {
|
||||||
if (ignoreRegex.Any(r => r.IsMatch(file.Name)))
|
if (ignoreRegex.Any(r => r.IsMatch(file.Name)))
|
||||||
continue;
|
continue;
|
||||||
|
@ -157,7 +160,14 @@ namespace GameBundle {
|
||||||
dest.Delete(true);
|
dest.Delete(true);
|
||||||
sub.MoveTo(dest.FullName);
|
sub.MoveTo(dest.FullName);
|
||||||
}
|
}
|
||||||
File.WriteAllText(Path.Combine(contents.FullName, "PkgInfo"), "APPL????");
|
|
||||||
|
var info = Path.Combine(contents.FullName, "PkgInfo");
|
||||||
|
if (!File.Exists(info)) {
|
||||||
|
File.WriteAllText(info, "APPL????");
|
||||||
|
if (options.Verbose)
|
||||||
|
Console.WriteLine($"Creating package info at {info}");
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,12 +186,9 @@ namespace GameBundle {
|
||||||
if (file.Extension != ".exe" && file.Extension != string.Empty)
|
if (file.Extension != ".exe" && file.Extension != string.Empty)
|
||||||
continue;
|
continue;
|
||||||
var name = Path.GetFileNameWithoutExtension(file.Name);
|
var name = Path.GetFileNameWithoutExtension(file.Name);
|
||||||
if (files.Any(f => f.Extension == ".dll" && Path.GetFileNameWithoutExtension(f.Name) == name)) {
|
if (files.Any(f => f.Extension == ".dll" && Path.GetFileNameWithoutExtension(f.Name) == name))
|
||||||
if (options.Verbose)
|
|
||||||
Console.WriteLine($"Choosing name {name} from executable");
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue