# HG changeset patch # User Benjamin Golinvaux # Date 1587556954 -7200 # Node ID 5b750a4e1b527aa62e297a2185c127e004615be7 # Parent 458ab069f313241cde0f9f1f039b2f098315d0e1 Doc for SDL sample diff -r 458ab069f313 -r 5b750a4e1b52 Samples/README.md --- a/Samples/README.md Wed Apr 22 14:02:23 2020 +0200 +++ b/Samples/README.md Wed Apr 22 14:02:34 2020 +0200 @@ -20,6 +20,15 @@ ``` hg clone https://hg.orthanc-server.com/orthanc ``` + +Furthermore, the samples usually assume that an Orthanc is running locally, +without authentication, on port 8042. The samples can easily be tweaked if +your setup is different. + +When Dicom resources are to be displayed, their IDs can be supplied in the +various ways suitable for the platform (command-line arguments, URL parameters +or through the GUI) + WebAssembly samples =================== @@ -125,3 +134,50 @@ need it, for the additional checks that are made will lead to a very long build time and much slower execution (more severe than with a native non-wasm target) + +Native samples +================= + +SdlSimpleViewer +--------------- + +### Windows build + +Here's how to build the SdlSimpleViewer example using Visual Studio 2019 +(the shell is Powershell, but the legacy shell can also be used with some +tweaks). This example is meant to be launched from the folder above +orthanc-stone. + +``` + # create the build folder and navigate to it + $buildDir = "build-stone-sdlviewer-msvc16-x64" + + if (-not (Test-Path $buildDir)) { + mkdir -p $buildDir | Out-Null + } + + cd $buildDir + + # perform the configuration + cmake -G "Visual Studio 16 2019" -A x64 ` + -DMSVC_MULTIPLE_PROCESSES=ON ` + -DALLOW_DOWNLOADS=ON ` + -DSTATIC_BUILD=ON ` + -DOPENSSL_NO_CAPIENG=ON ` + ../orthanc-stone/Samples/Sdl/SimpleViewer + + $solutionPath = ls -filter *.sln + Write-Host "Solution file(s) available at: $solutionPath" +``` + +The initial configuration step will be quite lengthy, for CMake needs to +setup its internal cache based on your environment and build tools. + +Subsequent runs will be several orders of magnitude faster! + +One the solution (.sln) file is ready, you can open it using the Visual Studio +IDE and choose Build --> Build solution. + +An alternative is to execute `cmake --build .` in the build folder created by +the script. +