Skip to content

Commit

Permalink
Updates to get nC working on latest mac (arch arm64)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Aug 11, 2023
1 parent db949e3 commit 8ae782f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions osb/checkOsb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ standardGHProject 'DANDIArchiveShowcase' 'showcase'

standardGHProject 'FitzHugh-Nagumo' 'generic'
standardGHProject 'hodgkin_huxley_tutorial' 'generic' 'openworm'
standardGHProject 'HindmarshRose1984' 'generic'

standardGHProject 'CSAShowcase' 'showcase'
standardGHProject 'neuroConstructShowcase' 'showcase'
Expand Down
7 changes: 6 additions & 1 deletion src/ucl/physiol/neuroconstruct/neuron/NeuronFileManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -5322,7 +5322,12 @@ else if (project.neuronSettings.getGraphicsMode().equals(NeuronSettings.Graphics
{
String[] options =
{
GeneralUtils.DIR_64BIT,GeneralUtils.DIR_I386, GeneralUtils.DIR_I686,GeneralUtils.DIR_POWERPC, GeneralUtils.DIR_UMAC
GeneralUtils.DIR_64BIT,
GeneralUtils.DIR_I386,
GeneralUtils.DIR_I686,
GeneralUtils.DIR_POWERPC,
GeneralUtils.DIR_UMAC,
GeneralUtils.DIR_ARM64
};

for (String o : options)
Expand Down
1 change: 1 addition & 0 deletions src/ucl/physiol/neuroconstruct/project/ProjectManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ else if (activeProject.neuronSettings.isCopySimFiles() &&
generatedNeuronFiles[i].getName().equals(GeneralUtils.DIR_I386) ||
generatedNeuronFiles[i].getName().equals(GeneralUtils.DIR_64BIT) ||
generatedNeuronFiles[i].getName().equals(GeneralUtils.DIR_UMAC) ||
generatedNeuronFiles[i].getName().equals(GeneralUtils.DIR_ARM64) ||
generatedNeuronFiles[i].getName().equals(GeneralUtils.DIR_POWERPC)))
{
File toDir = new File(dirForSimFiles, generatedNeuronFiles[i].getName());
Expand Down
7 changes: 7 additions & 0 deletions src/ucl/physiol/neuroconstruct/utils/GeneralUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ public class GeneralUtils
public static final String ARCH_64BIT = "amd64";
public static final String ARCH_POWERPC = "ppc";
public static final String ARCH_UMAC = "umac";
public static final String ARCH_ARM64 = "aarch64";

public static final String DIR_I386 = "i386";
public static final String DIR_I686 = "i686";
public static final String DIR_64BIT = "x86_64";
public static final String DIR_POWERPC = "powerpc";
public static final String DIR_UMAC = "umac";
public static final String DIR_ARM64 = "arm64";


private static long lastMeasuredMemory = 0;
Expand All @@ -97,6 +99,11 @@ public GeneralUtils()
public static String getArchSpecificDir()
{
if (!isMacBasedPlatform() &&
(System.getProperty("os.arch").equals(ARCH_ARM64)))
{
return DIR_ARM64;
}
else if (!isMacBasedPlatform() &&
(System.getProperty("os.arch").equals(ARCH_64BIT) ||
System.getProperty("os.arch").indexOf("64")>=0))
{
Expand Down

0 comments on commit 8ae782f

Please sign in to comment.