Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
JPSvis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JuPedSim
JPSvis
Commits
679b1ba8
Verified
Commit
679b1ba8
authored
6 years ago
by
Mohcine Chraibi
Browse files
Options
Downloads
Patches
Plain Diff
update deplot script
parent
1838f1fa
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
checkDependencies.py
+11
-10
11 additions, 10 deletions
checkDependencies.py
deployAPPLE.sh
+4
-59
4 additions, 59 deletions
deployAPPLE.sh
with
15 additions
and
69 deletions
checkDependencies.py
+
11
−
10
View file @
679b1ba8
# some vtk libs depend on python.
# correct this dependency and make it point to local python.
import
glob
2
import
glob
import
subprocess
import
shlex
import
os
...
...
@@ -16,13 +16,14 @@ PATH = sys.argv[1] + "/Contents/Frameworks"
CMD
=
"
jpsvis
"
# PATH = "./bin/%s.app/Contents/Frameworks" % CMD
# PATH = "/Volumes/jpsvis\ 0.7.0/jpsvis.app/Contents/Frameworks/"
dependencies
=
glob
2
.
glob
(
"
%s/**/*.dylib
"
%
PATH
)
dependencies
=
glob
.
glob
(
"
%s/**/*.dylib
"
%
PATH
)
print
(
"
VTK dependencies:
"
,
len
(
dependencies
))
#VTK_LIBS
for
vtklib
in
dependencies
:
print
"
lib: <%s>
"
%
vtklib
print
(
"
lib: <%s>
"
%
vtklib
)
cmd
=
"
otool -L %s
"
%
vtklib
f
=
open
(
"
blah.txt
"
,
"
w
"
)
...
...
@@ -36,11 +37,11 @@ for vtklib in dependencies:
and
not
line
.
startswith
(
"
/System
"
)
\
and
not
line
.
startswith
(
"
@executable_path
"
):
print
"
%s >> <%s> %s
"
%
(
RED
,
line
.
split
()[
0
],
NC
)
print
(
"
%s >> <%s> %s
"
%
(
RED
,
line
.
split
()[
0
],
NC
)
)
change
=
"
install_name_tool -change %s @executable_path/../Frameworks/Python.framework/Versions/3.5/Python %s
"
%
(
line
.
split
()[
0
],
vtklib
)
print
"
<%s>
"
%
change
print
(
"
<%s>
"
%
change
)
res
=
subprocess
.
call
(
shlex
.
split
(
change
))
raw_
input
(
"
pause ...
"
)
input
(
"
pause ...
"
)
f
.
close
()
...
...
This diff is collapsed.
Click to expand it.
deployAPPLE.sh
+
4
−
59
View file @
679b1ba8
RED
=
'\033[0;31m'
NC
=
'\033[0m'
# No Color
CMD
=
"jpsvis"
VERSION
=
0.8.4
if
[
-d
build
]
;
then
echo
"INFO: found build directory"
echo
"INFO:
${
RED
}
rm build
${
NC
}
"
rm
-rf
build
echo
"INFO: mkdir build"
mkdir
build
fi
echo
"INFO: cd build"
cd
build
echo
"INFO: actual directory:
${
PWD
}
"
if
[
-d
../bin
]
;
then
echo
"INFO: found bin directory"
echo
"INFO:
${
RED
}
remove ./bin directory
${
NC
}
"
rm
-rf
../bin
fi
echo
"INFO: cmake .."
cmake ..
echo
"INFO: make .."
make
-j4
echo
"INFO: running <dylibbundler -od -b -x ../bin/
${
CMD
}
.app/Contents/MacOS/
${
CMD
}
-d ../bin/
${
CMD
}
.app/Contents/libs/>"
dylibbundler
-od
-b
-x
../bin/
${
CMD
}
.app/Contents/MacOS/
${
CMD
}
-d
../bin/
${
CMD
}
.app/Contents/libs/
# dylibbundler has a problem linking to local python framework. So this quick fix..
isPythonDependencyGlobal
=
`
otool
-L
../bin/
${
CMD
}
.app/Contents/MacOS/
${
CMD
}
|
grep
Python.framework
`
echo
"isPythonDependencyGlobal: <
$isPythonDependencyGlobal
>"
if
[[
-n
$isPythonDependencyGlobal
]]
;
then
if
[[
!
$isPythonSWDependencyGlobal
==
*
"@executable_path"
*
]]
;
then
#install_name_tool -change /usr/local/opt/python3/Frameworks/Python.framework/Versions/3.5/Python
# @executable_path/../Frameworks/Python.framework/Versions/3.5/Python
# ./bin/jpsvis.app/Contents/MacOS/jpsvis
Python
=
`
echo
${
isPythonDependencyGlobal
}
| xargs |
awk
'{print $1}'
`
echo
"WARNING:
${
RED
}
<
$Python
> is not relative to
${
CMD
}
${
NC
}
."
Frameworks
=
`
echo
${
Python
}
|
awk
-F
Frameworks
'{ print "Frameworks"$2 }'
`
echo
"WARNING:
${
RED
}
change <
$Python
> to <@executable_path/../
$Frameworks
>
${
CMD
}
${
NC
}
."
install_name_tool
-change
$Python
@executable_path/../
$Frameworks
../bin/
${
CMD
}
.app/Contents/MacOS/
${
CMD
}
echo
"INFO: Check again"
otool
-L
../bin/
${
CMD
}
.app/Contents/MacOS/
${
CMD
}
|
grep
Python.framework
echo
"-----------------"
fi
fi
#cd ..
# check if dependencies to libs are local to .app
python checkDependencies.py
python checkDependencies.py
bin/jpsvis.app/
appdmg Resources/dmg.json
{
CMD
}
-
0
.8.1
.dmg
appdmg Resources/dmg.json
$
{
CMD
}
-
${
VERSION
}
.dmg
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment