MCPcopy Index your code
hub / github.com/AmberSahdev/Open-Interface / zip

Function zip

build.py:149–172  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

147
148
149def zip():
150 # Zip the app
151 print('Zipping the executables')
152 app_name = 'Open\\ Interface'
153
154 zip_name = 'Open-Interface-v' + str(version)
155 if platform.system() == 'Darwin': # MacOS
156 if platform.processor() == 'arm':
157 zip_name = zip_name + '-MacOS-M-Series' + '.zip'
158 else:
159 zip_name = zip_name + '-MacOS-Intel' + '.zip'
160
161 # Special zip command for macos to keep the complex directory metadata intact to keep the codesigning valid
162 zip_cli_command = 'cd dist/; ditto -c -k --sequesterRsrc --keepParent ' + app_name + '.app ' + zip_name
163 elif platform.system() == 'Linux':
164 zip_name = zip_name + '-Linux.zip'
165 zip_cli_command = 'cd dist/; zip -r9 ' + zip_name + ' ' + app_name
166 elif platform.system() == 'Windows':
167 zip_name = zip_name + '-Windows.zip'
168 zip_cli_command = 'cd dist & powershell Compress-Archive -Path \'Open Interface.exe\' -DestinationPath ' + zip_name
169
170 # input(f'zip_cli_command - {zip_cli_command} \nExecute?')
171 os.system(zip_cli_command)
172 return zip_name
173
174
175def setup():

Callers 1

buildFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected