Omnis Studio ZIP functionality - windows

I'm currently programming with Omnis Studio 8.x and I need your help.
I know that Omnis Studio has a specific command to compress/extract to/from its internal format but I can't find any easy method to support .zip files.
Is there an external or something better than a command-line script to manage .zip files?
Thank you for your help!

You can also look to the code examples that ship with Omnis Studio - the Java example shows how you can use java classes to work with zip files including zipping, unzipping and adding to an archive.
You could just take the object and paste it into your library.

Omnis doesn't natively support zipping and un-zipping files. You'll need to call an external utility for this.
macOS
Use $root.$runapplescript to call zip and unzip via a shell command.
Windows
On Windows, you can use Call DLL or Launch program to access external programs. The challenge with Windows is there is no consistent built-in tool for zipping and unzipping files. If you deploy to a current version of Windows 10 with PowerShell 5.1 or better, try Compress-Archive and Expand-Archive in the Microsoft.PowerShell.Archive cmdlets.
For a wider range of support, deploy 7-zip which handles .zip files.

Related

Py2Exe detected as virus. Alternatives?

So, I created a python program. Converted to exe using Py2Exe, and tried with PyInstaller and cx_freeze as well. All these trigger the program to be detected as virus by avast, avg, and others on virustotal and on my local machine.
I tried changing to a Hello World script to see if the problem is there but the results are exactly the same.
My question is, what is triggering this detection? The way in which the .exe is created?
If so, are there any other alternatives to Py2exe, Pyinstaller, cx_freeze?
You can try nuitka.
pip install -U nuitka
Example:
nuitka --recurse-all --icon=app.ico --portable helloworld.py
Website:
http://nuitka.net/
Maybe you need to install Visual C++ 2015 Build Tools for compile.
http://landinghub.visualstudio.com/visual-cpp-build-tools
If you download Nuitka package, you will find a Trojan files in the folder.
If you use this library, you will create a exe file with a Trojan embedded in the exe file.
It converts files much faster than other similar libraries with no errors.

How do you get Firefox in a portable format for Mac, Linux and Windows?

Is it possible to get Firefox in a portable format?
The only "portable" version of FireFox I can find is on portableapps.com and it is just an installer, and from what I hear you cannot package that in your own application.
How do you get a portable version of Firefox for Windows, Mac or Linux?
For windows, just download the installer and run the Exe to completion then zip the result. This seems to work fine for use with Automated browser testing which is what I was using the portable zip for.
For Linux, you can just literally use the tar.bz2 file. It is basically portable in the default distribution already.
And for Mac you can mount the DMG file then just copy the zip contents.
One thing I also needed to do was to manually go through each file that started as executable and re-make them executable. Because the process of zipping up the files made the files non-executable.

zip/compression command under Windows environment for COBOL program

I need to issue a zip/compression command from a COBOL program running on Windows platform, is there any built-in Windows specific command line command to zip the list of specified files, I cannot rely on 3rd party zip tools like winzip or 7zip.
I have tried compact command, is there any other alternatives to achieve this? please suggest.
Use zip.exe and unzip.exe available from http://www.info-zip.org/. The windows binaries can be downloaded directly from http://sourceforge.net/projects/infozip/files/.

Is it possible to unzip .ZIP file using .BAT command on Windows XP?

Is it possible to unzip .ZIP file using .BAT command on Windows XP? we have file.zip how to create a .BAT commands file to unzip\unpack it to some folder. USING ONLY NATIVE WINDOWS XP programms and commands.
So.. How to do such thing? (code example, please)
Yes.
But it involves using "scripting" and the use of System.FileSystemObject (a good keyword). You should be able to use cscript/WSH which can run VBScript or JScript (WSH 5.6 comes with XP). The general idea is here. There are some other interesting "issues" with this approach though; the operations runs asynchronously and the compression dialog box may appear -- but it can be done using standard XP tools.
I would recommend downloading 7-zip. It is a 200~400k standalone command-line executable (depending on version), but it requires an initial "install" to grab the executable first. You don't need the GUI to run 7-zip.
Short answer: No.
Explanation: https://serverfault.com/questions/39071/does-windows-have-a-built-in-zip-command-for-the-command-line
No, there is no command line support for the native zip/unzip library that comes with windows XP. The only solution would be to use a uncompressing library.

How to create ZIP files with specific encoding

On my Linux server I have some files with accented names (test-éàïù.zip).
When I add them to a new ZIP file using 7zip command-line tool, the charset/encoding information is not saved and when opened on a Windows computer, the archive does not correctly display filenames.
I know that 7zip creates Zip V1.0 archives, not 2.0. Maybe the charset is limited to MSDos charset ?
How could I specify an encoding using 7zip or another zip tool, in order to get portable archives?
This is a superuser question, BUT...
ZIP uses a default codepage of IBM437. There is the possibility to use UTF-8, but not all zip tools and libraries support that. Some zip tools will do arbitrary code pages, even though the zip spec allows only IBM437 or UTF-8. I think WinRar is one such tool.
DotNetZip does encoding. It will do UTF-8 or an arbitrary code page. if you're writing an app, there is a .NET library. If you are running from a script, there are command line tools. Either way, DotNetZip requires .NET. You will need Mono to run it on Linux.
example for the command line:
zipit.exe Olivier.zip -cp 860 test-éàïù.txt
(to use the 860 codepage) I'm not sure that Windows Explorer correctly handles zipfiles with alternate encoding for the filenames within the zips.
See How to zip specified folders with Command Line for more info on that zipit.exe tool.
Create a ZIP file using specified code page:
7z a -mcp=<code_page> -tzip <archive_name> <file_names>...
Extract files from a ZIP file using specified code page:
7z x -mcp=<code_page> <archive_name>
I know that 7zip creates Zip V1.0 archives, not 2.0.
I couldn't work out how to use 7zip to create a zip v1.0 archive.
You can create version 1 ZIP archives using Info-Zip’s zip 1.1, which is still available (download from the FTP http://infozip.sourceforge.net/Zip.html#Downloads). You’ll need to build it from source (make sysv on a Linux system); then you’ll be able to use the newly-built zip to create old-format archives:
]# ./zip filename.zip file1 file2 file3
]# file filename.zip
]# filename.zip: Zip archive data, at least v1.0 to extract

Resources