erlware / relx

Sane, simple release creation for Erlang
http://erlware.github.io/relx
Apache License 2.0
697 stars 232 forks source link

Add support for overriding start script file type on Windows #740

Closed saleyn closed 2 years ago

saleyn commented 5 years ago

This is necessary when using cygwin or msys2 shells for doing release management and application startup on Windows.

The feature is implemented by introducing a start_script_type configuration option, which can take values: unix or win32. The default value is determined by a call to os:type/0.

When unix is provided in the Windows environment, the start script will be generated that is suitable for running by a unix shell rather than Windows cmd.

saleyn commented 5 years ago

I am a little puzzled why the tests are failing. The changes introduced don't affect the current behavior of the extended script if the start_script_type option is not defined.

tsloughter commented 5 years ago

The tests are failing because of cirrus, you can ignore that, as long as one of the test runs passes and the others are failures like timeouts it is fine.

tsloughter commented 4 years ago

Sorry I dropped the ball on this when the CI system caused failures.

The code has changed a lot so this won't merge.

I was thinking we might copy mix release configuration:

include_executables_for: [:unix],

so a list of which scripts to include instead of just a single value.

tsloughter commented 4 years ago

Oh, I just discovered there already is a start_script_type which is how powershell can be specified:

    Template = case {OsFamily, BinType} of
        {unix, _} -> bin;
        {win32, "powershell"} -> bin_windows_ps;
        {win32, _} -> bin_windows
    end,

That is annoying now since I don't want to break that but would rather have a single configuration variable like:

{include_executables_for, [unix, powershell, win32]}
tsloughter commented 4 years ago

@saleyn see https://github.com/erlware/relx/pull/817