Build Script: Compress and move Archive

On macOS.

Is is possible to ZIP (Compress) a Linux Build and move the Archive to a Project Subfolder, as part of the Build Process?

Example Build Path: /Users/sascha/Documents/Xojo Projekte/Test/Builds - Test.xojo_project/Linux 64 bit/Test
Example Target Folder for the Archive: /Users/sascha/Documents/Xojo Projekte/Test/Output

[code]Dim s As String
s = “zip -r “”/Users/sascha/Documents/Xojo Projekte/Test/Output/”" “”" + CurrentBuildLocationNative + “”""

Dim OutputString As String
OutputString = DoShellCommand( s)[/code]

might want to make sure you use a full path to zip JUST to be safe

Hmmm… the created archive contains the full folder structure “\Users\sascha\Documents\Xojo Projekte\Test\Builds - Test.xojo_project\Linux 64 bit\Test” within it. But i can’t just do a cd /Users/sascha/Documents/Xojo Projekte/Builds - Test.xojo_project/Linux 64 bit/Test/ in the Script before i compress the files, or can i?

cd /to/path && zip ... ?

Yes! That works like a charm.

Thank you @Norman Palardy and @Jürg Otter :slight_smile:

[code]Dim s As String
s = “cd “”/Users/sascha/Documents/Xojo Projekte/Test/Builds - Test.xojo_project/Linux 64 bit/Test/”" && "
s = s + “zip -r “”/Users/sascha/Documents/Xojo Projekte/Test/Output/”" *"

Dim OutputString As String
OutputString = DoShellCommand( s)[/code]

Tried it all the time with a “;” as the command divider… :wink:

Spaces before and after?

&& : 2nd will run if 1st succeeded
|| : 2nd will run if 1st failed
; will always be executed

It may be possible i had two " which prevented it to work with the ; divider. But it works now and will save me a few steps after my Builds for releases.

Thank you :slight_smile:

I am now packing my Bags and will be off for the Weekend.

Have a nice Weekend to all of you :smiley: