Skip to content

Commit

Permalink
Legacy compatibility with MM2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeschamps committed Jan 8, 2024
1 parent c2d3c38 commit db25050
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 42 deletions.
8 changes: 4 additions & 4 deletions compileAndDeploy-macOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ else

if [ -f "$MMJ" ] && [ -f "$MMAcqEngine" ] && [ -f "$MMCoreJ" ] && [ -f "$EMU" ]; then
# deploy MM2 jars
mvn install:install-file -Dfile="$MMJ" -DgroupId=org.micromanager -DartifactId=MMJ_ -Dversion=2.0.3-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile="$MMAcqEngine" -DgroupId=org.micromanager -DartifactId=MMAcqEngine -Dversion=2.0.3-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile="$MMCoreJ" -DgroupId=org.micromanager -DartifactId=MMCoreJ -Dversion=2.0.3-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile="$MMJ" -DgroupId=org.micromanager -DartifactId=MMJ_ -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile="$MMAcqEngine" -DgroupId=org.micromanager -DartifactId=MMAcqEngine -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile="$MMCoreJ" -DgroupId=org.micromanager -DartifactId=MMCoreJ -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile="$EMU" -DgroupId=de.embl.rieslab -DartifactId=EMU -Dversion=$EMU_VERSION -Dpackaging=jar

# compile project
Expand All @@ -34,7 +34,7 @@ else
mkdir -p "$MM2_EMU"

# deploy to MM2
cp "target/htsmlm-2.1.0-SNAPSHOT.jar" "$MM2_HOME/EMU/htsmlm-2.1.0.jar"
cp "target/htsmlm-2.1.0-mm2.0.0-SNAPSHOT.jar" "$MM2_HOME/EMU/htsmlm-2.1.0-mm2.0.0.jar"
else
echo "Could not find MMJ_.jar, MMAcqEngine.jar, MMCoreJ.jar or Emu.jar. Did you input the correct directory?"
fi
Expand Down
8 changes: 4 additions & 4 deletions compileAndDeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ else

if [ -f "$MMJ" ] && [ -f "$MMAcqEngine" ] && [ -f "$MMCoreJ" ] && [ -f "$EMU" ]; then
# deploy MM2 jars
mvn install:install-file -Dfile="$MMJ" -DgroupId=org.micromanager -DartifactId=MMJ_ -Dversion=2.0.3-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile="$MMAcqEngine" -DgroupId=org.micromanager -DartifactId=MMAcqEngine -Dversion=2.0.3-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile="$MMCoreJ" -DgroupId=org.micromanager -DartifactId=MMCoreJ -Dversion=2.0.3-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile="$MMJ" -DgroupId=org.micromanager -DartifactId=MMJ_ -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile="$MMAcqEngine" -DgroupId=org.micromanager -DartifactId=MMAcqEngine -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile="$MMCoreJ" -DgroupId=org.micromanager -DartifactId=MMCoreJ -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar
mvn install:install-file -Dfile="$EMU" -DgroupId=de.embl.rieslab -DartifactId=EMU -Dversion=$EMU_VERSION -Dpackaging=jar

# compile project
Expand All @@ -34,7 +34,7 @@ else
mkdir -p "$MM2_EMU"

# deploy to MM2
cp "target/htsmlm-2.1.0-SNAPSHOT.jar" "$MM2_HOME/EMU/htsmlm-2.1.0.jar"
cp "target/htsmlm-2.1.0-mm2.0.0-SNAPSHOT.jar" "$MM2_HOME/EMU/htsmlm-2.1.0-mm2.0.0.jar"
else
echo "Could not find MMJ_.jar, MMAcqEngine.jar, MMCoreJ.jar or Emu.jar. Did you input the correct directory?"
fi
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>de.embl.rieslab</groupId>
<artifactId>htsmlm</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0-mm2.0.0-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -55,19 +55,19 @@
<dependency>
<groupId>org.micromanager</groupId>
<artifactId>MMCoreJ</artifactId>
<version>2.0.3-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.micromanager</groupId>
<artifactId>MMAcqEngine</artifactId>
<version>2.0.3-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.micromanager</groupId>
<artifactId>MMJ_</artifactId>
<version>2.0.3-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,16 +407,8 @@ public void performAcquisition(Studio studio, String name, String path, Datastor
}

private void interruptAcquisition(Studio studio) {
// In MM 2.0.0 and 2.0.1 (before 06.04.23), we used the following snippet to stop acquisitions:
//((DefaultAcquisitionManager) studio.acquisitions()).getAcquisitionEngine().stop(true);

// Since MM 2.0.1, PR #16668, abortAcquisition() is exposed
// https://github.com/micro-manager/micro-manager/pull/1668
try {
studio.acquisitions().abortAcquisition();
} catch (Exception e) {
e.printStackTrace();
}
// In MM 2.0.0 and 2.0.1 (before 06.04.23), we use the following snippet to stop acquisitions:
((DefaultAcquisitionManager) studio.acquisitions()).getAcquisitionEngine().stop(true);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,8 @@ public void performAcquisition(Studio studio, String name, String path, Datastor
}

private void interruptAcquisition(Studio studio) {
// In MM 2.0.0 and 2.0.1 (before 06.04.23), we used the following snippet to stop acquisitions:
//((DefaultAcquisitionManager) studio.acquisitions()).getAcquisitionEngine().stop(true);

// Since MM 2.0.1, PR #16668, abortAcquisition() is exposed
// https://github.com/micro-manager/micro-manager/pull/1668
try {
studio.acquisitions().abortAcquisition();
} catch (Exception e) {
e.printStackTrace();
}
// In MM 2.0.0 and 2.0.1 (before 06.04.23), we use the following snippet to stop acquisitions:
((DefaultAcquisitionManager) studio.acquisitions()).getAcquisitionEngine().stop(true);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,8 @@ public void performAcquisition(Studio studio, String name, String path, Datastor
}

private void interruptAcquisition(Studio studio) {
// In MM 2.0.0 and 2.0.1 (before 06.04.23), we used the following snippet to stop acquisitions:
//((DefaultAcquisitionManager) studio.acquisitions()).getAcquisitionEngine().stop(true);

// Since MM 2.0.1, PR #16668, abortAcquisition() is exposed
// https://github.com/micro-manager/micro-manager/pull/1668
try {
studio.acquisitions().abortAcquisition();
} catch (Exception e) {
e.printStackTrace();
}
// In MM 2.0.0 and 2.0.1 (before 06.04.23), we use the following snippet to stop acquisitions:
((DefaultAcquisitionManager) studio.acquisitions()).getAcquisitionEngine().stop(true);
}

@Override
Expand Down

0 comments on commit db25050

Please sign in to comment.