changeset 3405:408ffcb4038f

reorganizing build instructions
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 08 Jun 2019 09:11:33 +0200
parents e280ced38a4c
children 8de071691d13
files LinuxCompilation.txt Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Resources/OldBuildInstructions.txt
diffstat 3 files changed, 76 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/LinuxCompilation.txt	Fri Jun 07 18:43:42 2019 +0200
+++ b/LinuxCompilation.txt	Sat Jun 08 09:11:33 2019 +0200
@@ -95,29 +95,30 @@
 http://anonscm.debian.org/viewvc/debian-med/trunk/packages/orthanc/trunk/debian/
 
 
-SUPPORTED - Ubuntu 12.04.5 LTS
-------------------------------
+SUPPORTED - Ubuntu 14.04 LTS
+----------------------------
 
 # sudo apt-get install build-essential unzip cmake mercurial \
-                       uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \
-                       libgtest-dev libpng-dev libsqlite3-dev libssl-dev libjpeg-dev \
-                       zlib1g-dev libdcmtk2-dev libboost1.48-all-dev libwrap0-dev \
-                       libcharls-dev
+       	       	       uuid-dev libcurl4-openssl-dev \
+       	       	       libgtest-dev libpng-dev libsqlite3-dev libssl-dev libjpeg-dev \
+		       zlib1g-dev libdcmtk2-dev libboost-all-dev libwrap0-dev \
+                       libcharls-dev libjsoncpp-dev libpugixml-dev
 
-# cmake "-DDCMTK_LIBRARIES=boost_locale;CharLS;dcmjpls;wrap;oflog" \
-        -DALLOW_DOWNLOADS=ON \
+# cmake -DALLOW_DOWNLOADS=ON \
+        -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \
         -DUSE_SYSTEM_CIVETWEB=OFF \
         -DUSE_SYSTEM_JSONCPP=OFF \
-        -DUSE_SYSTEM_PUGIXML=OFF \
-        -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \
+        -DDCMTK_LIBRARIES=dcmjpls \
         -DCMAKE_BUILD_TYPE=Release \
         ~/Orthanc
+# make
 
-SUPPORTED - Ubuntu 14.04 LTS and 16.04 LTS
-------------------------------------------
+
+SUPPORTED - Ubuntu 16.04 LTS
+----------------------------
 
 # sudo apt-get install build-essential unzip cmake mercurial \
-       	       	       uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \
+       	       	       uuid-dev libcurl4-openssl-dev liblua5.3-0-dev \
        	       	       libgtest-dev libpng-dev libsqlite3-dev libssl-dev libjpeg-dev \
 		       zlib1g-dev libdcmtk2-dev libboost-all-dev libwrap0-dev \
                        libcharls-dev libjsoncpp-dev libpugixml-dev
@@ -182,43 +183,26 @@
 
 
 
-SUPPORTED - CentOS 6
---------------------
-
-# yum install unzip make automake gcc gcc-c++ python cmake curl-devel \
-              libpng-devel sqlite-devel libuuid-devel openssl-devel \
-              lua-devel mercurial patch tar
-
-# cmake -DALLOW_DOWNLOADS=ON \
-        -DUSE_SYSTEM_JSONCPP=OFF \
-        -DUSE_SYSTEM_CIVETWEB=OFF \
-        -DUSE_SYSTEM_PUGIXML=OFF \
-        -DUSE_SYSTEM_SQLITE=OFF \
-        -DUSE_SYSTEM_BOOST=OFF \
-        -DUSE_SYSTEM_DCMTK=OFF \
-        -DUSE_SYSTEM_GOOGLE_TEST=OFF \
-        -DUSE_SYSTEM_LIBJPEG=OFF \
-        -DCMAKE_BUILD_TYPE=Release \
-        ~/Orthanc
-
-
-
 Other GNU/Linux distributions?
 ------------------------------
 
-Please send us your build instructions (by a mail to
+Don't hesitate to send us your build instructions (by a mail to
 s.jodogne@orthanc-labs.com)!
 
+The file "./Resources/OldBuildInstructions.txt" contains build
+instructions that once worked for older versions of Orthanc or older
+GNU/Linux distributions, but are not tested anymore. Even if they may
+not work anymore as such, they can serve as a basis.
+
 You can find build instructions for Orthanc up to 0.7.0 on the
 following Wiki page:
-https://code.google.com/p/orthanc/wiki/LinuxCompilationUpTo070
+https://book.orthanc-server.com/faq/compiling-old.html
 
 These instructions will not work as such beyond Orthanc 0.7.0, but
 they might give indications.
 
 
 
-
 Using ccache
 ============
 
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Fri Jun 07 18:43:42 2019 +0200
+++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp	Sat Jun 08 09:11:33 2019 +0200
@@ -239,14 +239,17 @@
                                  bool applyPlugins)
   {
     Clear();
+    
+    // Cast for compatibility with Orthanc SDK <= 1.5.6
+    const char* b = reinterpret_cast<const char*>(body);
 
     if (applyPlugins)
     {
-      return CheckHttp(OrthancPluginRestApiPostAfterPlugins(GetGlobalContext(), &buffer_, uri.c_str(), body, bodySize));
+      return CheckHttp(OrthancPluginRestApiPostAfterPlugins(GetGlobalContext(), &buffer_, uri.c_str(), b, bodySize));
     }
     else
     {
-      return CheckHttp(OrthancPluginRestApiPost(GetGlobalContext(), &buffer_, uri.c_str(), body, bodySize));
+      return CheckHttp(OrthancPluginRestApiPost(GetGlobalContext(), &buffer_, uri.c_str(), b, bodySize));
     }
   }
 
@@ -258,13 +261,16 @@
   {
     Clear();
 
+    // Cast for compatibility with Orthanc SDK <= 1.5.6
+    const char* b = reinterpret_cast<const char*>(body);
+
     if (applyPlugins)
     {
-      return CheckHttp(OrthancPluginRestApiPutAfterPlugins(GetGlobalContext(), &buffer_, uri.c_str(), body, bodySize));
+      return CheckHttp(OrthancPluginRestApiPutAfterPlugins(GetGlobalContext(), &buffer_, uri.c_str(), b, bodySize));
     }
     else
     {
-      return CheckHttp(OrthancPluginRestApiPut(GetGlobalContext(), &buffer_, uri.c_str(), body, bodySize));
+      return CheckHttp(OrthancPluginRestApiPut(GetGlobalContext(), &buffer_, uri.c_str(), b, bodySize));
     }
   }
 
--- a/Resources/OldBuildInstructions.txt	Fri Jun 07 18:43:42 2019 +0200
+++ b/Resources/OldBuildInstructions.txt	Sat Jun 08 09:11:33 2019 +0200
@@ -39,9 +39,27 @@
 	~/Orthanc
 
 
+Ubuntu 12.04.5 LTS
+------------------
 
-SUPPORTED - Ubuntu 12.10
-------------------------
+# sudo apt-get install build-essential unzip cmake mercurial \
+                       uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \
+                       libgtest-dev libpng-dev libsqlite3-dev libssl-dev libjpeg-dev \
+                       zlib1g-dev libdcmtk2-dev libboost1.48-all-dev libwrap0-dev \
+                       libcharls-dev
+
+# cmake "-DDCMTK_LIBRARIES=boost_locale;CharLS;dcmjpls;wrap;oflog" \
+        -DALLOW_DOWNLOADS=ON \
+        -DUSE_SYSTEM_CIVETWEB=OFF \
+        -DUSE_SYSTEM_JSONCPP=OFF \
+        -DUSE_SYSTEM_PUGIXML=OFF \
+        -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \
+        -DCMAKE_BUILD_TYPE=Release \
+        ~/Orthanc
+
+
+Ubuntu 12.10
+------------
 
 # sudo apt-get install build-essential unzip cmake mercurial \
        	       	       uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \
@@ -73,8 +91,8 @@
 	~/Orthanc
 
 
-SUPPORTED - Ubuntu 13.10
-------------------------
+Ubuntu 13.10
+------------
 
 # sudo apt-get install build-essential unzip cmake mercurial \
        	       	       uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \
@@ -92,8 +110,8 @@
 	~/Orthanc
 
 
-SUPPORTED - Fedora 19
----------------------
+Fedora 19
+---------
 
 # sudo yum install unzip make automake gcc gcc-c++ python cmake \
                    boost-devel curl-devel dcmtk-devel glog-devel \
@@ -106,3 +124,24 @@
        
 Note: Have also a look at the official package:
 http://pkgs.fedoraproject.org/cgit/orthanc.git/tree/?h=f18
+
+
+CentOS 6
+--------
+
+# yum install unzip make automake gcc gcc-c++ python cmake curl-devel \
+              libpng-devel sqlite-devel libuuid-devel openssl-devel \
+              lua-devel mercurial patch tar
+
+# cmake -DALLOW_DOWNLOADS=ON \
+        -DUSE_SYSTEM_JSONCPP=OFF \
+        -DUSE_SYSTEM_CIVETWEB=OFF \
+        -DUSE_SYSTEM_PUGIXML=OFF \
+        -DUSE_SYSTEM_SQLITE=OFF \
+        -DUSE_SYSTEM_BOOST=OFF \
+        -DUSE_SYSTEM_DCMTK=OFF \
+        -DUSE_SYSTEM_GOOGLE_TEST=OFF \
+        -DUSE_SYSTEM_LIBJPEG=OFF \
+        -DCMAKE_BUILD_TYPE=Release \
+        ~/Orthanc
+