From 89faad3602f08888e50517868745d940076961a5 Mon Sep 17 00:00:00 2001 From: Aaron Date: Mon, 19 May 2025 12:30:48 -0400 Subject: [PATCH] backup --- LICENSE | 11 + README.md | 3 + amscimglib4.code-workspace | 10 + backup.sh | 6 + .../__pycache__/amsbuildlib4.cpython-310.pyc | Bin 0 -> 12681 bytes build/__pycache__/amsbuildlib4.cpython-39.pyc | Bin 0 -> 12714 bytes build/amsbuildlib4.py | 813 ++++++++++++++++++ build/make.linux64.so.py | 67 ++ build/make.linux64.test.py | 49 ++ build/make.mingw64.dll.py | 67 ++ build/make.mingw64.test.py | 49 ++ build/make.msvc64.dll.py | 61 ++ build/make.msvc64.test.py | 49 ++ build_linux64/libamscimglib4.linux64.a | Bin 0 -> 12680 bytes build_linux64/libamscimglib4.linux64.so | Bin 0 -> 14040 bytes build_linux64/objstore/.placeholder | 0 build_linux64/objstore/amscimglib4_image.o | Bin 0 -> 944 bytes .../objstore/amscimglib4_templatetest.o | Bin 0 -> 1264 bytes build_linux64/objstore/amscimglib4_tests.o | Bin 0 -> 944 bytes build_linux64/objstore/amscimglib4_util.o | Bin 0 -> 944 bytes build_linux64/tests | Bin 0 -> 15776 bytes build_mingw64/objstore/.placeholder | 0 .../objstore/ams_template_cppdll_src2.o | Bin 0 -> 1765 bytes .../objstore/ams_template_cppdll_template.o | Bin 0 -> 1459 bytes build_msvc64/objstore/.placeholder | 0 .../objstore/amscpptemplate25a_src2.obj | Bin 0 -> 2367 bytes .../objstore/amscpptemplate25a_template.obj | Bin 0 -> 2365 bytes .../README_PrecompiledDependencies.txt | 11 + dependencies/linux64/bin/.placeholder | 0 dependencies/linux64/include/.placeholder | 0 dependencies/linux64/lib/.placeholder | 0 dependencies/winx64/bin/.placeholder | 0 dependencies/winx64/include/.placeholder | 0 dependencies/winx64/lib/.placeholder | 0 include/amscimglib4/amscimglib4.h | 70 ++ include/amscimglib4/amscimglib4_intl.h | 11 + include/amscimglib4/amscimglib4_tests.h | 7 + make_linux.py | 22 + make_mingw.py | 28 + make_msvc.py | 23 + notes/.placeholder | 0 pull.sh | 3 + src/amscimglib4/amscimglib4_image.cpp | 12 + src/amscimglib4/amscimglib4_templatetest.cpp | 15 + src/amscimglib4/amscimglib4_tests.cpp | 12 + src/amscimglib4/amscimglib4_util.cpp | 12 + src/main.cpp | 9 + 47 files changed, 1420 insertions(+) create mode 100644 LICENSE create mode 100644 README.md create mode 100644 amscimglib4.code-workspace create mode 100644 backup.sh create mode 100644 build/__pycache__/amsbuildlib4.cpython-310.pyc create mode 100644 build/__pycache__/amsbuildlib4.cpython-39.pyc create mode 100644 build/amsbuildlib4.py create mode 100644 build/make.linux64.so.py create mode 100644 build/make.linux64.test.py create mode 100644 build/make.mingw64.dll.py create mode 100644 build/make.mingw64.test.py create mode 100644 build/make.msvc64.dll.py create mode 100644 build/make.msvc64.test.py create mode 100644 build_linux64/libamscimglib4.linux64.a create mode 100644 build_linux64/libamscimglib4.linux64.so create mode 100644 build_linux64/objstore/.placeholder create mode 100644 build_linux64/objstore/amscimglib4_image.o create mode 100644 build_linux64/objstore/amscimglib4_templatetest.o create mode 100644 build_linux64/objstore/amscimglib4_tests.o create mode 100644 build_linux64/objstore/amscimglib4_util.o create mode 100644 build_linux64/tests create mode 100644 build_mingw64/objstore/.placeholder create mode 100644 build_mingw64/objstore/ams_template_cppdll_src2.o create mode 100644 build_mingw64/objstore/ams_template_cppdll_template.o create mode 100644 build_msvc64/objstore/.placeholder create mode 100644 build_msvc64/objstore/amscpptemplate25a_src2.obj create mode 100644 build_msvc64/objstore/amscpptemplate25a_template.obj create mode 100644 dependencies/README_PrecompiledDependencies.txt create mode 100644 dependencies/linux64/bin/.placeholder create mode 100644 dependencies/linux64/include/.placeholder create mode 100644 dependencies/linux64/lib/.placeholder create mode 100644 dependencies/winx64/bin/.placeholder create mode 100644 dependencies/winx64/include/.placeholder create mode 100644 dependencies/winx64/lib/.placeholder create mode 100644 include/amscimglib4/amscimglib4.h create mode 100644 include/amscimglib4/amscimglib4_intl.h create mode 100644 include/amscimglib4/amscimglib4_tests.h create mode 100644 make_linux.py create mode 100644 make_mingw.py create mode 100644 make_msvc.py create mode 100644 notes/.placeholder create mode 100644 pull.sh create mode 100644 src/amscimglib4/amscimglib4_image.cpp create mode 100644 src/amscimglib4/amscimglib4_templatetest.cpp create mode 100644 src/amscimglib4/amscimglib4_tests.cpp create mode 100644 src/amscimglib4/amscimglib4_util.cpp create mode 100644 src/main.cpp diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cdd2191 --- /dev/null +++ b/LICENSE @@ -0,0 +1,11 @@ +Copyright (c) 2024, Aaron M. Schinder + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..1b60d1a --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# amscimglib4 + +Updated and organized image library C dll for loading and saving image files. Interface for bottom level image libraries. diff --git a/amscimglib4.code-workspace b/amscimglib4.code-workspace new file mode 100644 index 0000000..6f45936 --- /dev/null +++ b/amscimglib4.code-workspace @@ -0,0 +1,10 @@ +{ + "folders": [ + { + "path": "." + }, + { + "path": "../../sourceprojs23/camsimglib3" + } + ] +} \ No newline at end of file diff --git a/backup.sh b/backup.sh new file mode 100644 index 0000000..72d6d04 --- /dev/null +++ b/backup.sh @@ -0,0 +1,6 @@ +#!/usr/bin/bash + +tar -czvf ../amscimglib4.tar.gz ./* + +scp ../amscimglib4.tar.gz aschinder@amssolarempire.com:~/workspace/projects + diff --git a/build/__pycache__/amsbuildlib4.cpython-310.pyc b/build/__pycache__/amsbuildlib4.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b06f508f18c43f24cbae9c33b4795a38cc16cc3d GIT binary patch literal 12681 zcmdT~S!`U_d7it?+*vqWM6KS&yGE8si?$qFm2KIU*}67pIbz~gwapIaT#`c#XQ*>8 zwNQ6z6|&Q&jnX7d)24=7sYrqf2#TUWT69H`rp-gsJx{k!O`hC78fXEci28m1xig%h z>Fuo{G3T87pXHwO@Be>pduXVT!QYF2ys`M-Gnvc}`OyF8;Ndua;Q=d?Q5j`5Gp9{$ zownrJK5a|woObdVWh>{6%xPD-%0um`tjeLzDqrPM=Tt!zQTwW-hEV5KSq-Bus1Y@a zx~Rs~4%8(zu6CjxQoGb{)Md3t?L|GT_NiM?kEmPKZKy}p?dlHHW2&O=M7=}ZrS3*O zuI^FyqTZ?QQ}?6ZrS_{T>fP#qdI0qvbx<8by;n`BN!0t)GwQIKdc!(>i+V^s49Km3 z98r$|a+~^udK8e`)nn=?>O0g=sAH%r>T&f1>O0kw>Nx7V)Kltd)ORcERHl039b$2& z4y^V5cA(|q_dI@K3q6aOj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oJ{@T=L<*1JaHF}%8Zl zDGjmZ^|*zbH8Np#a{W7KBdt$(WG)+-%TDdpnzO!7lp|avgBN&gi2%V*1sqwf6&?M@ zm_EWbBYKj=Gi(Emh4}V599_h?4p`(^c7aBgFvNBj^>vIFibJy#l|uynBXq02&`*Dd zkLd5DE-CjOyQ7x3PciQOWp16K*1sKuqxPrhji~n`0Hl*RE{V>9s6a|uGVB#_qk(m$cLNni;gNT zE-j>E<|7ek1?rZa{M@O&!rFBgiOrqD+^K<3h{#dDRr5mx5KAnof;2beAsUA+Ns5L% zcM$p~EXZ!g!4#6cj&3c4qJkZUc60H@nulWl8{*H6aPjI|fPogNyqmG{t6_r1=WSX)@;xwjN`lP%P>1vH52#gayCP z)=?H@@Ez}3?^F z8Xp>Dxz(FkcSMRN02oNo_kP}_$kIQATu2HY@=}7lPWc&+i|9?mZhWTvoC67s{Ct%y-aKu)xa%_V^Qn@f|B^H2S&-$H z=MW!ST_Zyiw*O)8dAxJq;|B|^SNt(?I7X*PkBxT z_dF-E(?3A#XR|w=Q~woYThcnGJlovPR(yH2fvr3`M4Ry z5*196d`B?Ng4>0#A5Pa{a2CE$fLWPB9;IZLUH!Lwqb=6DUmY_x^$eb*9wM|0`WZCM z#SIOMe7a|@(ND7bFpEc7(AvsHvwnlERTgV3S}b_oVv_ev#Y%osl75njlU$c%c1-v! z$P&beM?1idzR9`5(G(C(rj$brAwsykf(L2%#Clh4wVP*v3oCjS#f%-6!{@^zVFCYP ucpw}LPlYGKApBD3qdgryi2gX9gkcH21L5I9IV=|P;RE3_;ZtEQEdC!FvPv@m literal 0 HcmV?d00001 diff --git a/build/amsbuildlib4.py b/build/amsbuildlib4.py new file mode 100644 index 0000000..6275726 --- /dev/null +++ b/build/amsbuildlib4.py @@ -0,0 +1,813 @@ +#!/usr/bin/python3 + +import os,sys,math +import subprocess + +""" +Copyright Aaron M. Schinder, 2011 - MIT/BSD License + +This script contains a bunch of helper functions for generating simple, imperative, hopefully +transparent build scripts using the python language (and nothing else). + +I just want the script to do the compiling and linking operations I want it to do in the order +I want it to do it in, finding every relevant source file. + +That's it. That's what I want in a build system. +""" + +def flist(pth,**kwargs): + """ + flist - list all files in a given directory pth + optional arguments: + recurse - (T/F): Whether to recursively search for files in directory tree + exts - (list): A list of file extensions to search for, otherwise all files + normpath (T/F): whether to normalize path variables after + filelist = flist(pth,**kwargs): + """ + flst = [] + if(not('recurse' in kwargs)): + recurse_ = False + else: + recurse_ = kwargs['recurse'] + if(not('exts' in kwargs)): + filterexts_ = False + else: + filterexts_ = True + exts = kwargs['exts'] + if(not('normpath' in kwargs)): + normpath_ = True + else: + normpath_ = kwargs['normpath'] + if(not('linuxpath' in kwargs)): + linuxpath_ = False + else: + linuxpath_ = kwargs['linuxpath'] + if(not('followlinks' in kwargs)): + followlinks_ = False + else: + followlinks_ = kwargs['followlinks'] + + dirlist = [] + rawlist = os.listdir(pth) + + for F in rawlist: + F2 = os.path.join(pth,F) + if(os.path.isdir(F2)): + b = (followlinks_) or ((not followlinks_) and not(os.path.islink(F2))) + if(b): + if((F2!=".")&(F2!="..")): + dirlist.append(F2) + elif(os.path.isfile(F2)): + flst.append(F2) + + #Recurse through directories + if(recurse_): + for D in dirlist: + lst = flist(D,**kwargs) + for L in lst: + flst.append(L) + + #Postprocess: + #Filter out all extensions except the selected ext list + if(filterexts_): + flst = filterexts(flst,exts) + + #Normalize filename path according to os + if(normpath_): + flst2 = list(flst) + for I in range(0,len(flst2)): + flst[I] = os.path.normpath(flst2[I]) + + #If linuxpath, convert all \\ to / + #if(linuxpath_): + # flst2 = list(flst) + # for I in range(0,len(flst2)): + # flst[I] = linuxpath(flst2[I]) + + return flst + + +def filterexts(flst,exts): + """ + Filters by extensions in a list of files + flst = def filterexts(flst,exts): + """ + flst2 = [] + if(isinstance(exts,str)): + exts = list([exts]) + for F in flst: + b = False + for ext in exts: + if(ext[0]!='.'): + ext = '.'+ext + F2 = os.path.splitext(F) + if(len(F2)>=2): + ex = F2[1] + if(len(ex)>0): + if(ex[0]!='.'): + ex = '.'+ex + if(ex==ext): + b = True + if(b): + flst2.append(F) + + return flst2 + +#Find a file fname, starting in pth and recursing +#Used for finding library files to link +def findfile(fname,pth,**kwargs): + fullfname = "" + flst = flist(pth,recurse=True) + for F in flst: + F2 = os.path.split(F)[1] + if(F2 == fname): + fullfname = F + + return fullfname + +def replaceext(fname,ext): + fname2 = "" + if(len(ext)>0): + if(ext[0]!='.'): + ext = '.'+ext + fname2 = os.path.splitext(fname)[0]+ext + else: + fname2 = os.path.splitext(fname)[0] + return fname2 + +def replaceexts(fnamelist,ext): + """Takes a list of filenames and returns a list with the extensions replaced by ext """ + fname2list = [] + for F in fnamelist: + F2 = replaceext(F,ext) + fname2list.append(F2) + return fname2list + +def except_contains(lst1,exc): + """ + Takes a list of file names lst1, and removes filenams that match the + list of exceptions exc. Returns a list without the exceptions. + """ + lst2 = [] + for item in lst1: + b = 1 + for item2 in exc: + fsplit = os.path.split(item) + fn = fsplit[len(fsplit)-1] + if(fn==item2): + b = 0 + break + if(b==1): + lst2.append(item) + return lst2 + + +def list_to_sss(lst): + """List of strings to space-seperated-string""" + lout = "" + for I in range(0,len(lst)-1): + lout = lout + lst[I] + " " + if(len(lst)>0): + lout = lout + lst[len(lst)-1] + return lout + +########################## +##System Call Procedures## +########################## + +def callproc(cmd, **kwargs): + if(not('logfile' in kwargs)): + use_lf = False + else: + logfile = kwargs['logfile'] + if(logfile!=""): + fp = open(kwargs['logfile'],'a+') + use_lf = True + else: + use_lf = False + + if(not('echo' in kwargs)): + echo = True + else: + echo = kwargs['echo'] + + if(echo): + print(cmd) + + #encoding/deconding to/from bytes is necessary to use the subprocess command + #in python3.7 + #However, only do this in linux + if(sys.platform!='win32'): + cmd2 = cmd.encode(encoding='utf-8') + else: + cmd2 = cmd + proc = subprocess.Popen(cmd2,stderr = subprocess.STDOUT, stdout=subprocess.PIPE, shell=True) + (out, err) = proc.communicate() + + out = out.decode(encoding='utf-8') + + if(echo): + print(out) + #print(err); + if(use_lf): + fp.writelines(cmd+'\n') + fp.writelines(out+'\n') + + if(use_lf): + fp.close() + + +############################################# +## Compiler, Archive, and Linker Functions ## +############################################# + +#MSVC compiler wrapper +def msvc_compile(compilername, srcfile, **kwargs): + + if(not('include' in kwargs)): + include = '' + else: + include = kwargs['include'] + if(isinstance(include,list)): + include = list_to_sss(include) + + if(not('flags' in kwargs)): + flags = '' + else: + flags = kwargs['flags'] + if(isinstance(flags,list)): + flags = list_to_sss(flags) + + if(not('objext' in kwargs)): + objext = '.obj' + else: + objext = kwargs['objext'] + + if(not('srcfileflag' in kwargs)): + srcfileflag = '/c' + else: + srcfileflag = kwargs['srcfileflag'] + + if(not('outfileflag' in kwargs)): + outfileflag = '/Fo:' + else: + outfileflag = kwargs['outfileflag'] + if(not('logfile' in kwargs)): + logfile = "" + else: + logfile = kwargs['logfile'] + + outfile = replaceext(srcfile,objext) + ln = compilername+" "+flags+" "+" "+srcfileflag+" "+srcfile+" "+outfileflag+'"'+outfile+'"' + ln = ln + " " + include + + callproc(ln,echo=True,logfile=logfile) + + return + +#MSVC compiler wrapper +def msvc_compile_list(compiler,srclist,**kwargs): + for S in srclist: + msvc_compile(compiler,S,**kwargs) + return + +#gnu-style compiler compile: Should work with gcc, g++, gfortran +def gs_compile(compiler,srcfile,**kwargs): + if(not('include' in kwargs)): + include = '' + else: + include = kwargs['include'] + if(isinstance(include,list)): + include = list_to_sss(include) + + if(not('flags' in kwargs)): + flags = '' + else: + flags = kwargs['flags'] + if(isinstance(flags,list)): + flags = list_to_sss(flags) + + if(not('objext' in kwargs)): + objext = '.o' + else: + objext = kwargs['objext'] + + if(not('srcfileflag' in kwargs)): + srcfileflag = '-c' + else: + srcfileflag = kwargs['srcfileflag'] + + if(not('outfileflag' in kwargs)): + outfileflag = '-o' + else: + outfileflag = kwargs['outfileflag'] + + if(not('logfile' in kwargs)): + logfile = "" + else: + logfile = kwargs['logfile'] + + if(not('smartcompile' in kwargs)): + _smartcompile = True + else: + _smartcompile = kwargs['smartcompile'] + + #Do I want to make this thing this general? + + # if(not(_smartcompile) or smartcompile(srcfile,objext)): + # outfile = replaceext(srcfile,objext) + # ln = compiler+" "+flags+" " + outfileflag+" "+outfile+" "+srcfileflag+" "+srcfile + # ln = ln + " " + include + + # callproc(ln,echo=True,logfile=logfile) + + outfile = replaceext(srcfile,objext) + ln = compiler+" "+flags+" " + outfileflag+" "+outfile+" "+srcfileflag+" "+srcfile + ln = ln + " " + include + + callproc(ln,echo=True,logfile=logfile) + + return + +def gs_compile_list(compiler,srclist,**kwargs): + for S in srclist: + gs_compile(compiler,S,**kwargs) + return + +def gs_compile_all(compiler,srcdir,srcexts,**kwargs): + if(not('recurse' in kwargs)): + recurse = True + else: + recurse = kwargs['recurse'] + + srcfils = flist(srcdir,exts=srcexts,recurse=recurse) + + for S in srcfils: + gs_compile(compiler,S,**kwargs) + + return + +def gs_link_all(linker,srcpath,target,**kwargs): + + if(not('objext' in kwargs)): + objext = '.o' + else: + objext = kwargs['objext'] + + if(not('recurse' in kwargs)): + recurse = True + else: + recurse = kwargs['recurse'] + + + objfils = flist(srcpath,exts=objext,recurse=recurse) + oflst = list_to_sss(objfils) + + gs_link_list(linker,oflst,target,**kwargs) + + return + +def gs_link_list(linker,objlist,target,**kwargs): + + if(not('objext' in kwargs)): + objext = '.o' + else: + objext = kwargs['objext'] + + if(not('libdir' in kwargs)): + libdir = '' + else: + libdir = kwargs['libdir'] + + if(not('staticlibs' in kwargs)): + staticlibs = '' + else: + staticlibs = kwargs['staticlibs'] + + if(not('libflags' in kwargs)): + libflags = '' + else: + libflags = kwargs['libflags'] + + if(not('linkerflags' in kwargs)): + linkerflags = '' + else: + linkerflags = kwargs['linkerflags'] + + if(not('recurse' in kwargs)): + recurse = True + else: + recurse = kwargs['recurse'] + + if(not('logfile' in kwargs)): + logfile = '' + else: + logfile = kwargs['logfile'] + + ln = linker+" -o "+target+" "+libdir + ln = ln+" "+objlist+" "+staticlibs+" "+libflags+" "+linkerflags + + callproc(ln,logfile=logfile) + return + +def msvc_link_list(objlist,target,**kwargs): + + linker = 'link' + + if(not('objext' in kwargs)): + objext = '.obj' + else: + objext = kwargs['objext'] + + if(not('libdir' in kwargs)): + libdir = '' + else: + libdir = kwargs['libdir'] + + if(not('staticlibs' in kwargs)): + staticlibs = '' + else: + staticlibs = kwargs['staticlibs'] + + if(not('libflags' in kwargs)): + libflags = '' + else: + libflags = kwargs['libflags'] + + if(not('linkerflags' in kwargs)): + linkerflags = '' + else: + linkerflags = kwargs['linkerflags'] + + if(not('recurse' in kwargs)): + recurse = True + else: + recurse = kwargs['recurse'] + + if(not('logfile' in kwargs)): + logfile = '' + else: + logfile = kwargs['logfile'] + + ln = linker+" "+libdir + ln = ln+" "+objlist+" "+staticlibs+" "+linkerflags + ln = ln+" /out:"+target+" "+libflags + + callproc(ln,logfile=logfile) + + return + +def ar_all(srcpath,arname,**kwargs): + if(not('recurse' in kwargs)): + recurse = True + else: + recurse = kwargs['recurse'] + if(not('objext' in kwargs)): + objext = '.o' + else: + objext = kwargs['objext'] + + objlist = flist(srcpath,exts=objext,recurse=recurse) + ar_list(objlist,arname,**kwargs) + + return + +def msvc_lib_list(objlist,arname,**kwargs): + objlist2 = list_to_sss(objlist) + + ln = "lib "+objlist2+" /out:"+arname + callproc(ln) + + return + +def ar_list(objlist,arname,**kwargs): + objlist2 = list_to_sss(objlist) + + ln = "ar cr "+ arname+" "+objlist2 + callproc(ln) + + return + +def ar_add_list(objlist,arname,**kwargs): + objlist2 = list_to_sss(objlist) + + ln = "ar t "+arname+" "+objlist2 + callproc(ln) + return + +##################################### +## Incremental Compilation Library ## +##################################### + +#silently read lines from a text file if exists +def readtextlines(fname): + txtlns = [] + + if(not os.path.isfile(fname)): + return txtlns + + try: + fp = open(fname,"r") + except: + return txtlns + + ln = " " + while(ln!=""): + ln = fp.readline() + txtlns.append(ln) + + fp.close() + + return txtlns + +def getincludefnfrage(includeline): + + fnfrag = "" + I1 = -1 + I2 = -1 + + for I in range(0,len(includeline)): + if(I1<0 and (includeline[I]=='<' or includeline[I]=='"')): + I1 = I + if(I1>=0 and (includeline[I]=='>' or includeline[I]=='"')): + I2 = I + break + if(I1>=0 and I2>=0): + fnfrag = includeline[I1+1:I2] + + return fnfrag + +#Returns the name of the source file fname (if it exists) +#and all included filenames +def getsrcandincludes(fname, incdirs): + + flist = [] + if(os.path.isfile(fname)): + flist.append(fname) + + Ilist = 0 + while(Ilist=0): + fnfrag = getincludefnfrage(lns[J]) + for K in range(0,len(incdirs)): + tfn = os.path.join(incdirs[K],fnfrag) + if(os.path.isfile(tfn)): + flist.append(tfn) + break + + Ilist = Ilist + 1 + + return flist + +#Returns the name of the object file associated with the source file +#within the object store folder (if it exists) +def getobjfile(fname,objstore,objext = ".o"): + + fret = "" + f1 = os.path.split(fname)[1] + f2 = f1 + while(os.path.splitext(f2)[1]!=""): + f2 = os.path.splitext(f2)[0] + objext = objext.strip('.') + f3 = os.path.join(objstore,"{}.{}".format(f2,objext)) + if(os.path.exists(f3)): + fret = f3 + + return fret + +def getsrctimes(fname, incdirs): + + ftimes = [] + flst = getsrcandincludes(fname, incdirs) + for I in range(0,len(flst)): + f = flst[I] + mt = os.path.getmtime(f) + ftimes.append(mt) + + return ftimes + +def getobjtime(fname,objstore,objext=".o"): + ret = -1 + fret = getobjfile(fname,objstore,objext) + if(fret!=""): + ret = os.path.getmtime(fret) + + return ret + +#Decide whether or not to compile source file +def decidecompile(fname,**kwargs): + ret = True + + if(not os.path.isfile(fname)): + ret = False + return ret + + ##unpack kwargs + if("searchincdirs" in kwargs): + incdirs = kwargs["searchincdirs"] + else: + incdirs = ["./include"] + + if("objext" in kwargs): + objext = kwargs["objext"] + else: + objext = ".o" + if("objstore" in kwargs): + objstore = kwargs["objstore"] + else: + objstore = "./objstore" + + + srclist = getsrcandincludes(fname,incdirs) + srctlist = getsrctimes(fname,incdirs) + obj = getobjfile(fname,objstore,objext) + objt = getobjtime(fname,objstore,objext) + + if(obj!=""): + ret = False + for I in range(0,len(srctlist)): + if(srctlist[I]>objt): + ret = True + break + + return ret + +def gs_incremental_compile(compiler,srcfile,**kwargs): + + if(not('include' in kwargs)): + include = '' + else: + include = kwargs['include'] + if(isinstance(include,list)): + include = list_to_sss(include) + if(not('flags' in kwargs)): + flags = '' + else: + flags = kwargs['flags'] + if(isinstance(flags,list)): + flags = list_to_sss(flags) + if(not('objext' in kwargs)): + objext = '.o' + else: + objext = kwargs['objext'] + if(not('srcfileflag' in kwargs)): + srcfileflag = '-c' + else: + srcfileflag = kwargs['srcfileflag'] + if(not('outfileflag' in kwargs)): + outfileflag = '-o' + else: + outfileflag = kwargs['outfileflag'] + + if(not('logfile' in kwargs)): + logfile = "" + else: + logfile = kwargs['logfile'] + if(not('smartcompile' in kwargs)): + _smartcompile = True + else: + _smartcompile = kwargs['smartcompile'] + + #incrementalcompile + if("searchincdirs" in kwargs): + incdirs = kwargs["searchincdirs"] + else: + incdirs = ["./include"] + + if("objstore" in kwargs): + objstore = kwargs["objstore"] + else: + objstore = "./objstore" + + #Do I want to make this thing this general? + + docompile = decidecompile(srcfile,**kwargs) + + if(docompile): + f1 = os.path.split(srcfile)[1] + f2 = f1 + while(os.path.splitext(f2)[1]!=""): + f2 = os.path.splitext(f2)[0] + outfile = os.path.join(objstore,"{}{}".format(f2,objext)) + + ln = compiler+" "+flags+" " + outfileflag+" "+outfile+" "+srcfileflag+" "+srcfile + ln = ln + " " + include + + callproc(ln,echo=True,logfile=logfile) + + return + +def msvc_incremental_compile(compiler,srcfile,**kwargs): + + if(not('include' in kwargs)): + include = '' + else: + include = kwargs['include'] + if(isinstance(include,list)): + include = list_to_sss(include) + if(not('flags' in kwargs)): + flags = '' + else: + flags = kwargs['flags'] + if(isinstance(flags,list)): + flags = list_to_sss(flags) + if(not('objext' in kwargs)): + objext = '.obj' + else: + objext = kwargs['objext'] + if(not('srcfileflag' in kwargs)): + srcfileflag = '/c' + else: + srcfileflag = kwargs['srcfileflag'] + if(not('outfileflag' in kwargs)): + outfileflag = '/Fo' + else: + outfileflag = kwargs['outfileflag'] + + if(not('logfile' in kwargs)): + logfile = "" + else: + logfile = kwargs['logfile'] + + #incrementalcompile + if("searchincdirs" in kwargs): + incdirs = kwargs["searchincdirs"] + else: + incdirs = ["./include"] + + if("objstore" in kwargs): + objstore = kwargs["objstore"] + else: + objstore = "./objstore" + + #Do I want to make this thing this general? + + docompile = decidecompile(srcfile,**kwargs) + + if(docompile): + f1 = os.path.split(srcfile)[1] + f2 = f1 + while(os.path.splitext(f2)[1]!=""): + f2 = os.path.splitext(f2)[0] + outfile = os.path.join(objstore,"{}{}".format(f2,objext)) + outfile = os.path.normpath(outfile) + + ln = compiler+" "+flags+" "+srcfileflag+" "+srcfile+" "+ outfileflag+'"'+outfile+'"' + ln = ln + " " + include + + callproc(ln,echo=True,logfile=logfile) + + return + + +def gs_incremental_compile_list(compiler,srclist,**kwargs): + + for s in srclist: + gs_incremental_compile(compiler,s,**kwargs) + + return + +def msvc_incremental_compile_list(compiler,srclist,**kwargs): + + for s in srclist: + msvc_incremental_compile(compiler,s,**kwargs) + + return + +####################### +## Main Script Tests ## +####################### + +def testtimes(args): + if(len(args)>=2): + flist = getsrcandincludes(args[1],["./include"]) + ftlist = getsrctimes(args[1],["./include"]) + for I in range(0,len(flist)): + print("{}\t\t{}".format(flist[I],ftlist[I])) + + print("associated obj file:") + fobj = getobjfile(args[1],"./objstore") + ftobj = getobjtime(args[1],"./objstore") + if(fobj!=""): + print("{}\t\t{}".format(fobj,ftobj)) + else: + print("none found") + + cflag = decidecompile(args[1]) + print("compile? : {}".format(cflag)) + + + return + +# if(__name__ == "__main__"): + +# args = sys.argv +# testtimes(args) + + + + \ No newline at end of file diff --git a/build/make.linux64.so.py b/build/make.linux64.so.py new file mode 100644 index 0000000..e2acb08 --- /dev/null +++ b/build/make.linux64.so.py @@ -0,0 +1,67 @@ +#!/usr/bin/python3 + +import os,sys,math +import subprocess +import shutil +from shutil import copytree + +from amsbuildlib4 import * + +libname = "amscimglib4.linux64" #static library name to generate +binname = "tests" #create this executable when compiling main.c or main.cpp +commondir = "../../linux64" #common directory to pul libraries and includes from +depdir = "./dependencies/linux64" #local pre-compiled dependency libraries and their includes +installdir = "../../linux64" #directory to install to when finished +builddir = "./build_linux64" + +doinstall = True #copies the build_output to the install dir when finished +cc = "gcc" #compiler +cflags = "-fPIC -O3 -DEXPORT_TEMPLATEDLL" +libraries = "-l{}".format(libname) +libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir) +linkerflags = "-shared -Wl,-rpath=. -Wl,--out-implib={}/lib{}.a".format(builddir,libname) +srcexts = [".c",".cpp"] +binsrc = ["main.c","main.cpp"] #ignore these files when compiling the static library + +#keyword list to control the compilers/linkers +kwargs = dict() +include = "-I./include -I{}/include -I{}/include".format(commondir, depdir) +kwargs["include"] = include +kwargs["flags"] = cflags +kwargs["libdir"] = libdirs +kwargs["libflags"] = libraries +kwargs["linkerflags"] = linkerflags +kwargs["recurse"] = True +kwargs["objstore"] = "{}/objstore".format(builddir) +kwargs["searchincdirs"] = "./include" + +#Find all source files, except the main project files +srcfiles = flist('./src',exts = srcexts, recurse=True) +srcfiles = except_contains(srcfiles,binsrc) + +#compile all the source files in the list +#gs_compile_list(cc,files,**kwargs) +gs_incremental_compile_list(cc,srcfiles,**kwargs) + +#Link the resulting object files and compile to a dynamic link library +objlist = flist(kwargs['objstore'],exts='.o',recurse=True) +sobjlist = list_to_sss(objlist) +gs_link_list(cc,sobjlist,"{}/lib{}.so".format(builddir,libname),**kwargs) + +#Strip - call the strip command to remove exposed symbols in the dll +callproc("strip --strip-all --discard-all {}/lib{}.so".format(builddir,libname)) + +if(doinstall): + #Push any libraries to the common lib folder + shutil.copy( + '{}/lib{}.a'.format(builddir,libname), + "{}/lib".format(installdir) + ) + + shutil.copy( + '{}/lib{}.so'.format(builddir,libname), + "{}/lib".format(installdir) + ) + + #Copy include files to the common include folder + copytree('./include/',installdir+'/include/',dirs_exist_ok=True) diff --git a/build/make.linux64.test.py b/build/make.linux64.test.py new file mode 100644 index 0000000..b9d7147 --- /dev/null +++ b/build/make.linux64.test.py @@ -0,0 +1,49 @@ +#!/usr/bin/python3 + +import os,sys,math +import subprocess +import shutil +from shutil import copytree + +from amsbuildlib4 import * + +libname = "amscimglib4.linux64" #static library name to generate +binname = "tests" #create this executable when compiling main.c or main.cpp +commondir = "../../linux64" #common directory to pul libraries and includes from +depdir = "./dependencies/linux64" #local pre-compiled dependency libraries and their includes +installdir = "../../linux64" #directory to install to when finished +builddir = "./build_linux64" + +doinstall = False #copies the build_output to the install dir when finished +cc = "gcc" #compiler +cflags = "-fPIC -O3" +libraries = "-l{}".format(libname) +libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir) +linkerflags = "-static-libgcc -Wl,-rpath=." +srcexts = [".c",".cpp"] +binsrc = ["main.c","main.cpp"] #ignore these files when compiling the static library + +#keyword list to control the compilers/linkers +kwargs = dict() +include = "-I./include -I{}/include -I{}/include".format(commondir, depdir) +kwargs["include"] = include +kwargs["flags"] = cflags +kwargs["libdir"] = libdirs +kwargs["libflags"] = libraries +kwargs["linkerflags"] = linkerflags +kwargs["recurse"] = True +kwargs["objstore"] = "{}/objstore".format(builddir) +kwargs["searchincdirs"] = "./include" + +#Pull required binary dynamic libraries to the bin folder +#shutil.copy('{}/lib/libcamsimg3.linux64.so'.format(commondir),builddir); +#shutil.copy('{}/lib/libamsimg.dll'.format(commondir),builddir); +#shutil.copy('{}/lib/glew32.dll','./bin_winx64'); + +#Designate source files for main test program +fsrc = ['./src/main.cpp'] +fobj = replaceexts(fsrc,'.o') + +#Compile test programs +gs_compile_list(cc,fsrc,**kwargs) +gs_link_list(cc,list_to_sss(fobj),'{}/{}'.format(builddir,binname),**kwargs) diff --git a/build/make.mingw64.dll.py b/build/make.mingw64.dll.py new file mode 100644 index 0000000..8ba1547 --- /dev/null +++ b/build/make.mingw64.dll.py @@ -0,0 +1,67 @@ +#!/usr/bin/python3 + +import os,sys,math +import subprocess +import shutil +from shutil import copytree + +from amsbuildlib4 import * + +libname = "amscimglib4.mingw64" #static library name to generate +binname = "tests" #create this executable when compiling main.c or main.cpp +commondir = "../../winx64" #common directory to pul libraries and includes from +depdir = "./dependencies/winx64" #local pre-compiled dependency libraries and their includes +installdir = "../../winx64" #directory to install to when finished +builddir = "./build_mingw64" + +doinstall = False #copies the build_output to the install dir when finished +cc = "x86_64-w64-mingw32-gcc" #compiler +cflags = "-fPIC -O3 -DEXPORT_TEMPLATEDLL" +libraries = "-l{}".format(libname) +libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir) +linkerflags = "-shared -Wl,-rpath=. -Wl,--out-implib={}/lib{}.a".format(builddir,libname) +srcexts = [".c",".cpp"] +binsrc = ["main.c","main.cpp"] #ignore these files when compiling the static library + +#keyword list to control the compilers/linkers +kwargs = dict() +include = "-I./include -I{}/include -I{}/include".format(commondir, depdir) +kwargs["include"] = include +kwargs["flags"] = cflags +kwargs["libdir"] = libdirs +kwargs["libflags"] = libraries +kwargs["linkerflags"] = linkerflags +kwargs["recurse"] = True +kwargs["objstore"] = "{}/objstore".format(builddir) +kwargs["searchincdirs"] = "./include" + +#Find all source files, except the main project files +srcfiles = flist('./src',exts = srcexts, recurse=True) +srcfiles = except_contains(srcfiles,binsrc) + +#compile all the source files in the list +#gs_compile_list(cc,files,**kwargs) +gs_incremental_compile_list(cc,srcfiles,**kwargs) + +#Link the resulting object files and compile to a dynamic link library +objlist = flist(kwargs['objstore'],exts='.o',recurse=True) +sobjlist = list_to_sss(objlist) +gs_link_list(cc,sobjlist,"{}/lib{}.dll".format(builddir,libname),**kwargs) + +#Strip - call the strip command to remove exposed symbols in the dll +callproc("x86_64-w64-mingw32-strip --strip-all --discard-all {}/lib{}.dll".format(builddir,libname)) + +if(doinstall): + #Push any libraries to the common lib folder + shutil.copy( + '{}/lib{}.lib'.format(builddir,libname), + "{}/lib".format(installdir) + ) + + shutil.copy( + '{}/lib{}.dll'.format(builddir,libname), + "{}/lib".format(installdir) + ) + + #Copy include files to the common include folder + copytree('./include/',installdir+'/include/',dirs_exist_ok=True) diff --git a/build/make.mingw64.test.py b/build/make.mingw64.test.py new file mode 100644 index 0000000..5ec0cd7 --- /dev/null +++ b/build/make.mingw64.test.py @@ -0,0 +1,49 @@ +#!/usr/bin/python3 + +import os,sys,math +import subprocess +import shutil +from shutil import copytree + +from amsbuildlib4 import * + +libname = "amscimglib4.mingw64" #static library name to generate +binname = "tests" #create this executable when compiling main.c or main.cpp +commondir = "../../winx64" #common directory to pul libraries and includes from +depdir = "./dependencies/winx64" #local pre-compiled dependency libraries and their includes +installdir = "../../winx64" #directory to install to when finished +builddir = "./build_mingw64" + +doinstall = False #copies the build_output to the install dir when finished +cc = "x86_64-w64-mingw32-gcc" #compiler +cflags = "-fPIC -O3" +libraries = "-l{}".format(libname) +libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir) +linkerflags = "-static -static-libgcc -Wl,-rpath=." +srcexts = [".c",".cpp"] +binsrc = ["main.c","main.cpp"] #ignore these files when compiling the static library + +#keyword list to control the compilers/linkers +kwargs = dict() +include = "-I./include -I{}/include -I{}/include".format(commondir, depdir) +kwargs["include"] = include +kwargs["flags"] = cflags +kwargs["libdir"] = libdirs +kwargs["libflags"] = libraries +kwargs["linkerflags"] = linkerflags +kwargs["recurse"] = True +kwargs["objstore"] = "{}/objstore".format(builddir) +kwargs["searchincdirs"] = "./include" + +#Pull required binary dynamic libraries to the bin folder +#shutil.copy('{}/lib/libcamsimg3.linux64.so'.format(commondir),builddir); +#shutil.copy('{}/lib/libamsimg.dll'.format(commondir),builddir); +#shutil.copy('{}/lib/glew32.dll','./bin_winx64'); + +#Designate source files for main test program +fsrc = ['./src/main.cpp'] +fobj = replaceexts(fsrc,'.o') + +#Compile test programs +gs_compile_list(cc,fsrc,**kwargs) +gs_link_list(cc,list_to_sss(fobj),'{}/{}'.format(builddir,binname),**kwargs) diff --git a/build/make.msvc64.dll.py b/build/make.msvc64.dll.py new file mode 100644 index 0000000..e143bd1 --- /dev/null +++ b/build/make.msvc64.dll.py @@ -0,0 +1,61 @@ +#!/usr/bin/python3 + +import os,sys,math +import subprocess +import shutil +from shutil import copytree + +from amsbuildlib4 import * + +libname = "amscimglib4.msvc64" #static library name to generate +binname = "tests.exe" #create this executable when compiling main.c or main.cpp +commondir = "../../winx64" #common directory to pul libraries and includes from +depdir = "./dependencies/winx64" #local pre-compiled dependency libraries and their includes +installdir = "../../winx64" #directory to install to when finished +builddir = "./build_msvc64" + +doinstall = False #copies the build_output to the install dir when finished +cc = "cl" #compiler +cflags = "/MT /O2 /DEXPORT_TEMPLATEDLL" +libraries = "lib{}.lib".format(libname) +libdirs = "/LIBPATH:{} /LIBPATH:{}/lib /LIBPATH:{}/lib".format(builddir,commondir,depdir) +linkerflags = "/LD /link /IMPLIB:lib{}.lib".format(libname) +srcexts = [".c",".cpp"] +binsrc = ["main.c","main.cpp"] #ignore these files when compiling the static library + + +#keyword list to control the compilers/linkers +kwargs = dict() +include = "-I./include -I{}/include -I{}/include".format(commondir, depdir) +kwargs["include"] = include +kwargs["flags"] = cflags +kwargs["libdir"] = libdirs +kwargs["libflags"] = libraries +kwargs["linkerflags"] = linkerflags +kwargs["recurse"] = True +kwargs["objstore"] = "{}/objstore".format(builddir) +kwargs["searchincdirs"] = "./include" +kwargs["objext"] = ".obj" + + +#Find all source files, except the main project files +srcfiles = flist('./src',exts = srcexts, recurse=True) +srcfiles = except_contains(srcfiles,binsrc) + +#compile all the source files in the list +#gs_compile_list(cc,files,**kwargs) +msvc_incremental_compile_list(cc,srcfiles,**kwargs) + +#archive all the source files into a static library +objlist = flist(kwargs['objstore'],exts='.obj',recurse=True) +#msvc_lib_list(objlist,'{}/lib{}.lib'.format(builddir,libname)) +msvc_link_list(list_to_sss(fobj),'{}/lib{}.dll'.format(builddir,libname),**kwargs) + +if(doinstall): + #Copy a binary to the common bin folder + + #Push any libraries to the common lib folder + shutil.copy('{}/lib/lib{}.lib'.format(builddir,libname),commondir) + + #Copy include files to the common include folder + copytree('./include/',commondir+'/include/',dirs_exist_ok=True) diff --git a/build/make.msvc64.test.py b/build/make.msvc64.test.py new file mode 100644 index 0000000..d1dabce --- /dev/null +++ b/build/make.msvc64.test.py @@ -0,0 +1,49 @@ +#!/usr/bin/python3 + +import os,sys,math +import subprocess +import shutil +from shutil import copytree + +from amsbuildlib4 import * + +libname = "amscimglib4.msvc64" #static library name to generate +binname = "tests.exe" #create this executable when compiling main.c or main.cpp +commondir = "../../winx64" #common directory to pul libraries and includes from +depdir = "./dependencies/winx64" #local pre-compiled dependency libraries and their includes +installdir = "../../winx64" #directory to install to when finished +builddir = "./build_msvc64" + +doinstall = False #copies the build_output to the install dir when finished +cc = "cl" #compiler +cflags = "/MT /O2" +libraries = "lib{}.lib".format(libname) +libdirs = "/LIBPATH:{} /LIBPATH:{}/lib /LIBPATH:{}/lib".format(builddir,commondir,depdir) +linkerflags = "" +srcexts = [".c",".cpp"] +binsrc = ["main.c","main.cpp"] #ignore these files when compiling the static library + +#keyword list to control the compilers/linkers +kwargs = dict() +include = "-I./include -I{}/include -I{}/include".format(commondir, depdir) +kwargs["include"] = include +kwargs["flags"] = cflags +kwargs["libdir"] = libdirs +kwargs["libflags"] = libraries +kwargs["linkerflags"] = linkerflags +kwargs["recurse"] = True +kwargs["objstore"] = "{}/objstore".format(builddir) +kwargs["searchincdirs"] = "./include" + +#Pull required binary dynamic libraries to the bin folder +#shutil.copy('{}/lib/libcamsimg3.linux64.so'.format(commondir),builddir); +#shutil.copy('{}/lib/libamsimg.dll'.format(commondir),builddir); +#shutil.copy('{}/lib/glew32.dll','./bin_winx64'); + +#Designate source files for main test program +fsrc = ['./src/main.cpp'] +fobj = replaceexts(fsrc,'.obj') + +#Compile test programs +msvc_compile_list(cc,fsrc,**kwargs) +msvc_link_list(list_to_sss(fobj),'{}/{}'.format(builddir,binname),**kwargs) diff --git a/build_linux64/libamscimglib4.linux64.a b/build_linux64/libamscimglib4.linux64.a new file mode 100644 index 0000000000000000000000000000000000000000..7a116f9260ab7b547c4258a81099904d2f028bb3 GIT binary patch literal 12680 zcmeI3Jx&8L5QQf{AP^D)DkMPKf;yt0po(aqq6pytkdOr;Wg$vjKt)PQN{&ED$q{l9 z4!{Y(<9(A56GW8yx$yIN=6S4dTkqr1$#Jnz5E~__$~Y1^MB-`BDs=BaR{UI+Qm8GD zQ@>V2Bu!;4FVP+gxqu%pX5167!*d1M4V&4$HSa;zw4J`cL*@tV*)2{|!%+X@& zV`}|Qy-&H!I_xvo(eJPC@C=@&2xo1>IualO5+DH*AOR8}0TLhq5+DH*AOR8}0TLhq z5+DH*AOR8}0TLhq5+DH*AOR8}0TLhq5+DH*AOR8}0TLhq5+H$yfWFJ#kk2n!&l9Vb zZ)E+;c6QxqH}}ue`|e%Or7f5C-PNr~rT>t*M$@b7<$8max#w2B51!0VoRQ$a1xTpT hT6=H5iRxvqr3q&q)L`6>a`C%##W2m^fq&~C|2Oc+IS~K= literal 0 HcmV?d00001 diff --git a/build_linux64/libamscimglib4.linux64.so b/build_linux64/libamscimglib4.linux64.so new file mode 100644 index 0000000000000000000000000000000000000000..e0dc1f6882059cb05b629b22956df1509191d796 GIT binary patch literal 14040 zcmeHOU1%It6uz4uo7$RXQwIyvNny%J}t;vI^Oefh%va)~9PUt2N zb)g8>Qs{$pHkc#NbD9gRfJWerrmd2^OTtTHhwy-b7UX;RvX{M;@m>;MQb*Vr2Z-?w z5RY~FuML;^pp3WLbvP+{0>upU$uKXuHrfF;6Pu#RCEUI;k*;ZR*qOB zRofcP743X(%29TqGLkEd<#WT`mQyX4T+hjRPQ@E7Dp~Fd_X*bLyj;kt+z0TV6Mt)O zIAQo<&+QHUtT~@M+Lf4JmV6MJkNI(pIj|V>V=bbVMy-HWKr5gX&C-u!3g=+8}=ojLkt)5U=3@BES6zxxmWM38P*oKM!Lf%Oa# zPW1f1yc3PzGCZ~D-AkoD;69aF>(8azYh37}AmyJ9@^^mBuyrYOY(8`0*S(nwi}jh* zZ04IKZvzz=kOEEq+-SO;#sQzluk|<-RukKXGDmwhayN7AvbR2Syr-XxE3f#zeECjQmK6qNaJz4Tc>eRknQ!xMDMksgr(JbT@=0$KsBfL1^&pcT*xXa%$a zS^=$qRzNFodn=G?tKZ#0r@+6l8S}p1OV~*`PN;tK{Td@R{%w_8YU-d$Ra;VR>(?~# zZ?w#PkUrmE^Zno_z~+|z=GN!a>kc>7)ZUG|9(lauA?7ik{)|^M$YUop=DbFqDvcTa z*2w|gv;tZIt$U_NVgSrrZ#}vE-N7o|nz0!5(z7r)85V_5`6awhsz&o1OfXxx&=6=^uzvz0kqsVH-#R46z_FR8<=+PqG9EnrV`@;v|}Q5fq4 z?#aXG^8anPftMVAH^ulIz{mXnJjrBg*h>#S)^#7n zcuj+k`wNKsiED6+?+IsnKYe&^;NyM*;(kibALH{rdajB48Sird@!X)4prH=z&!`jU z8}d8?iivcTjque3zf%anf8%Ep{9YjdzlufyKMK~-LCKpv$8 z4L0x;d3o(%d^{)d9?&5^IcoU+01wx}q8O)ukM|$uXh#w^BRDP}zz3eDP@J!NCATv~ ztaI^3-*4c5PJuWd&+}H{BQME^eV#g;gZUf1VZ>O4&tt{g7i6$c(xVXg+agcc0Y8oy RJD$2<3eLuz)CUjlzW~JhZ2JHJ literal 0 HcmV?d00001 diff --git a/build_linux64/objstore/.placeholder b/build_linux64/objstore/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/build_linux64/objstore/amscimglib4_image.o b/build_linux64/objstore/amscimglib4_image.o new file mode 100644 index 0000000000000000000000000000000000000000..05b57b1e034f0596b2b38283779460241d1fc059 GIT binary patch literal 944 zcmbVK%}T^D5T35G?&6hOOyiBgIdY%WyJh+7K%Af#&1x5;vU{PLbiSw zvJndgVXMmUc{pUj=v2c>)yKGtzK%YyBq!c185GzWVGW@DRBYE#S&5RhLy- z%SGq(KLdxTpu221%E+lrX^mY$M;Hln=M^co8(jS{wrrvQSAT|D+A~16Ez$+?wwd!y zK1b55?Y_BPSZlX;g4`xLzMCJ0zg(HGvq^MU+h{*mOZ=;DGWQ}K^%?zv=JCaMW=GVL a0^0s6eMR^C_mFXCPt9*yajUaQuKp9-W<95r z2EKye3-~CCU||zylHFuof`uQ<&dfLS?d;xiw}r!lG0Or43-(}`DHh;eBlA5v53?`> zpYhap{J9%{{(6XRzd~_;e>c5WuC_hVPG_?$$LvhD-Al7Ko14tetxH;N9Yvo&8%Haa z$}k4-LRwVk6Vj{qRke}|3{Sl}Rxyd8{a3$%TH4b_)1l^5U5A>l z{1z5ftoL2(i58o^1*}b?{d#-M@6ZV8-a1_9t~yRIp*>CglWa2YW$KTykN&T`>{rg0 z2VIiH6nZ+R(kp({Y?8duf;jE10MqE{jZ8i5YrY*xY&n025)G0bF!LCV(%;L*`k=EP GnED^RIbI?F literal 0 HcmV?d00001 diff --git a/build_linux64/objstore/amscimglib4_tests.o b/build_linux64/objstore/amscimglib4_tests.o new file mode 100644 index 0000000000000000000000000000000000000000..15550e89f3dd7a9fd9e05c383092a0eceb7977bb GIT binary patch literal 944 zcmbVK%}T>S5T4Zfd(xAFmv~aaE=h?O4-zP~7x7l`CP@sn*!TmP z5s9D|Ho6R-`+X5arv}!lF2-H-b@b8A7&-t;!q(7#GdjKt?;ow6q>$OPn9QbWbfPgv%dS2D} zTrFCs{~0($1>I%CQN~Wqr8Ra99bqKQomZ^cc5wB_*s_KGU;PS5T4Zfd(w*tUgAjwyCkJvJV>C_Uc_6$ny+JFpEf9gi>ElUdXjvUPo5 zjD$DvTUGkc!=dm-ry5qOKE_@2b@b`Y40-@d!q(7#GdjKx?;o9>FmK{CpJ!<_x@%>c ziMXl&M6<|c7-5$6DnIZ_CQlN?eJDc^QPY5k%REmC#EMcT0zYcd$S{7?^}J|BRhLy# z%SGq#zXOLTp}TBY(!i>@G{&x=BaDRE^9mH(4YvLmTei^ut3N|6?dhSL7U+U_)A)SO z=ScF}?90r;Slhi5~rkg;b^&2L(9t1~BC{|PihJ$C>A literal 0 HcmV?d00001 diff --git a/build_linux64/tests b/build_linux64/tests new file mode 100644 index 0000000000000000000000000000000000000000..a6377f8660f5c5a9a3aa832b2f4a8d140b1b13c5 GIT binary patch literal 15776 zcmeHOU2I%O6`r*d;?g8`+?cpY+N?^UHH~j}9mg^yChPbo*Ol{wM}4xi-V3q~NoCk|9W`ezl8^ zcc_EvePnOboGDKkpi+~rH*Lli;hPCr*U6a%c+k+)f=TEhBkQ(GYuil;P|10)P8W#{ z9ylfq0KwPWi%W|Ud`W0vSjVwh={6241Di1+ap@O?j!o9BiEd4Fz*nW8K*W<{!k>PL zXA~1u#t9hJ&5ACH!$zin+ygzp{&vfT=#p-m2&n!{EK(yf4$=`pS<{|*w?<-^~Uor-1Du&?8E(L4f}B7`Y=S;<~+B_ zJ|-Stpqz|t!fV-I6*RHMf$MK?P&PtbyaDfT!Ov~MbHDCtP>=Gw^t|s)=Zbzl_i&a> z3UJ!11b#X23VyDr*yi~5sZ--)Cx^Tqr^h)~&mZkoj`GGPPkWhcIXjc91ljWB>7jh7 zn4R>e@?7Cep;VL#J>%NYkz*Lse;nHwS=?WYm+Jo9EgW?of6Tr3%$F(5P4vVw3HLGX zpTr)+ugZN2eoZQDNttr+u&zT;l{Ym58j_TL^+%6)t}XsW&HUixv%RUM$(v1f_C zQTxzy1g(d(KUqJ}*09khm#LbeDebUi#zOxyg~_a`I>H<$-H8 zN*!rZ{$tvKKk-Y%xRR5^gAVG-DCemwx71cz4=r-VR|U!cLG6ERf}v~OU0QQr ze&dAu^37&9_KJILJ=jYXbVvm)wH4|b^%HvT-{JrltLl9h+)D#D9Ll;&uLV2ZCkNgl zWA%3G=4yrxuWWyv?AT{WyGj4&hp3QL_1M*;MWjtO0yY9R0yY9R0yY9R0yY9R0yY9R z0yY9R0{@2*;P+p#1I-`1m-@!4^sAW-|*nj^= zj^3?b7qXt){U-b<&xthweZETk4km1}5wH=k5wH=k5wH=k5wH=k5wH=k5wHtgFgxa3Q3g7x_zuJrR)+c)HV-WD7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@nKu>}K2_7e8?9NXEC=rL_mpIbOgeCei zPzYHHYr)BUh`tK^EDp#OeG%y7;sPoaD;QhJ0OhVzP<$<>MB_xPS9qEh!gGZ zPR^k^$0gd?yap2OIWEzzK8h|`qQ0iAarqsnbgN~FZb)3B-Ar$a{!1GB_) zvbo!73}G0e(b|zjcNsU9DZxKG@c)+0m{W5ZV}(+~W6n~M(W?TC)tvgm3R|v-V}ZXL CY61iR literal 0 HcmV?d00001 diff --git a/build_mingw64/objstore/ams_template_cppdll_template.o b/build_mingw64/objstore/ams_template_cppdll_template.o new file mode 100644 index 0000000000000000000000000000000000000000..605096d03d45f4632a9968ee930be3cecbd9e9f7 GIT binary patch literal 1459 zcmbVMPiqrV5TDIPqs2l*Jopdxu!kzT*=%YE;vuD#ZZVbxBa|9=`M0SH$#zNBw&WyM zggq4c8N@Fjc<~ldJoy0xZyrR!k092W_jZ%rG`)0S=kM>$ycynX`}G_UjZy&DxRwUZ zxA%Om3zkLkRsyIYhKPg$R$Xg1{08@&%*tSmwB}%NGD1XNATGC^;?f}|%23Yg<=o=k$mEi6S;V~xu`=3()B4FqsNd_;`M@e`dr4dxakr1*FrSyi zQC%HzZ{l?U?^i5hWI_t6_mAbX%I3j5fqoM^L|UpoHuwLO%!8V`VFp!oV=egl0p|pj zU`4H0f{Oag3~K7a(PcWZ7JRD&Kg{6cFS5-2&!wkJwNI2MA}J$7rYY;G5g`Cpgn+6& z@RiPUx8*zAt~Li$f{6MdT3uegr!1_lKe?&o^*g(cTQC$uHw-!en8c>g0a>EiMEL|Xz9kfqXJn3V2z5LQL)qRDLpp<> zsKrgrqN-m)*V!>f%#hrKiNAI}O^M!nlHxC&W-UuJwgYX6XR??ZcN90uyeYLG3N9<##p1(_nEWZWVCz0 PSkG~{cG*rxG!Fj(8j{CT literal 0 HcmV?d00001 diff --git a/build_msvc64/objstore/.placeholder b/build_msvc64/objstore/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/build_msvc64/objstore/amscpptemplate25a_src2.obj b/build_msvc64/objstore/amscpptemplate25a_src2.obj new file mode 100644 index 0000000000000000000000000000000000000000..1e8b96cea73ae0e091922befc6374bed203d654e GIT binary patch literal 2367 zcma)7U2GIp6u!f@wG^w16l?);Xa*G{u(wX^PSTX(m#*0sa_w$twJtUI%9 z(ZpbgXfu)!O*Fo!4;n$mzhHuiMw23>#HfLoXiRwW0irK}X+$6DId^8av)lM{l6&tt z-~G-xcka)b)RAU#{nI}uJL(C!ml(pQis_^_n>J070A>5SvSp4B!1UP0iKQ!{FBcO}FWXp1#G(gb_MvYq`df6(6_ z@<&3hs7LH;mptL96p4EMLy|u-B#rvLJ}ENn^Z5JyzHnrpqn+*a`ubfX!D!I$?rVq6 z6N=V=LqYGLE98r`vzYWMv=h)~2(u9e(%%=GQ;IWcA)ZXzdJrd3TTrq}W$wV3SUVV?Anhc_~CufHdo zh@BjlNo5Sl$)chv8I8Rsyqg^=XmU<|O3qKR9wk?R#T0Rk;?ZUtu3(3^=x%6r^jvVy z>tG(96KpEZaR#yw;~K?ljeZ=sRzhu%&#aUqB~qMSXr;N@C_V6u_@G?l2| z5RYoy*k|~L%&0%o(YJRAR|GlFiTcG#PE0cK_~LG$-%5k;f!;_s0Gg4IX=x-asV34A zT~AuNK@ZytFiG%1mIWV^4Yq_3Lu&-Bm14}cI6|EQj?WD+r>AL=9N?1FSR}J(YelJXHEvB=fb<*PcA<>UUGlgdHFT>-V2M% z?{2jpmM%@~_+-n$UrQ^Y_ud(KD1YH3=@|U*P5Ifrxv!4|HZ4sD^rCd_{M+A7LmDa_ zzr1wnt(C2*vMnUx2Jmv~xLnVytl(D(nRHy^9gbrRIb)?a@G-R;m3PoW3UXNYa%N+u%=y)UWeAa^tdfjpB~?qw zie#Liq(EU*@+wTmlSNIEm4t+k5^RG8ZzZSXrP+*m;uTHG5@&S*mo#|NnS7T3upm6< z8XFrYTq!>%=Tn^3jibNcYRIISNlb=mIVG&#u*eAf4dRn&!MVrj{I`!0ga?IgDc~YN i^9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@4tN}5e=nlenKA+^=;X-GSrrgx z6F8-x?umHqQBi!+f8@v*2&Me2 znokSPQ3Ct_Rzo(;&S5j`mQNw+#yLjucaWIKh`s|p-@mOz6rT~hlmR~=Eg&l1UcWdb X1?9fO;Q^5}$9JeKI=(Jnw+Md&HFveZ literal 0 HcmV?d00001 diff --git a/dependencies/README_PrecompiledDependencies.txt b/dependencies/README_PrecompiledDependencies.txt new file mode 100644 index 0000000..72564c1 --- /dev/null +++ b/dependencies/README_PrecompiledDependencies.txt @@ -0,0 +1,11 @@ + +This is a folder containing precompiled dependencies for this project from external libraries. + +A list of libraries, their sources and licenses is given below: + +LIBRARY LIST: + + +A list of each library's own depenencies is given below: + +LIBRARY DEPENDENCY LIST: diff --git a/dependencies/linux64/bin/.placeholder b/dependencies/linux64/bin/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/linux64/include/.placeholder b/dependencies/linux64/include/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/linux64/lib/.placeholder b/dependencies/linux64/lib/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/winx64/bin/.placeholder b/dependencies/winx64/bin/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/winx64/include/.placeholder b/dependencies/winx64/include/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/dependencies/winx64/lib/.placeholder b/dependencies/winx64/lib/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/include/amscimglib4/amscimglib4.h b/include/amscimglib4/amscimglib4.h new file mode 100644 index 0000000..a586d72 --- /dev/null +++ b/include/amscimglib4/amscimglib4.h @@ -0,0 +1,70 @@ +#ifndef __AMSCIMGLIB4_H__ +#define __AMSCIMGLIB4_H__ + +#include +#include +#include + +#ifdef _WIN32 + #ifdef EXPORT_AMSCIMGLIB4 + #define AMSCIMGLIB4_API __declspec(dllexport) + #else + #define AMSCIMGLIB4_API __declspec(dllimport) + #endif +#else + //#define AMSCPPDLL_API __attribute__((visibility("default"))) + #define AMSCIMGLIB4_API +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +AMSCIMGLIB4_API int amscppdlltemplate_exportedtestfn(int a, int b); + +static const int amscimglib4_success = 0; +static const int amscimglib4_failure = -1; + + +// Main Dynamic Image Structure +//bytebuf contans RGBARGBA information in the following order: +//to access pixel [I,J] color C, [I+J*sizex]*4+C +typedef struct amscimglib4_image +{ + int sizex; + int sizey; + unsigned char *bytebuf; //size 4*sizex*sizey, [color + I*4 + J*4*sizex] +} amscimglib4_image; + +AMSCIMGLIB4_API int amscimglib4_image_new(amscimglib4_image **imgptr, int _sizex, int _sizey); + + +AMSCIMGLIB4_API int amscimglib4_image_delete(amscimglib4_image **imgptr); + + +AMSCIMGLIB4_API int amscimglib4_image_resize(amscimglib4_image *imgptr, int _sizex, int _sizey); + +//sets all pixels in the image to (0,0,0,0) +AMSCIMGLIB4_API void amscimglib4_image_clear(amscimglib4_image *imgptr); + +//copies an image from one image struct to another +//resizes imgto +//AMSIMG_API void amsimg_copy_image(amsimg_image *imgfrom, amsimg_image *imgto); +AMSCIMGLIB4_API int amscimglib4_copy_image(const amscimglib4_image *imgfrom, amscimglib4_image *imgto); + + + +////////////////////////////////////////////// +// Some limited image manipulation routines // +////////////////////////////////////////////// + +//transposes an image +AMSCIMGLIB4_API int amscimglib4_transpose_image(amscimglib4_image *img); + + + +#ifdef __cplusplus +}; // end extern "C" +#endif + +#endif \ No newline at end of file diff --git a/include/amscimglib4/amscimglib4_intl.h b/include/amscimglib4/amscimglib4_intl.h new file mode 100644 index 0000000..00d0781 --- /dev/null +++ b/include/amscimglib4/amscimglib4_intl.h @@ -0,0 +1,11 @@ +#ifndef __AMSCIMGLIB4_INTL_HPP__ +#define __AMSCIMGLIB4_INTL_HPP__ + +#include + +//returns the size of a file using ANSI C +unsigned int amscimglib4_filesize(FILE *fp); + + +#endif + diff --git a/include/amscimglib4/amscimglib4_tests.h b/include/amscimglib4/amscimglib4_tests.h new file mode 100644 index 0000000..47c1e36 --- /dev/null +++ b/include/amscimglib4/amscimglib4_tests.h @@ -0,0 +1,7 @@ +#ifndef __AMSCIMGLIB4_TESTS_HPP__ +#define __AMSCIMGLIB4_TESTS_HPP__ + +void amscimglib4_test_init(); + +#endif + diff --git a/make_linux.py b/make_linux.py new file mode 100644 index 0000000..59a62ee --- /dev/null +++ b/make_linux.py @@ -0,0 +1,22 @@ +#!/usr/bin/python3 + +import os,sys,math +from build.amsbuildlib4 import * + +if(len(sys.argv)>=2): + if(sys.argv[1]=="clean"): + obj_list = flist('./build_linux64',recurse=True,exts=['.o']) + for o in obj_list: + os.remove('{}'.format(o)) + exit() + +os.system('python3 ./build/make.linux64.so.py') +os.system('python3 ./build/make.linux64.test.py') + +obj_list = flist('./src',recurse=True,exts=['.o']) +for o in obj_list: + os.remove('{}'.format(o)) + +os.chdir('./build_linux64') +callproc('./tests') +os.chdir('..') diff --git a/make_mingw.py b/make_mingw.py new file mode 100644 index 0000000..aa3e847 --- /dev/null +++ b/make_mingw.py @@ -0,0 +1,28 @@ +#!/usr/bin/python3 +#!/usr/bin/python3 + +import os,sys,math +from build.amsbuildlib4 import * + +if(len(sys.argv)>=2): + if(sys.argv[1]=="clean"): + obj_list = flist('./build_mingw64',recurse=True,exts=['.o']) + for o in obj_list: + os.remove('{}'.format(o)) + exit() + +os.system('python3 ./build/make.mingw64.dll.py') +os.system('python3 ./build/make.mingw64.test.py') + +obj_list = flist('./src',recurse=True,exts=['.o']) +for o in obj_list: + os.remove('{}'.format(o)) + +if(sys.platform!="win32"): + os.chdir('./build_mingw64') + callproc('wine ./tests.exe') + os.chdir('..') +else: + os.chdir('./build_mingw64') + callproc('tests.exe') + os.chdir('..') diff --git a/make_msvc.py b/make_msvc.py new file mode 100644 index 0000000..f391353 --- /dev/null +++ b/make_msvc.py @@ -0,0 +1,23 @@ +#!/usr/bin/python3 +#!/usr/bin/python3 + +import os,sys,math +from build.amsbuildlib4 import * + +if(len(sys.argv)>=2): + if(sys.argv[1]=="clean"): + obj_list = flist('./build_msvc64',recurse=True,exts=['.o']) + for o in obj_list: + os.remove('{}'.format(o)) + exit() + +os.system('python3 ./build/make.msvc64.dll.py') +os.system('python3 ./build/make.msvc64.test.py') + +obj_list = flist('./src',recurse=True,exts=['.o','.obj']) +for o in obj_list: + os.remove('{}'.format(o)) + +os.chdir('./build_msvc64') +callproc('tests.exe') +os.chdir('..') \ No newline at end of file diff --git a/notes/.placeholder b/notes/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/pull.sh b/pull.sh new file mode 100644 index 0000000..5067c4d --- /dev/null +++ b/pull.sh @@ -0,0 +1,3 @@ +#!/usr/bin/bash + +scp aschinder@amssolarempire.com:workspace/projects/amscimglib4.tar.gz ../tar xzvf ../amscimglib4.tar.gz ./ diff --git a/src/amscimglib4/amscimglib4_image.cpp b/src/amscimglib4/amscimglib4_image.cpp new file mode 100644 index 0000000..2432fb8 --- /dev/null +++ b/src/amscimglib4/amscimglib4_image.cpp @@ -0,0 +1,12 @@ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + + +#ifdef __cplusplus +}; //end extern "C" +#endif \ No newline at end of file diff --git a/src/amscimglib4/amscimglib4_templatetest.cpp b/src/amscimglib4/amscimglib4_templatetest.cpp new file mode 100644 index 0000000..5a46fc0 --- /dev/null +++ b/src/amscimglib4/amscimglib4_templatetest.cpp @@ -0,0 +1,15 @@ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +AMSCIMGLIB4_API int amscimglib4_exportedtestfn(int a, int b) +{ + return a*a+b*b; +} + +#ifdef __cplusplus +}; //end extern "C" +#endif \ No newline at end of file diff --git a/src/amscimglib4/amscimglib4_tests.cpp b/src/amscimglib4/amscimglib4_tests.cpp new file mode 100644 index 0000000..2432fb8 --- /dev/null +++ b/src/amscimglib4/amscimglib4_tests.cpp @@ -0,0 +1,12 @@ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + + +#ifdef __cplusplus +}; //end extern "C" +#endif \ No newline at end of file diff --git a/src/amscimglib4/amscimglib4_util.cpp b/src/amscimglib4/amscimglib4_util.cpp new file mode 100644 index 0000000..2432fb8 --- /dev/null +++ b/src/amscimglib4/amscimglib4_util.cpp @@ -0,0 +1,12 @@ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + + +#ifdef __cplusplus +}; //end extern "C" +#endif \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..f991a05 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,9 @@ +#include +#include + +int main(int argc, char* argv[]) +{ + int ret = 0; + + return ret; +} \ No newline at end of file