Permalink
Browse files

Merge pull request #72 from anti1869/osxbuild

Build on OSX
  • Loading branch information...
ricardocabral committed Feb 18, 2015
2 parents 2914892 + cfa22c4 commit fc88433df78df3ce72acf1dacf844e9689cc875a
View
@@ -19,7 +19,34 @@ Key features:
# Install instructions
Installation, usage instructions and more details are available online at http://www.imgseek.net/isk-daemon/documents-1/install-and-usage
Installation, usage instructions and more details are available online at http://www.imgseek.net/isk-daemon/documents-1/install-and-usage [dead link]
Here are quick guide to build from cloned repo. You may want to ``sudo`` all this commands if you have permission errors.
I assume you know how to build from source and have all build tools and libraries installed for your system.
##Ubuntu Quick Start
This one is tested with Ubuntu 14.12
1. Install prerequisited if they're not on your system already:
``apt-get install swig ImageMagick libmagick++-dev python-dev``
2. cd to ./src and run: ``python setup.py install``
##MacOS Quick Start
1. Go to http://brew.sh and install ``Homebrew``
2. Install swig: ``brew install swig``
3. Install ImageMagick: ``brew install ImageMagick``
4. Install pkg-config: ``brew install pkg-config``
5. Cd to ./iskdaemon/src/ and run ``python setup.py install``
Alternatively, you can try it with ``macports``.
# Credits
View
@@ -42,7 +42,7 @@
pbFactory = None # perspective factory
daemonStartTime = time.time()
hasShutdown = False
iskVersion = "0.9.3"
iskVersion = "0.9.5"
# misc daemon inits
rootLog = logging.getLogger('imgdbapi')
View
@@ -990,7 +990,7 @@ std::vector<double> queryImgID(const int dbId, long int id, int numres, int sket
long int sz = dbSpace[dbId]->sigs.size();
int_hashset includedIds;
sigIterator it = dbSpace[dbId]->sigs.begin();
for (int var = 0; var < min(sz, numres); ) { // var goes from 0 to numres
for (int var = 0; var < min<unsigned long>(sz, numres); ) { // var goes from 0 to numres
long int rint = rand()%(sz);
for(int pqp =0; pqp < rint; pqp++) {
it ++;
@@ -1313,7 +1313,7 @@ std::vector<double> queryImgIDKeywords(const int dbId, long int id, int numres,
vector<double> Vres;
for (int var = 0; var < min(V.size()/2, numres); ) { // var goes from 0 to numres
for (int var = 0; var < min<unsigned long>(V.size()/2, numres); ) { // var goes from 0 to numres
int rint = rand()%(V.size()/2);
if (V[rint*2] > 0) { // havent added this random result yet
Vres.insert(Vres.end(), V[rint*2] );
View
@@ -2,7 +2,7 @@
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "isk-daemon"
!define PRODUCT_VERSION "0.9.3"
!define PRODUCT_VERSION "0.9.5"
!define PRODUCT_PUBLISHER "imgSeek"
!define PRODUCT_WEB_SITE "http://server.imgseek.net/"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\isk-daemon.exe"
View
@@ -4,6 +4,7 @@
# win/linux diffs
import os
import subprocess
# reuse README as package long description
with open('README.txt') as file:
@@ -46,28 +47,33 @@
# extra_compile_args += ["-DNeedFunctionPrototypes"]
# extra_compile_args += ["-D_DLL"]
extra_compile_args += ["-D_MAGICKMOD_"]
else: # *nix
else: # *nix
hasIMagick=0
extra_compile_args += [ "-DLinuxBuild","-g"]
extra_link_args += ["-g"]
print "#################################### Check ImageMagick"
try:
fnd=0
pathvar=os.environ["PATH"]
for pv in split(pathvar,':'):
if os.path.exists(pv+'/Magick++-config') or os.path.exists(pv+'Magick++-config'):
fnd=1
fnd = False
pathvar = os.environ["PATH"]
for pv in split(pathvar, ':'):
if os.path.exists(pv + '/Magick++-config') or os.path.exists(pv + 'Magick++-config'):
fnd = True
break # pv now holds directory in which Magick++-config was found
if fnd:
IMagCFlag=os.popen("Magick++-config --cxxflags --cppflags").read()
if find(IMagCFlag,"-I") != -1:
IMagCFlag=replace(IMagCFlag,"\n"," ")
IMagCFlag=split(IMagCFlag,' ')
IMagCLib=os.popen("Magick++-config --ldflags --libs").read()
IMagCLib=replace(IMagCLib,"\n"," ")
IMagCLib=split(IMagCLib,' ')
hasIMagick=1
#IMagCFlag = os.popen("Magick++-config --cxxflags --cppflags").read() # That's deprecated now
IMagCFlag = subprocess.check_output(["Magick++-config", "--cxxflags", "--cppflags"])
if find(IMagCFlag, "-I") != -1:
if len(include_dirs) == 0: # Extract include dir from latter command output and append to include_dirs
include_dirs.append([i[2:] for i in IMagCFlag.split(' ') if i.startswith("-I")][0])
IMagCFlag = replace(IMagCFlag, "\n", " ")
IMagCFlag = split(IMagCFlag, ' ')
IMagCLib = subprocess.check_output(["Magick++-config", "--ldflags", "--libs"])
IMagCLib = replace(IMagCLib, "\n", " ")
IMagCLib = split(IMagCLib, ' ')
hasIMagick = 1
else:
print "--- WARNING ---\nUnable to find Magick++-config. Are you sure you have ImageMagick and it's development files installed correctly?"
except:
traceback.print_exc()
View
@@ -23,6 +23,7 @@
###############################################################################
import xmlrpclib
import os
from optparse import OptionParser
parser = OptionParser()
@@ -33,8 +33,8 @@
private static final String SERVER_ERROR = "An error occurred while "
+ "attempting to contact the server. Please check your network "
+ "connection and try again.";
public static final String VERSION = "0.9.3";
public static final String RELEASEDATE = "Jan 2012";
public static final String VERSION = "0.9.5";
public static final String RELEASEDATE = "Mar 2014";
protected static String WEB_ENDPOINT = "/";
public static final String XMLRPC_BACKEND = WEB_ENDPOINT + "RPC";
protected static SinkList list = new SinkList();

0 comments on commit fc88433

Please sign in to comment.