Start adding support to run scripts in 64 bit

dashboard
Pat Hartl 2023-01-20 21:29:38 -06:00
parent 749a430217
commit a2e471fc72
7 changed files with 1223 additions and 0 deletions

View File

@ -11,6 +11,7 @@ namespace LANCommander.SDK.Models
public string Name { get; set; }
public string Description { get; set; }
public bool RequiresAdmin { get; set; }
public bool Requires64Bit { get; set; }
public string Contents { get; set; }
public virtual Game Game { get; set; }
}

View File

@ -12,6 +12,7 @@ namespace LANCommander.Data.Models
public ScriptType Type { get; set; }
public string Contents { get; set; }
public bool RequiresAdmin { get; set; }
public bool Requires64Bit { get; set; }
public Guid? GameId { get; set; }
[JsonIgnore]

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LANCommander.Migrations
{
public partial class Add64BitFlagForScripts : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "Requires64Bit",
table: "Scripts",
type: "INTEGER",
nullable: false,
defaultValue: false);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Requires64Bit",
table: "Scripts");
}
}
}

View File

@ -552,6 +552,9 @@ namespace LANCommander.Migrations
.IsRequired()
.HasColumnType("TEXT");
b.Property<bool>("Requires64Bit")
.HasColumnType("INTEGER");
b.Property<bool>("RequiresAdmin")
.HasColumnType("INTEGER");

View File

@ -62,6 +62,12 @@
<span class="form-check-label">Requires Admin Privileges</span>
<span class="form-check-description">Marks the script as needing admin privileges. Recommended for any changes to the system e.g. Windows Registry.</span>
</label>
<label class="form-check">
<input asp-for="Requires64Bit" type="checkbox" class="form-check-input" />
<span class="form-check-label">Requires 64-Bit Runtime</span>
<span class="form-check-description">Runs the script in a 64-bit runtime. Useful if you want to break out of the registry's WOW6432Node redirection.</span>
</label>
</div>
<input type="hidden" asp-for="Contents" />

View File

@ -62,6 +62,12 @@
<span class="form-check-label">Requires Admin Privileges</span>
<span class="form-check-description">Marks the script as needing admin privileges. Recommended for any changes to the system e.g. Windows Registry.</span>
</label>
<label class="form-check">
<input asp-for="Requires64Bit" type="checkbox" class="form-check-input" />
<span class="form-check-label">Requires 64-Bit Runtime</span>
<span class="form-check-description">Runs the script in a 64-bit runtime. Useful if you want to break out of the registry's WOW6432Node redirection.</span>
</label>
</div>
<input type="hidden" asp-for="Contents" />