[chronojump] 7z on mac UNTESTED
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] 7z on mac UNTESTED
- Date: Wed, 28 Sep 2022 14:53:11 +0000 (UTC)
commit 3603370c63d0d89541e319e176871e54607316f1
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Sep 28 16:23:24 2022 +0200
7z on mac UNTESTED
Makefile.am | 3 ++-
binariesMac/7zz | Bin 0 -> 5161904 bytes
binariesMac/Makefile.am | 2 +-
src/gui/app1/session/export.cs | 7 ++++++-
src/gui/app1/session/loadAndImport.cs | 6 +++++-
5 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 49d5c26a0..c8f6777cb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,8 @@ EXTRA_DIST = win32/chronojump_innosetup.iss.in \
win32/Makefile.in glade/*.glade \
src/chronojump-importer/chronojump_importer.py \
src/chronojump-importer/test-delete.py \
- binariesMac/ffplay
+ binariesMac/ffplay \
+ binariesMac/7zz
CLEANFILES = win32/Makefile win32/chronojump_innosetup.iss
diff --git a/binariesMac/7zz b/binariesMac/7zz
new file mode 100755
index 000000000..2f28ba309
Binary files /dev/null and b/binariesMac/7zz differ
diff --git a/binariesMac/Makefile.am b/binariesMac/Makefile.am
index e520a8308..e412e50b7 100644
--- a/binariesMac/Makefile.am
+++ b/binariesMac/Makefile.am
@@ -1,3 +1,3 @@
TARGET = all
-bin_SCRIPTS = ffmpeg ffplay
+bin_SCRIPTS = 7zz ffmpeg ffplay
diff --git a/src/gui/app1/session/export.cs b/src/gui/app1/session/export.cs
index 2199c9615..42e1fddc7 100644
--- a/src/gui/app1/session/export.cs
+++ b/src/gui/app1/session/export.cs
@@ -256,6 +256,7 @@ public partial class ChronoJumpWindow
app1s_exportText = string.Format("Compressing …");
List<string> parameters = new List<string>();
parameters.Add ("a");
+
parameters.Add (app1s_fileCopy + ".7z");
// option 1 add the folder with the files (better to have a dir that can be
uncompressed in order to be opened from importer)
@@ -263,7 +264,11 @@ public partial class ChronoJumpWindow
// option 2 without the parent folder (cleaner, but do not found how to import)
//parameters.Add (app1s_fileCopy + Path.DirectorySeparatorChar + "*");
- ExecuteProcess.Result execute_result = ExecuteProcess.run ("7z", parameters, false,
false);
+ string executable = "7z";
+ if(operatingSystem == UtilAll.OperatingSystems.MACOSX)
+ executable = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/7zz");
+
+ ExecuteProcess.Result execute_result = ExecuteProcess.run (executable, parameters,
false, false);
// delete exported folder
if (execute_result.success)
Util.DirectoryDelete (app1s_fileCopy);
diff --git a/src/gui/app1/session/loadAndImport.cs b/src/gui/app1/session/loadAndImport.cs
index 95337565f..7c5c3013c 100644
--- a/src/gui/app1/session/loadAndImport.cs
+++ b/src/gui/app1/session/loadAndImport.cs
@@ -395,7 +395,11 @@ public partial class ChronoJumpWindow
parameters.Add ("-o" + Path.DirectorySeparatorChar + UtilAll.GetTempDir ());
parameters.Add (filechooser.Filename);
- ExecuteProcess.Result execute_result = ExecuteProcess.run ("7z", parameters,
false, false);
+ string executable = "7z";
+ if(operatingSystem == UtilAll.OperatingSystems.MACOSX)
+ executable = System.IO.Path.Combine(Util.GetPrefixDir(), "bin/7zz");
+
+ ExecuteProcess.Result execute_result = ExecuteProcess.run (executable,
parameters, false, false);
}
app1s_import_file_path = filechooser.Filename;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]