makeself icon indicating copy to clipboard operation
makeself copied to clipboard

Windows support questions

Open resistancelion opened this issue 5 years ago • 5 comments

First of all Is the idea of distributing Makeself for non-Linux platforms is good for Makeself creators? For me it will be good to have the exact same tool with same command sets on different systems. In case if someone is curious how to make polyglot shell program, here's an example

Secondly, i am curious is there a way to implement multiple target platforms for makeself? e.g --target-lin --target-win, so on... (with possibility of adding different installation scripts for different systems) As i am interested in such approach, i can try to implement this task.

Examples why it should be

  1. Not all of the Windows systems supports winrar as it is non-free anymore, 7zip had some minor issues in the past, and it looks like you are required to ship at least extra MB's of the .dll with your program. Also: Winrar hasn't got such handy feature as configurable installation scripts
  2. One game modifications, translations and scripts installing processes in most of the cases have a very few differences on the different operating systems, so, having 1 executable for installing game translation on different operating systems would be more user-friendly, than proposing a bunch of partially-working binary installers. Same of the 1st point ideas: it will be good for the modification creator to not carry much about creating different installers for different platforms.

resistancelion avatar Jan 03 '21 13:01 resistancelion

Typically, platform specific stuff is done within the embedded script you put in your archive. Makeself archives are only Bourne Shell scripts, so you can safely assume that it is available - so if you are able to start the extraction you should be able to add a bit of code to detect that you are running on a Windows system and then take appropriate steps.

I've mostly done this to distribute software among different types of Unix systems (Linux, Solaris, AIX, etc). I don't know much about the Windows bash support but I'm sure it should be doable.

megastep avatar Jan 03 '21 13:01 megastep

Typically, platform specific stuff is done within the embedded script you put in your archive. Makeself archives are only Bourne Shell scripts, so you can safely assume that it is available - so if you are able to start the extraction you should be able to add a bit of code to detect that you are running on a Windows system and then take appropriate steps.

I've mostly done this to distribute software among different types of Unix systems (Linux, Solaris, AIX, etc). I don't know much about the Windows bash support but I'm sure it should be doable.

Thanks for the reply, I am writing about idea of adding windows' batch support, if it is not prohibited by authors of the project, of course.

resistancelion avatar Jan 03 '21 13:01 resistancelion

Nothing is prohibited but really you can do anything you want within the archive itself - I would be reluctant to add Windows-specific options to Makeself itself unless really necessary though.

megastep avatar Jan 03 '21 21:01 megastep

@resistancelion The entire setup we implemented with usage of makeself-maven-plugin is specifically to be cross platform including windows. It uses git bash to accomplish usage on windows and in fact the maven plugin now even uses portable git so its no longer dependent on end user setup. Specifics on windows as noted then are in the deploy script as to what it does which isn't really a concern of makeself specifically.

hazendaz avatar Jan 05 '21 16:01 hazendaz

I created a working prototype.

https://github.com/hemnstill/makeself/releases/tag/release-2.4.5-cmd

pros:

  • same command line args
  • no external dependensies. only certuril.exe is used to extract busybox

cons:

  • payload size ~900kb (can be slightly reduced with upx)
  • virustotal result: 9/56 (antiviruses don't like it when certutil.exe is used to extract the payload)
  • busybox.exe does not support all features from makeself cli.

hemnstill avatar Jun 18 '22 15:06 hemnstill