Browse Source

update NuGet packages and assembly info to 1.0 and.

master
Craig Oates 5 years ago
parent
commit
adb777b548
  1. 22
      DeathSocket/DeathSocket.fsproj
  2. 1
      DeathSocket/GridPainter.fs
  3. 4
      DeathSocketCLI/DeathSocketCLI.fsproj
  4. 4
      DeathSocketCLI/packages.config
  5. 227
      TestCentre/Script.fsx

22
DeathSocket/DeathSocket.fsproj

@ -3,22 +3,22 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Version>0.7.1-alpha</Version> <Version>1.0.0</Version>
<Authors>Craig Oates</Authors> <Authors>Craig Oates</Authors>
<Product>Death Socket</Product> <Product>Death Socket</Product>
<Description>A .Net Standard library which you can plug into to project and draw gridded overlays onto you images. Please note, Death Socket uses System.Drawing brushes and not System.Media brushes. For futher information, visit the projects repository on GitHub. To get a sense of what Death Socket can do, there is a console program you can download seperately (on GitHub).</Description> <Description>A .Net Standard library which you can plug into to project and draw gridded overlays onto you images. Please note, Death Socket uses System.Drawing brushes and not System.Media brushes.</Description>
<PackageProjectUrl>https://github.com/CraigOates/Death-Socket/tree/master</PackageProjectUrl> <PackageProjectUrl>https://gitlab.com/CraigOates/Death-Socket/tree/master</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/CraigOates/Death-Socket/blob/master/LICENSE</PackageLicenseUrl> <PackageLicenseUrl></PackageLicenseUrl>
<Company /> <Company />
<Copyright>Craig Oates</Copyright> <Copyright>Craig Oates</Copyright>
<RepositoryUrl>https://github.com/CraigOates/Death-Socket/tree/master</RepositoryUrl> <RepositoryUrl>https://gitlab.com/CraigOates/Death-Socket/tree/master</RepositoryUrl>
<RepositoryType>Git</RepositoryType> <RepositoryType>Git</RepositoryType>
<PackageTags>deathsocket craig oates image overlay f#</PackageTags> <PackageTags>deathsocket grid image overlay f#</PackageTags>
<PackageReleaseNotes>This release fixes the pen thickness scaling bugs in 0.7.</PackageReleaseNotes> <PackageReleaseNotes>The 1.0 release of Death Socket</PackageReleaseNotes>
<AssemblyVersion>0.7.1.0</AssemblyVersion> <AssemblyVersion>1.0.0.0</AssemblyVersion>
<PackageIconUrl>https://github.com/CraigOates/Death-Socket/blob/master/.github/Images/death-socket-logo.png</PackageIconUrl> <PackageIconUrl>https://gitlab.com/CraigOates/Death-Socket/blob/master/.github/Images/death-socket-logo.png</PackageIconUrl>
<FileVersion>0.7.1.0</FileVersion> <FileVersion>1.0.0.0</FileVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

1
DeathSocket/GridPainter.fs

@ -56,7 +56,6 @@ namespace DeathSocket
printfn "File could not be found at %s" ex.Message printfn "File could not be found at %s" ex.Message
} }
// NOT TESTED.
/// <summary> /// <summary>
/// Determines the current scale an image is viewed at (E.G. scaled /// Determines the current scale an image is viewed at (E.G. scaled
/// preview in image viewer). The (pen) line thickness is then updated /// preview in image viewer). The (pen) line thickness is then updated

4
DeathSocketCLI/DeathSocketCLI.fsproj

@ -59,10 +59,10 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Console.Waterworks"> <Reference Include="Console.Waterworks">
<HintPath>..\packages\Console.Waterworks.0.1.0.0-alpha1\lib\Console.Waterworks.dll</HintPath> <HintPath>..\packages\Console.Waterworks.1.0.1\lib\net47\Console.Waterworks.dll</HintPath>
</Reference> </Reference>
<Reference Include="FSharp.Core"> <Reference Include="FSharp.Core">
<HintPath>..\packages\FSharp.Core.4.5.4\lib\net45\FSharp.Core.dll</HintPath> <HintPath>..\packages\FSharp.Core.4.6.0\lib\net45\FSharp.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="mscorlib" /> <Reference Include="mscorlib" />
<Reference Include="SkiaSharp"> <Reference Include="SkiaSharp">

4
DeathSocketCLI/packages.config

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Console.Waterworks" version="0.1.0.0-alpha1" targetFramework="net471" /> <package id="Console.Waterworks" version="1.0.1" targetFramework="net471" />
<package id="FSharp.Core" version="4.5.4" targetFramework="net471" /> <package id="FSharp.Core" version="4.6.0" targetFramework="net471" />
<package id="SkiaSharp" version="1.60.3" targetFramework="net471" /> <package id="SkiaSharp" version="1.60.3" targetFramework="net471" />
<package id="System.Drawing.Common" version="4.5.1" targetFramework="net471" /> <package id="System.Drawing.Common" version="4.5.1" targetFramework="net471" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net471" /> <package id="System.ValueTuple" version="4.5.0" targetFramework="net471" />

227
TestCentre/Script.fsx

@ -1,114 +1,113 @@
// These DLL's must be built before you can use them in this script. //// These DLL's must be built before you can use them in this script.
#r "bin/Debug/System.Drawing.Common.dll" //#r "bin/Debug/System.Drawing.Common.dll"
#r "bin/Debug/SmoulderingBeachBall.dll" //#r "bin/Debug/SmoulderingBeachBall.dll"
open System //open System
open System.Drawing //open System.Drawing
open System.Reflection //open System.Reflection
open SmoulderingBeachBall.Domain //open SmoulderingBeachBall.Domain
open SmoulderingBeachBall.Services //open SmoulderingBeachBall.Services
open System.Threading //open System.Threading
open System.IO //open System.IO
let loadLocation = __SOURCE_DIRECTORY__ + "/LoadingTestArea" //let loadLocation = __SOURCE_DIRECTORY__ + "/LoadingTestArea"
let saveLocation = __SOURCE_DIRECTORY__ + "/SavingTestArea" //let saveLocation = __SOURCE_DIRECTORY__ + "/SavingTestArea"
let random = Random() //let random = Random()
(* Resetting the Testing Area Folders Scripts //(* Resetting the Testing Area Folders Scripts
=============================================================================== //===============================================================================
The following scripts are for when you need to "manually" clear out the //The following scripts are for when you need to "manually" clear out the
LoadingTestArea and SavingTestArea folders. If you do not want to open up the //LoadingTestArea and SavingTestArea folders. If you do not want to open up the
folder in Explorer and delete the files that way, just run the scripts in this //folder in Explorer and delete the files that way, just run the scripts in this
section. If you reset the LoadingTestArea, you will need to repopulate it using //section. If you reset the LoadingTestArea, you will need to repopulate it using
the "Populating LoadingTestArea Folder Scripts" below. *) //the "Populating LoadingTestArea Folder Scripts" below. *)
let resetSavingTestArea () = //let resetSavingTestArea () =
let files = Directory.GetFileSystemEntries(saveLocation, "*.png") // let files = Directory.GetFileSystemEntries(saveLocation, "*.png")
match files.Length with // match files.Length with
| 0 -> () // | 0 -> ()
| _ -> // | _ ->
files // files
|> Array.iter (fun f -> File.Delete(f)) // |> Array.iter (fun f -> File.Delete(f))
let resetLoadingTestArea () = //let resetLoadingTestArea () =
let files = Directory.GetFileSystemEntries(loadLocation, "*.png") // let files = Directory.GetFileSystemEntries(loadLocation, "*.png")
match files.Length with // match files.Length with
| 0 -> () // | 0 -> ()
| _ -> // | _ ->
files // files
|> Array.iter (fun f -> File.Delete(f)) // |> Array.iter (fun f -> File.Delete(f))
// Run these when the above functions have been added to F# interactive. //// Run these when the above functions have been added to F# interactive.
resetSavingTestArea () //resetSavingTestArea ()
resetLoadingTestArea () //resetLoadingTestArea ()
(* Populating LoadingTestArea Folder Scripts //(* Populating LoadingTestArea Folder Scripts
=============================================================================== //===============================================================================
The following scripts are to help you populate a test folder with test images. //The following scripts are to help you populate a test folder with test images.
You can then use these images in LibraryTests.fs -- Property Tests. //You can then use these images in LibraryTests.fs -- Property Tests.
The tests consists of loading images from LoadingTestArea, transforming them //The tests consists of loading images from LoadingTestArea, transforming them
and saving them in SavingTestArea. *) //and saving them in SavingTestArea. *)
let allColours = //let allColours =
let properties = // let properties =
typeof<Brushes>.GetProperties(BindingFlags.Public ||| BindingFlags.Static) // typeof<Brushes>.GetProperties(BindingFlags.Public ||| BindingFlags.Static)
seq { for prop in properties -> prop} // seq { for prop in properties -> prop}
|> Seq.toArray // |> Seq.toArray
let randomBrush () = //let randomBrush () =
let item = allColours.[random.Next(allColours.Length)] // let item = allColours.[random.Next(allColours.Length)]
item.GetValue(null, null) // item.GetValue(null, null)
let generateDimensionSizes total = //let generateDimensionSizes total =
List.init total (fun _ -> random.Next(3000)) // List.init total (fun _ -> random.Next(3000))
let randomSize (sizes: int list) = //let randomSize (sizes: int list) =
// (Sleep) Helps to reduce chance of picking the same item twice in quick succession. // // (Sleep) Helps to reduce chance of picking the same item twice in quick succession.
Thread.Sleep 100 // Thread.Sleep 100
sizes.Item (random.Next(sizes.Length)) // sizes.Item (random.Next(sizes.Length))
let populateSpec sizes = //let populateSpec sizes =
{ width = randomSize (sizes) // Brush ({ filePath = loadLocation
height = randomSize (sizes) // height = randomSize (sizes)
colour = (randomBrush ()) :?> Brush // colour = (randomBrush ()) :?> Brush
filePath = loadLocation // overlay = None })
overlay = None }
//let generateSpecs amount =
let generateSpecs amount = // let imageSizes = generateDimensionSizes amount
let imageSizes = generateDimensionSizes amount // [for i in 0 .. amount -> (populateSpec (imageSizes)) ]
[for i in 0 .. amount -> (populateSpec (imageSizes)) ]
//let generateImage spec =
let generateImage spec = // printfn "[INFO.] Creating image [Width: %i] [Height: %i] ..." (spec.width) (spec.height)
printfn "[INFO.] Creating image [Width: %i] [Height: %i] ..." (spec.width) (spec.height) // makeImage spec
makeImage spec
//let populateLoadingTestArea () =
let populateLoadingTestArea () = // printfn "[INFO.] Populating LoadingTestArea..."
printfn "[INFO.] Populating LoadingTestArea..." // generateSpecs 100
generateSpecs 100 // |> List.map generateImage
|> List.map generateImage // |> Async.Parallel
|> Async.Parallel // |> Async.RunSynchronously
|> Async.RunSynchronously // |> ignore
|> ignore // printfn "[INFO.] Finishing populating /LoadingTestArea."
printfn "[INFO.] Finishing populating /LoadingTestArea."
//// You should only need this once.
// You should only need this once. //// Make sure you have passed the above into F# Interactive.
// Make sure you have passed the above into F# Interactive. //populateLoadingTestArea ()
populateLoadingTestArea ()
//(* Creating the Saving Test Area Script
(* Creating the Saving Test Area Script //==============================================================================
============================================================================== //This bit of code is for creating the SavingTestArea folder which Test Centre
This bit of code is for creating the SavingTestArea folder which Test Centre //will use when it runs its tests. You will normally only need to run this code
will use when it runs its tests. You will normally only need to run this code //when you have just cloned this repository or you accidently deleted said
when you have just cloned this repository or you accidently deleted said //folder. In other words, you should only need to use it once. *)
folder. In other words, you should only need to use it once. *)
//let createSavingTestArea () =
let createSavingTestArea () = // match Directory.Exists saveLocation with
match Directory.Exists saveLocation with // | false ->
| false -> // Directory.CreateDirectory saveLocation |> ignore
Directory.CreateDirectory saveLocation |> ignore // printfn "SavingTestArea created."
printfn "SavingTestArea created." // | _ -> printfn "SavingTestArea already exists."
| _ -> printfn "SavingTestArea already exists."
//(* Before calling this function, make sure the test checking to see if this
(* Before calling this function, make sure the test checking to see if this //folder exists is failing first. *)
folder exists is failing first. *) //createSavingTestArea ()
createSavingTestArea ()
Loading…
Cancel
Save