Unverified Commit 57b45852 authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

Merge pull request #331864 from emilazy/push-posunwslrptx

febio: 3.6 -> 4.7; febio-studio: 1.6.1 -> 2.7
parents fb8fb78e aa4aae33
Loading
Loading
Loading
Loading
+0 −62
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, cmake, zlib, libglvnd, libGLU, wrapQtAppsHook
, sshSupport ? true, openssl, libssh
, tetgenSupport ? true, tetgen
, ffmpegSupport ? true, ffmpeg_4
, dicomSupport  ? false, dcmtk
, withModelRepo ? true
, withCadFeatures ? false
}:

stdenv.mkDerivation rec {
  pname = "febio-studio";
  version = "1.6.1";

  src = fetchFromGitHub {
    owner = "febiosoftware";
    repo = "FEBioStudio";
    rev = "v${version}";
    sha256 = "0r6pg49i0q9idp7pjymj7mlxd63qjvmfvg0l7fmx87y1yd2hfw4h";
  };

  patches = [
    ./febio-studio-cmake.patch # Fix Errors that appear with certain Cmake flags
  ];

  cmakeFlags = [
    "-DQt_Ver=5"
    "-DNOT_FIRST=On"
    "-DOpenGL_GL_PREFERENCE=GLVND"
  ]
    ++ lib.optional sshSupport "-DUSE_SSH=On"
    ++ lib.optional tetgenSupport "-DUSE_TETGEN=On"
    ++ lib.optional ffmpegSupport "-DUSE_FFMPEG=On"
    ++ lib.optional dicomSupport "-DUSE_DICOM=On"
    ++ lib.optional withModelRepo "-DMODEL_REPO=On"
    ++ lib.optional withCadFeatures "-DCAD_FEATURES=On"
  ;


  installPhase = ''
    runHook preInstall
    mkdir -p $out/
    cp -R bin $out/
    runHook postInstall
  '';

  nativeBuildInputs = [ cmake wrapQtAppsHook ];
  buildInputs = [ zlib libglvnd libGLU openssl libssh ]
    ++ lib.optional sshSupport openssl
    ++ lib.optional tetgenSupport tetgen
    ++ lib.optional ffmpegSupport ffmpeg_4
    ++ lib.optional dicomSupport dcmtk
  ;

  meta = with lib; {
    description = "FEBio Suite Solver";
    mainProgram = "FEBioStudio";
    license = with licenses; [ mit ];
    homepage = "https://febio.org/";
    platforms = platforms.unix;
    maintainers = with maintainers; [ Scriptkiddi ];
  };
}
+0 −38
Original line number Diff line number Diff line
diff --git a/FEBioStudio/RepositoryPanel.cpp b/FEBioStudio/RepositoryPanel.cpp
index 382db303..314cdc68 100644
--- a/FEBioStudio/RepositoryPanel.cpp
+++ b/FEBioStudio/RepositoryPanel.cpp
@@ -1364,10 +1364,10 @@ void CRepositoryPanel::loadingPageProgress(qint64 bytesSent, qint64 bytesTotal)
 
 #else
 
-CRepositoryPanel::CRepositoryPanel(CMainWindow* pwnd, QWidget* parent){}
+CRepositoryPanel::CRepositoryPanel(CMainWindow* pwnd, QDockWidget* parent){}
 CRepositoryPanel::~CRepositoryPanel(){}
 void CRepositoryPanel::OpenLink(const QString& link) {}
-// void CRepositoryPanel::Raise() {}
+void CRepositoryPanel::Raise() {}
 void CRepositoryPanel::SetModelList(){}
 void CRepositoryPanel::ShowMessage(QString message) {}
 void CRepositoryPanel::ShowWelcomeMessage(QByteArray messages) {}
@@ -1396,6 +1396,7 @@ void CRepositoryPanel::on_actionSearch_triggered() {}
 void CRepositoryPanel::on_actionClearSearch_triggered() {}
 void CRepositoryPanel::on_actionDeleteRemote_triggered() {}
 void CRepositoryPanel::on_actionModify_triggered() {}
+void CRepositoryPanel::on_actionCopyPermalink_triggered() {}
 void CRepositoryPanel::on_treeWidget_itemSelectionChanged() {}
 void CRepositoryPanel::on_treeWidget_customContextMenuRequested(const QPoint &pos) {}
 void CRepositoryPanel::DownloadItem(CustomTreeWidgetItem *item) {}
diff --git a/FEBioStudio/WzdUpload.cpp b/FEBioStudio/WzdUpload.cpp
index 5ce74346..20062e06 100644
--- a/FEBioStudio/WzdUpload.cpp
+++ b/FEBioStudio/WzdUpload.cpp
@@ -1183,7 +1183,7 @@ void CWzdUpload::on_saveJson_triggered()
 		getProjectJson(&projectInfo);
 
 		QFile file(filedlg.selectedFiles()[0]);
-		file.open(QIODeviceBase::WriteOnly);
+		file.open(QIODevice::WriteOnly);
 		file.write(projectInfo);
 		file.close();
 	}
+1 −1
Original line number Diff line number Diff line
@@ -27,6 +27,6 @@ stdenv.mkDerivation rec {
    mainProgram = "tetgen";
    homepage = "http://tetgen.org/";
    license = lib.licenses.agpl3Plus;
    platforms = lib.platforms.linux;
    platforms = lib.platforms.unix;
  };
}
+14 −0
Original line number Diff line number Diff line
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7ad2c68eb2..0e3e978bd9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -449,6 +449,9 @@
 	set_property(TARGET ${FBS_BIN_NAME} PROPERTY AUTOGEN_BUILD_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/AutoGen/FEBioStudio_autogen)
 endif()
 
+include(GNUInstallDirs)
+install(TARGETS ${FBS_BIN_NAME} BUNDLE DESTINATION Applications)
+
 macro(addLib name)
 	add_library(${name} ${HDR_${name}} ${SRC_${name}})
 	set_property(TARGET ${name} PROPERTY AUTOGEN_BUILD_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/AutoGen/${name}_autogen)
+89 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  overrideSDK,
  fetchFromGitHub,
  cmake,
  ninja,
  zlib,
  libGLU,
  qt6Packages,
  febio,
  glew,
  sshSupport ? true,
  openssl,
  libssh,
  tetgenSupport ? true,
  tetgen,
  ffmpegSupport ? true,
  ffmpeg_7,
  dicomSupport ? false,
  dcmtk,
  withModelRepo ? true,
  withCadFeatures ? false,
}:

let
  stdenv' =
    if stdenv.isDarwin then
      overrideSDK stdenv {
        darwinSdkVersion = "11.0";
        darwinMinVersion = "10.15";
      }
    else
      stdenv;
in

stdenv'.mkDerivation (finalAttrs: {
  pname = "febio-studio";
  version = "2.7";

  src = fetchFromGitHub {
    owner = "febiosoftware";
    repo = "FEBioStudio";
    rev = "v${finalAttrs.version}";
    hash = "sha256-ggIzz6bvNjqlI8s31EVnbM0TOspBSc9/myKpWukS3MU=";
  };

  patches = [ ./cmake-install.patch ];

  cmakeFlags =
    [ (lib.cmakeFeature "Qt_Root" "${qt6Packages.qtbase}") ]
    ++ lib.optional sshSupport "-DUSE_SSH=On"
    ++ lib.optional tetgenSupport "-DUSE_TETGEN=On"
    ++ lib.optional ffmpegSupport "-DUSE_FFMPEG=On"
    ++ lib.optional dicomSupport "-DUSE_DICOM=On"
    ++ lib.optional withModelRepo "-DMODEL_REPO=On"
    ++ lib.optional withCadFeatures "-DCAD_FEATURES=On";

  nativeBuildInputs = [
    cmake
    ninja
    qt6Packages.wrapQtAppsHook
  ];

  buildInputs =
    [
      zlib
      libGLU
      glew
      qt6Packages.qtbase
      febio
    ]
    ++ lib.optionals sshSupport [
      openssl
      libssh
    ]
    ++ lib.optional tetgenSupport tetgen
    ++ lib.optional ffmpegSupport ffmpeg_7
    ++ lib.optional dicomSupport dcmtk;

  meta = {
    description = "FEBio Suite Solver";
    mainProgram = "FEBioStudio";
    license = with lib.licenses; [ mit ];
    homepage = "https://febio.org/";
    platforms = lib.platforms.unix;
    maintainers = with lib.maintainers; [ Scriptkiddi ];
  };
})
Loading