Skip to content

Commit

Permalink
added platform support (i686, x64)
Browse files Browse the repository at this point in the history
  • Loading branch information
germanysources committed Sep 13, 2019
1 parent 1ad0268 commit 3bdf3c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fosss.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def execute(cmd_parts):

execute([
'java -cp \"%s\"' % classpath_sep.join(jars),
'-Djava.library.path=.',
'-Djava.library.path=%s' % platform.machine(),
'-Djava.util.logging.config.file=log.properties',
javaclass,
searchTerm,
Expand Down
9 changes: 7 additions & 2 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,18 @@ def execute(cmd_parts):

execute([javah, '-classpath', classpath, '-o', HeaderFile, 'org.RepositorySearch.Console'])

#make directory for compiled-library
if not os.access(platform.machine(), os.F_OK):
os.mkdir(platform.machine())


output = ''
gcc_command = ''
if is_windows:
output = 'ConsoleWidth.dll'
output = join(platform.machine(), 'ConsoleWidth.dll')
gcc_command = 'gcc -Wl,--add-stdcall-alias'
else:
output = 'libConsoleWidth.so'
output = join(platform.machine(), 'libConsoleWidth.so')
gcc_command = 'gcc -std=c99 -fPIC'

execute([gcc_command,
Expand Down
2 changes: 1 addition & 1 deletion runMain.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def execute(cmd_parts):

execute([
'java -cp \"%s\"' % classpath_sep.join(jars),
'-Djava.library.path=.',
'-Djava.library.path=%s' % platform.machine(),
'-Djava.util.logging.config.file=log.properties',
javaclass,
searchTerm,
Expand Down

0 comments on commit 3bdf3c9

Please sign in to comment.