Skip to content

Commit

Permalink
Merge c2e8949 into 9f90a3b
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Dec 12, 2019
2 parents 9f90a3b + c2e8949 commit 9330ec2
Show file tree
Hide file tree
Showing 68 changed files with 3,090 additions and 245 deletions.
2 changes: 1 addition & 1 deletion clean
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

"$(cd "$(dirname "$0")"; pwd)/scripts/genericclean"
$(cd $(dirname $0); pwd)/scripts/genericclean
2 changes: 1 addition & 1 deletion clean.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@ECHO OFF

CALL "%~dp0scripts\genericclean"
CALL %~dp0scripts\genericclean
2 changes: 1 addition & 1 deletion cleanall
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

"$(cd "$(dirname "$0")"; pwd)/scripts/genericclean" all
$(cd $(dirname $0); pwd)/scripts/genericclean all
2 changes: 1 addition & 1 deletion cleanall.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@ECHO OFF

CALL "%~dp0scripts\genericclean" all
CALL %~dp0scripts\genericclean all
8 changes: 4 additions & 4 deletions distrib/windows/application.vbs.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
args = ""
Args = ""

For Each arg in WScript.Arguments
args = args&" "&arg
For Each Arg in WScript.Arguments
Args = Args&" "&Arg
Next

cmd = Left(Wscript.ScriptFullName, Len(Wscript.ScriptFullName)-Len(Wscript.ScriptName))&"bin\${CMAKE_PROJECT_NAME}.exe"&args
cmd = Left(Wscript.ScriptFullName, Len(Wscript.ScriptFullName)-Len(Wscript.ScriptName))&"bin\${CMAKE_PROJECT_NAME}.exe"&Args

CreateObject("WScript.Shell").Run cmd, 1, False
12 changes: 6 additions & 6 deletions distrib/windows/jupyterlab.vbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Set shell = CreateObject("WScript.Shell")
appDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
updatePythonPath = appDir&"\Python\bin\Python.exe "&appDir&"\Python\Scripts\set_python_path.py "&appDir&"\Python -s"
Set Shell = CreateObject("WScript.Shell")
AppDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
UpdatePythonPath = AppDir&"\Python\bin\Python.exe "&AppDir&"\Python\Scripts\set_python_path.py "&AppDir&"\Python -s"

shell.Run updatePythonPath, 0, True
Shell.Run UpdatePythonPath, 0, True

cmd = appDir&"\Python\bin\Python.exe "&appDir&"\Python\Scripts\start_jupyter.py lab --ip 127.0.0.1"
Cmd = AppDir&"\Python\bin\Python.exe "&AppDir&"\Python\Scripts\start_jupyter.py lab --ip 127.0.0.1"

shell.Run cmd, 1, False
Shell.Run Cmd, 1, False
12 changes: 6 additions & 6 deletions distrib/windows/jupyternotebook.vbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Set shell = CreateObject("WScript.Shell")
appDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
updatePythonPath = appDir&"\Python\bin\Python.exe "&appDir&"\Python\Scripts\set_python_path.py "&appDir&"\Python -s"
Set Shell = CreateObject("WScript.Shell")
AppDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
UpdatePythonPath = AppDir&"\Python\bin\Python.exe "&AppDir&"\Python\Scripts\set_python_path.py "&AppDir&"\Python -s"

shell.Run updatePythonPath, 0, True
Shell.Run UpdatePythonPath, 0, True

cmd = appDir&"\Python\bin\Python.exe "&appDir&"\Python\Scripts\start_jupyter.py notebook --ip 127.0.0.1"
Cmd = AppDir&"\Python\bin\Python.exe "&AppDir&"\Python\Scripts\start_jupyter.py notebook --ip 127.0.0.1"

shell.Run cmd, 1, False
Shell.Run Cmd, 1, False
4 changes: 2 additions & 2 deletions doc/downloads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ var jsonData = { "versions": [
}
],
"changes": [
{ "change": "<strong>General:</strong> added (initial) support for <a href=\"https://python.org/\">Python</a> (see issue <a href=\"https://github.com/opencor/opencor/issues/1255\">#1255</a>). Replaced our use of <a href=\"https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/Introduction/Introduction.html\">PackageMaker</a> with that of productbuild on <a href=\"https://en.wikipedia.org/wiki/MacOS\">macOS</a> (see issue <a href=\"https://github.com/opencor/opencor/issues/2210\">#2210</a>). A selectable plugin cannot be needed by another plugin (see issue <a href=\"https://github.com/opencor/opencor/issues/2247\">#2247</a>)." },
{ "change": "<strong>Python support:</strong> now update the environment variable <code>PATH</code> using <code>\\</code> rather than <code>/</code> on Windows (see issue <a href=\"https://github.com/opencor/opencor/issues/2219\">#2219</a>). Merged our duplicated code (see issue <a href=\"https://github.com/opencor/opencor/issues/2225\">#2225</a>). Don't make our JupyterKernel and PythonShell plugins selectable (see issue <a href=\"https://github.com/opencor/opencor/issues/2245\">#2245</a>). Make sure that \"implementation\" and \"implementation_version\" are properly set in the JupyterKernel plugin (see issue <a href=\"https://github.com/opencor/opencor/issues/2250\">#2250</a>)." },
{ "change": "<strong>General:</strong> Replaced our use of <a href=\"https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/Introduction/Introduction.html\">PackageMaker</a> with that of productbuild on <a href=\"https://en.wikipedia.org/wiki/MacOS\">macOS</a> (see issue <a href=\"https://github.com/opencor/opencor/issues/2210\">#2210</a>). A selectable plugin cannot be needed by another plugin (see issue <a href=\"https://github.com/opencor/opencor/issues/2247\">#2247</a>)." },
{ "change": "<strong>Python support:</strong> added (initial) support for <a href=\"https://python.org/\">Python</a> (see issue <a href=\"https://github.com/opencor/opencor/issues/1255\">#1255</a>). Added some <a href=\"https://python.org/\">Python</a>-based tests (see issue <a href=\"https://github.com/opencor/opencor/issues/2178\">#2178</a>). Now update the environment variable <code>PATH</code> using <code>\\</code> rather than <code>/</code> on Windows (see issue <a href=\"https://github.com/opencor/opencor/issues/2219\">#2219</a>). Merged our duplicated code (see issue <a href=\"https://github.com/opencor/opencor/issues/2225\">#2225</a>). Don't make our JupyterKernel and PythonShell plugins selectable (see issue <a href=\"https://github.com/opencor/opencor/issues/2245\">#2245</a>). Make sure that \"implementation\" and \"implementation_version\" are properly set in the JupyterKernel plugin (see issue <a href=\"https://github.com/opencor/opencor/issues/2250\">#2250</a>)." },
{ "change": "<strong>CellML support:</strong> fixed an issue with the CellML API wrongly allowing code generation for non-runnable models (see issue <a href=\"https://github.com/opencor/opencor/issues/2240\">#2240</a>)." },
{ "change": "<strong>SED-ML support:</strong> added support left and right triangle symbols (see issue <a href=\"https://github.com/opencor/opencor/issues/2173\">#2173</a>)." },
{ "change": "<strong>Simulation support:</strong> don't require all our solvers to be installed anymore (see issue <a href=\"https://github.com/opencor/opencor/issues/2234\">#2234</a>)." },
Expand Down
6 changes: 3 additions & 3 deletions format
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/sh

appDir="$(cd "$(dirname "$0")"; pwd)"
appDir=$(cd $(dirname $0); pwd)

if [ -d "${appDir}/src" ]; then
if [ -d $appDir/src ]; then
echo "\033[44;37;1mFormatting OpenCOR...\033[0m"

if [ "`hash clang-format 2>&1`" = "" ]; then
for i in `find ${appDir}/src -name "*.cpp" -o -name "*.h" | sort | egrep -v "(3rdparty|\/ext\/|\/qzip)"`; do
for i in `find $appDir/src -name "*.cpp" -o -name "*.h" | sort | egrep -v "(3rdparty|\/ext\/|\/qzip)"`; do
echo "Formatting $i..."

clang-format -i -style=file $i
Expand Down
6 changes: 3 additions & 3 deletions format.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
SET AppDir=%~dp0
SET OrigDir=%CD%

IF EXIST "%AppDir%src" (
IF EXIST %AppDir%src (
TITLE Formatting OpenCOR...

FOR %%X IN (clang-format.exe) DO (
SET ClangFormatFound=%%~$PATH:X
)

IF DEFINED ClangFormatFound (
CD "%AppDir%src"
CD %AppDir%src

FOR /R %%I IN (*.cpp *.h) DO (
ECHO.%%I | FINDSTR /V "3rdparty \ext\ \qzip">NUL && (
Expand All @@ -21,7 +21,7 @@ IF EXIST "%AppDir%src" (
)
)

CD "%OrigDir%"
CD %OrigDir%
) ELSE (
ECHO Clang-Format is not installed.
)
Expand Down
2 changes: 1 addition & 1 deletion make
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

"$(cd "$(dirname "$0")"; pwd)/scripts/genericmake" Release $*
$(cd $(dirname $0); pwd)/scripts/genericmake Release "$@"
2 changes: 1 addition & 1 deletion make.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@ECHO OFF

CALL "%~dp0scripts\genericmake" Release %*
CALL %~dp0scripts\genericmake Release %*
2 changes: 1 addition & 1 deletion maketests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

"$(cd "$(dirname "$0")"; pwd)/scripts/genericmake" Tests $*
$(cd $(dirname $0); pwd)/scripts/genericmake Tests "$@"
2 changes: 1 addition & 1 deletion maketests.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@ECHO OFF

CALL "%~dp0scripts\genericmake" Tests %*
CALL %~dp0scripts\genericmake Tests %*
Binary file modified models/tests/combine/lorenz.omex
Binary file not shown.
53 changes: 0 additions & 53 deletions models/tests/python/lorenz.py

This file was deleted.

2 changes: 1 addition & 1 deletion models/tests/sedml/lorenz.sedml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<title>x vs. t</title>
<line>
<style>solid</style>
<width>3</width>
<width>2</width>
<color>#0072bd</color>
</line>
<symbol>
Expand Down
16 changes: 8 additions & 8 deletions package
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh

appDir="$(cd "$(dirname "$0")"; pwd)"
appDir=$(cd $(dirname $0); pwd)

${appDir}/clean
${appDir}/make $*
$appDir/clean
$appDir/make $*

exitCode=$?

Expand All @@ -15,7 +15,7 @@ echo "\033[44;37;1mPackaging OpenCOR...\033[0m"

origDir=`pwd`

cd ${appDir}/build
cd $appDir/build

cpack

Expand All @@ -24,13 +24,13 @@ exitCode=$?
if [ "`uname -s`" = "Darwin" ]; then
packageName="OpenCOR-`date '+%Y-%m-%d'`-macOS"

mkdir ${packageName}
mkdir $packageName

mv ${packageName}.pkg ${packageName}
mv $packageName.pkg $packageName

hdiutil create -srcfolder ${packageName} ${packageName}.dmg
hdiutil create -srcfolder $packageName $packageName.dmg

rm -fr ${packageName}
rm -fr $packageName
fi

cd $origDir
Expand Down
8 changes: 4 additions & 4 deletions package.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ SETLOCAL ENABLEDELAYEDEXPANSION

SET AppDir=%~dp0

CALL "%AppDir%clean"
CALL "%AppDir%make" %*
CALL %AppDir%clean
CALL %AppDir%make %*

SET ExitCode=!ERRORLEVEL!

Expand All @@ -14,13 +14,13 @@ IF !ExitCode! EQU 0 (

SET OrigDir=%CD%

CD "%AppDir%build"
CD %AppDir%build

cpack

SET ExitCode=!ERRORLEVEL!

CD "%OrigDir%"
CD %OrigDir%
)

EXIT /B !ExitCode!
10 changes: 5 additions & 5 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

echo "\033[44;37;1mRunning OpenCOR...\033[0m"

appDir="$(cd "$(dirname "$0")"; pwd)"
appDir=$(cd $(dirname $0); pwd)

if [ "`uname -s`" = "Linux" ]; then
appExe=${appDir}/build/bin/OpenCOR
appExe=$appDir/build/bin/OpenCOR
else
appExe=${appDir}/build/OpenCOR.app/Contents/MacOS/OpenCOR
appExe=$appDir/build/OpenCOR.app/Contents/MacOS/OpenCOR
fi

if [ -f ${appExe} ]; then
${appExe} "$@"
if [ -f $appExe ]; then
$appExe "$@"
else
echo "OpenCOR must first be built before being run."
fi
Expand Down
6 changes: 3 additions & 3 deletions run.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ TITLE Running OpenCOR...
SET AppBase=%~dp0build\bin\OpenCOR
SET NeedInformation=

IF NOT EXIST "%AppBase%.com" SET NeedInformation=Yes
IF NOT EXIST "%AppBase%.exe" SET NeedInformation=Yes
IF NOT EXIST %AppBase%.com SET NeedInformation=Yes
IF NOT EXIST %AppBase%.exe SET NeedInformation=Yes

IF DEFINED NeedInformation (
ECHO OpenCOR must first be built before being run.
) ELSE (
"%AppBase%" %*
%AppBase% %*
)
10 changes: 5 additions & 5 deletions run.vbs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
AppExe = Left(Wscript.ScriptFullName, Len(Wscript.ScriptFullName)-Len(Wscript.ScriptName))&"build\bin\OpenCOR.exe"

If CreateObject("Scripting.FileSystemObject").FileExists(AppExe) Then
args = ""
Args = ""

For Each arg in WScript.Arguments
args = args&" "&arg
For Each Arg in WScript.Arguments
Args = Args&" "&Arg
Next

cmd = """"&AppExe&args&""""
Cmd = AppExe&Args

CreateObject("WScript.Shell").Run cmd, 1, False
CreateObject("WScript.Shell").Run Cmd, 1, False
Else
WScript.Echo "OpenCOR must first be built before being run."
End If
10 changes: 5 additions & 5 deletions runtests
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

echo "\033[44;37;1mRunning OpenCOR's tests...\033[0m"

appDir="$(cd "$(dirname "$0")"; pwd)"
appDir=$(cd $(dirname $0); pwd)

if [ "`uname -s`" = "Linux" ]; then
OPENCOR_TESTS_EXE=${appDir}/build/bin/runtests
appTestsExe=$appDir/build/bin/runtests
else
OPENCOR_TESTS_EXE=${appDir}/build/OpenCOR.app/Contents/MacOS/runtests
appTestsExe=$appDir/build/OpenCOR.app/Contents/MacOS/runtests
fi

if [ -f ${OPENCOR_TESTS_EXE} ]; then
${OPENCOR_TESTS_EXE} "$@"
if [ -f $appTestsExe ]; then
$appTestsExe "$@"
else
echo "OpenCOR's tests must first be built before being run."
fi
Expand Down
2 changes: 1 addition & 1 deletion runtests.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ SET AppTestsExe=%~dp0build\bin\runtests.exe
IF NOT EXIST %AppTestsExe% (
ECHO OpenCOR's tests must first be built before being run.
) ELSE (
"%AppTestsExe%"
%AppTestsExe% %*
)
2 changes: 1 addition & 1 deletion src/misc/furtherinitialize.cpp.inl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ QString Simulation::furtherInitialize() const
}
#else

mData->addNlaSolverProperty(id, value);
mData->setNlaSolverProperty(id, value);
#endif
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/misc/initializesolver.cpp.inl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ QString Simulation::initializeSolver(const libsedml::SedListOfAlgorithmParameter
}
#else

mData->addOdeSolverProperty(solverInterface->id(parameterKisaoId),
mData->setOdeSolverProperty(solverInterface->id(parameterKisaoId),
QString::fromStdString(sedmlAlgorithmParameter->getValue()));
#endif
}
Expand Down

0 comments on commit 9330ec2

Please sign in to comment.