repository for casatablebrowser
Source
69
69
if ( ! -d $prefix) { die "cannot create prefix" }
70
70
if ( ! $app_path ) { die "no prefix specified" };
71
71
72
72
$app_name = basename($app_path);
73
73
74
74
if ( $^O eq "darwin" ) {
75
75
if ( ! -d $app_path ) { die "app directory ('$app_path') does not exist (or is not a directory)" }
76
76
my( $filename, $dirs, $suffix ) = fileparse( $app_path, ".app" );
77
77
$app_exe = "__bin__/$app_name/Contents/MacOS/$filename";
78
78
$subst{'@APP@'} = $app_exe;
79
+
80
+
# Apple Silicon Macs use Qt5, which requires that qt.conf is present
81
+
$cpuarch=`uname -m`;
82
+
chomp($cpuarch);
83
+
print ("CPU Architecture: '$cpuarch'\n");
84
+
if ($cpuarch eq "arm64") {
85
+
open my $fileHandle, ">>", "$app_path/Contents/Resources/qt.conf" or die "Can't open '$app_path/Contents/Resources/qt.conf'\n";
86
+
close $fileHandle;
87
+
}
79
88
} else {
80
89
if ( ! -f $app_path ) { die "app image does not exist" }
81
90
$app_exe = "__bin__/$app_name";
82
91
$subst{'@APP@'} = $app_exe;
83
92
}
84
93
85
94
rsync("src/casatablebrowser", $prefix);
86
95
subst($prefix);
87
96
if ( ! -d "$prefix/private" ) { mkpath("$prefix/private") }
88
97