Skip to content

Commit

Permalink
Merge 9153d87 into c8a178e
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Oct 12, 2018
2 parents c8a178e + 9153d87 commit 4071613
Show file tree
Hide file tree
Showing 66 changed files with 184 additions and 87 deletions.
34 changes: 29 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,30 @@ else()
message(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built in release or debug mode...")
endif()

# Try to build our silent program

set(SILENTRUN ${PROJECT_BUILD_DIR}/silentrun)

if(WIN32)
execute_process(COMMAND ${CMAKE_C_COMPILER} /O2 /Fe${SILENTRUN} ${PROJECT_SOURCE_DIR}/cmake/silentrun.c
RESULT_VARIABLE RESULT OUTPUT_QUIET ERROR_QUIET)

if(NOT RESULT EQUAL 0)
message(FATAL_ERROR "silentrun could not be built...")
endif()
else()
if(APPLE)
set(INCLUDE_ARGUMENT -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include)
endif()

execute_process(COMMAND ${CMAKE_C_COMPILER} -O3 ${INCLUDE_ARGUMENT} -o ${SILENTRUN} ${PROJECT_SOURCE_DIR}/cmake/silentrun.c
RESULT_VARIABLE RESULT OUTPUT_QUIET ERROR_QUIET)

if(NOT RESULT EQUAL 0)
message(FATAL_ERROR "silentrun could not be built...")
endif()
endif()

# Try to build our runpath2rpath program, if we are on Linux

if(NOT WIN32 AND NOT APPLE)
Expand Down Expand Up @@ -586,11 +610,6 @@ file(WRITE ${VERSION_DATE_FILENAME} "${VERSION}\n${DATE}")

track_files(${VERSION_DATE_FILENAME})

# Configure our help file

configure_file(${CMAKE_SOURCE_DIR}/doc/${CMAKE_PROJECT_NAME}.qhcp.in
${PROJECT_BUILD_DIR}/doc/${CMAKE_PROJECT_NAME}.qhcp)

# Configure our QRC files

set(COMMON_QRC_FILENAME ${PROJECT_BUILD_DIR}/res/common.qrc)
Expand Down Expand Up @@ -966,6 +985,11 @@ foreach(PLUGIN ${PLUGINS})
add_subdirectory(src/plugins/${PLUGIN})
endforeach()

# Configure our help file

configure_file(${CMAKE_SOURCE_DIR}/doc/${CMAKE_PROJECT_NAME}.qhcp.in
${PROJECT_BUILD_DIR}/doc/${CMAKE_PROJECT_NAME}.qhcp)

# Build the GUI version of OpenCOR

qt5_wrap_cpp(SOURCES_MOC ${HEADERS_MOC})
Expand Down
3 changes: 2 additions & 1 deletion cmake/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,8 @@ if(EXISTS ${COMPRESSED_FILENAME})
file(SHA1 ${COMPRESSED_FILENAME} SHA1_VALUE)
string(REPLACE \"\;\" \"\\n \" SHA1_VALUES \"\$\{SHA1_VALUES\}\")
string(REPLACE \"\;\" \"\\n \"
SHA1_VALUES \"\$\{SHA1_VALUES\}\")
message(\"To retrieve the '${PACKAGE_NAME}' package, use:
retrieve_package_file(\\$\\{PACKAGE_NAME\\} \\$\\{PACKAGE_VERSION\\}
Expand Down
70 changes: 70 additions & 0 deletions cmake/silentrun.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*******************************************************************************
Copyright (C) The University of Auckland
OpenCOR is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenCOR is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/

//==============================================================================
// Silent run
//==============================================================================

#include <stdio.h>
#include <stdlib.h>

//==============================================================================

int main(int pArgC, char *pArgV[])
{
// Execute the given program, silencing its output

#ifdef _WIN32
freopen("NUL:", "w", stdout);
freopen("NUL:", "w", stderr);
#else
freopen("/dev/null", "w", stdout);
freopen("/dev/null", "w", stderr);
#endif

#define STRING_SIZE 32768

char command[STRING_SIZE];
int k = -1;

for (int i = 1; i < pArgC; ++i) {
if (i != 1)
command[++k] = ' ';

for (int j = 0; pArgV[i][j]; ++j) {
if (pArgV[i][j] == '\\') {
command[++k] = '\\';
command[++k] = '\\';
} else if (pArgV[i][j] == '"') {
command[++k] = '\\';
command[++k] = '"';
} else {
command[++k] = pArgV[i][j];
}
}
}

command[++k] = '\0';

return system(command);
}

//==============================================================================
// End of file
//==============================================================================
52 changes: 26 additions & 26 deletions doc/developer/functionalTests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,26 @@
<li>
Problematic CellML models:
<ul>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/cellml/definite_integral_model.cellml"><code>[OpenCOR]/doc/developer/functionalTests/res/cellml/definite_integral_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/cellml/no_voi_model.cellml"><code>[OpenCOR]/doc/developer/functionalTests/res/cellml/no_voi_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/cellml/overconstrained_model.cellml"><code>[OpenCOR]/doc/developer/functionalTests/res/cellml/overconstrained_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/cellml/underconstrained_model.cellml"><code>[OpenCOR]/doc/developer/functionalTests/res/cellml/underconstrained_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/cellml/unsuitably_constrained_model.cellml"><code>[OpenCOR]/doc/developer/functionalTests/res/cellml/unsuitably_constrained_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/cellml/definite_integral_model.cellml"><code>[OpenCOR]/models/tests/cellml/definite_integral_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/cellml/no_voi_model.cellml"><code>[OpenCOR]/models/tests/cellml/no_voi_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/cellml/overconstrained_model.cellml"><code>[OpenCOR]/models/tests/cellml/overconstrained_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/cellml/underconstrained_model.cellml"><code>[OpenCOR]/models/tests/cellml/underconstrained_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/cellml/unsuitably_constrained_model.cellml"><code>[OpenCOR]/models/tests/cellml/unsuitably_constrained_model.cellml</code></a></li>
</ul>
</li>
<li>
CellML 1.0 models:
<ul>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/cellml/parabola_dae_model.cellml"><code>[OpenCOR]/doc/developer/functionalTests/res/cellml/parabola_dae_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/cellml/parabola_ode_model.cellml"><code>[OpenCOR]/doc/developer/functionalTests/res/cellml/parabola_ode_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/cellml/parabola_variant_dae_model.cellml"><code>[OpenCOR]/doc/developer/functionalTests/res/cellml/parabola_variant_dae_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/cellml/simple_dae_model.cellml"><code>[OpenCOR]/doc/developer/functionalTests/res/cellml/simple_dae_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/cellml/parabola_dae_model.cellml"><code>[OpenCOR]/models/tests/cellml/parabola_dae_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/cellml/parabola_ode_model.cellml"><code>[OpenCOR]/models/tests/cellml/parabola_ode_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/cellml/parabola_variant_dae_model.cellml"><code>[OpenCOR]/models/tests/cellml/parabola_variant_dae_model.cellml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/cellml/simple_dae_model.cellml"><code>[OpenCOR]/models/tests/cellml/simple_dae_model.cellml</code></a></li>
</ul>
</li>
<li>
CellML 1.1 models:
<ul>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/cellml/cellml_1_1/experiments/periodic-stimulus.xml"><code>[OpenCOR]/doc/developer/functionalTests/res/cellml/cellml_1_1/experiments/periodic-stimulus.xml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/cellml/cellml_1_1/experiments/periodic-stimulus.xml"><code>[OpenCOR]/models/tests/cellml/cellml_1_1/experiments/periodic-stimulus.xml</code></a></li>
</ul>
</li>
</ul>
Expand All @@ -118,17 +118,17 @@
</div>

<ul>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/sedml/noble_1962_local.sedml"><code>[OpenCOR]/doc/developer/functionalTests/res/sedml/noble_1962_local.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/sedml/noble_1962_remote.sedml"><code>[OpenCOR]/doc/developer/functionalTests/res/sedml/noble_1962_remote.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/sedml/noble_1962_gL_time.sedml"><code>[OpenCOR]/doc/developer/functionalTests/res/sedml/noble_1962_gL_time.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/sedml/noble_1962_iK_time.sedml"><code>[OpenCOR]/doc/developer/functionalTests/res/sedml/noble_1962_iK_time.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/sedml/noble_1962_iK_V.sedml"><code>[OpenCOR]/doc/developer/functionalTests/res/sedml/noble_1962_iK_V.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/sedml/noble_1962_time_gL.sedml"><code>[OpenCOR]/doc/developer/functionalTests/res/sedml/noble_1962_time_gL.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/sedml/noble_1962_time_iK.sedml"><code>[OpenCOR]/doc/developer/functionalTests/res/sedml/noble_1962_time_iK.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/sedml/noble_1962_time_time.sedml"><code>[OpenCOR]/doc/developer/functionalTests/res/sedml/noble_1962_time_time.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/sedml/noble_1962_time_V.sedml"><code>[OpenCOR]/doc/developer/functionalTests/res/sedml/noble_1962_time_V.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/sedml/noble_1962_V_iK.sedml"><code>[OpenCOR]/doc/developer/functionalTests/res/sedml/noble_1962_V_iK.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/sedml/noble_1962_V_time.sedml"><code>[OpenCOR]/doc/developer/functionalTests/res/sedml/noble_1962_V_time.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/sedml/noble_1962_local.sedml"><code>[OpenCOR]/models/tests/sedml/noble_1962_local.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/sedml/noble_1962_remote.sedml"><code>[OpenCOR]/models/tests/sedml/noble_1962_remote.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/sedml/noble_1962_gL_time.sedml"><code>[OpenCOR]/models/tests/sedml/noble_1962_gL_time.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/sedml/noble_1962_iK_time.sedml"><code>[OpenCOR]/models/tests/sedml/noble_1962_iK_time.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/sedml/noble_1962_iK_V.sedml"><code>[OpenCOR]/models/tests/sedml/noble_1962_iK_V.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/sedml/noble_1962_time_gL.sedml"><code>[OpenCOR]/models/tests/sedml/noble_1962_time_gL.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/sedml/noble_1962_time_iK.sedml"><code>[OpenCOR]/models/tests/sedml/noble_1962_time_iK.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/sedml/noble_1962_time_time.sedml"><code>[OpenCOR]/models/tests/sedml/noble_1962_time_time.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/sedml/noble_1962_time_V.sedml"><code>[OpenCOR]/models/tests/sedml/noble_1962_time_V.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/sedml/noble_1962_V_iK.sedml"><code>[OpenCOR]/models/tests/sedml/noble_1962_V_iK.sedml</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/sedml/noble_1962_V_time.sedml"><code>[OpenCOR]/models/tests/sedml/noble_1962_V_time.sedml</code></a></li>
</ul>

<div class="section">
Expand All @@ -139,21 +139,21 @@
<li>
Problematic COMBINE archives:
<ul>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/combine/no_master_sedml_file.omex"><code>[OpenCOR]/doc/developer/functionalTests/res/combine/no_master_sedml_file.omex</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/combine/two_master_sedml_files.omex"><code>[OpenCOR]/doc/developer/functionalTests/res/combine/two_master_sedml_files.omex</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/combine/no_master_sedml_file.omex"><code>[OpenCOR]/models/tests/combine/no_master_sedml_file.omex</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/combine/two_master_sedml_files.omex"><code>[OpenCOR]/models/tests/combine/two_master_sedml_files.omex</code></a></li>
</ul>
</li>
<li>
COMBINE archives:
<ul>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/combine/noble_1962.omex"><code>[OpenCOR]/doc/developer/functionalTests/res/combine/noble_1962.omex</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/combine/noble_1962.omex"><code>[OpenCOR]/models/tests/combine/noble_1962.omex</code></a></li>
</ul>
</li>
<li>
COMBINE archives with DAE models:
<ul>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/combine/fink_slepchenko_moraru_watras_schaff_loew_2000v2.omex"><code>[OpenCOR]/doc/developer/functionalTests/res/combine/fink_slepchenko_moraru_watras_schaff_loew_2000v2.omex</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/doc/developer/functionalTests/res/combine/smith_chase_nokes_shaw_wake_2004.omex"><code>[OpenCOR]/doc/developer/functionalTests/res/combine/smith_chase_nokes_shaw_wake_2004.omex</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/combine/fink_slepchenko_moraru_watras_schaff_loew_2000v2.omex"><code>[OpenCOR]/models/tests/combine/fink_slepchenko_moraru_watras_schaff_loew_2000v2.omex</code></a></li>
<li><a href="https://raw.githubusercontent.com/opencor/opencor/master/models/tests/combine/smith_chase_nokes_shaw_wake_2004.omex"><code>[OpenCOR]/models/tests/combine/smith_chase_nokes_shaw_wake_2004.omex</code></a></li>
</ul>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion formats/README.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The user-defined formats contained in this folder come from the CellML API (http://cellml-api.sourceforge.net/) and should work fine. Still, we would recommend using them with caution.
The user-defined formats contained in this folder come from the CellML API (https://github.com/cellmlapi/cellml-api/) and should work fine. Still, we would recommend using them with caution.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ PLUGININFO_FUNC CellMLAnnotationViewPluginInfo()
{
Descriptions descriptions;

descriptions.insert("en", QString::fromUtf8("a plugin to annotate CellML files."));
descriptions.insert("fr", QString::fromUtf8("une extension pour annoter des fichiers CellML."));
descriptions.insert("en", QString::fromUtf8("a plugin to annotate <a href=\"http://www.cellml.org/\">CellML</a> files."));
descriptions.insert("fr", QString::fromUtf8("une extension pour annoter des fichiers <a href=\"http://www.cellml.org/\">CellML</a>."));

return new PluginInfo(PluginInfo::Editing, true, false,
QStringList() << "CellMLSupport" << "WebViewerWidget",
Expand Down

0 comments on commit 4071613

Please sign in to comment.