Merge branch 'master' into feature/ulong_tostring

This commit is contained in:
valentinbreiz 2020-12-19 00:48:42 +01:00 committed by GitHub
commit ec1e46553a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 41 additions and 18 deletions

View file

@ -15,6 +15,10 @@
#define VSVersion "vs2019"
#endif
#ifndef RealPath
#define RealPath {userappdata}
#endif
#if BuildConfiguration == "DevKit"
; devkit releases are not compressed
#pragma warning "Building Dev Kit release"
@ -36,7 +40,8 @@ AppSupportURL=http://www.goCosmos.org/
AppUpdatesURL=http://www.goCosmos.org/
AppVersion={#ChangeSetVersion}
SetupMutex=CosmosSetupMutexName,Global\CosmoSetupMutexName
DefaultDirName={userappdata}\Cosmos User Kit
UsePreviousAppDir=false
DefaultDirName={#RealPath}\Cosmos User Kit
DefaultGroupName=Cosmos User Kit
OutputDir=.\Setup\Output
OutputBaseFilename=CosmosUserKit-{#ChangeSetVersion}-{#VSVersion}

File diff suppressed because one or more lines are too long

View file

@ -29,7 +29,8 @@ namespace Cosmos.Build.Builder.BuildTasks
_defines = new Dictionary<string, string>()
{
["BuildConfiguration"] = configuration,
["ChangeSetVersion"] = releaseVersion
["ChangeSetVersion"] = releaseVersion,
["RealPath"] = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
};
}

View file

@ -162,18 +162,6 @@ namespace Cosmos.Build.Builder
{
xKey.SetValue("DevKit", _cosmosDir);
}
// Launch VS
if (!App.BuilderConfiguration.NoVsLaunch)
{
var vsInstance = _visualStudioInstance;
var vsPath = Path.Combine(vsInstance.GetInstallationPath(), "Common7", "IDE", "devenv.exe");
var kernelSlnPath = Path.Combine(_cosmosDir, "Kernel.sln");
yield return new StartProcessTask(vsPath, kernelSlnPath, "Visual Studio (Kernel.sln)");
}
}
}
}

View file

@ -294,7 +294,7 @@ namespace Cosmos.Core
if (!(rs == ""))
{
return rs;
return rs.Trim();
}
else
{

View file

@ -10,5 +10,9 @@ namespace Cosmos.Core_Plugs.System.Threading
{
return aData -= 1;
}
public static int Increment(ref int aData)
{
return aData += 1;
}
}
}

View file

@ -164,6 +164,27 @@ namespace Cosmos.HAL
return null;
}
/// <summary>
/// Get device.
/// </summary>
/// <param name="bus">Bus ID.</param>
/// <param name="slot">Slot position ID.</param>
/// <param name="function">Function ID.</param>
/// <returns></returns>
public static PCIDevice GetDevice(uint bus, uint slot, uint function)
{
foreach (var xDevice in Devices)
{
if (xDevice.bus == bus &&
xDevice.slot == slot &&
xDevice.function == function)
{
return xDevice;
}
}
return null;
}
public static PCIDevice GetDeviceClass(ClassID Class, SubclassID SubClass)
{
foreach (var xDevice in Devices)

View file

@ -249,7 +249,7 @@ namespace Cosmos.System.Graphics
//now reading size of BITMAPINFOHEADER should be 40 - bytes 14 -> 18
stream.Read(_int, 0, 4);
uint infoHeaderSize = BitConverter.ToUInt32(_int, 0);
if (infoHeaderSize != 40 && infoHeaderSize != 56) // 56 - is BITMAPV3INFOHEADER, where we ignore the additional values see https://web.archive.org/web/20150127132443/https://forums.adobe.com/message/3272950
if (infoHeaderSize != 40 && infoHeaderSize != 56 && infoHeaderSize != 124) // 124 - is BITMAPV5INFOHEADER, 56 - is BITMAPV3INFOHEADER, where we ignore the additional values see https://web.archive.org/web/20150127132443/https://forums.adobe.com/message/3272950
{
throw new Exception("Info header size has the wrong value!");
}