Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/ElectronNET/build/ElectronNET.LateImport.targets
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@
<PropertyGroup>
<_OriginalPublishDir>$(PublishDir)</_OriginalPublishDir>
<PublishDir>$(_OriginalPublishDir)bin\</PublishDir>
<PublishUrl>$(PublishDir)</PublishUrl>
<DeleteExistingFiles>true</DeleteExistingFiles>
</PropertyGroup>

Expand Down Expand Up @@ -460,7 +459,7 @@
</PropertyGroup>

<PropertyGroup>
<_NpxCmd>npx electron-builder --config=./$(ElectronBuilderJson) --$(ElectronPlatform) --$(ElectronArch) -c.electronVersion=$(ElectronVersion) $(ElectronPaParams)</_NpxCmd>
<_NpxCmd>npx electron-builder --config=./$(ElectronBuilderJson) --$(ElectronPlatform) --$(ElectronArch) -c.electronVersion=$(ElectronVersion) -c.directories.output &quot;$(ElectronPublishUrlFullPath)&quot; $(ElectronPaParams)</_NpxCmd>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I removed that (need to verify). For me this resulted in a recursive loop as the output was in the same directory as the signing. That was really bad.

Since the output is anyway placed in the CWD (which is the publish directory) I don't see the direct reason for this. For me, the publish only worked when this was removed. Maybe it was an edge case, but I used a new project with a default publish config.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point is that the output should go in the directory that you specify in the publish profile.

image

When I publish the WebApp with the included profiles, all is working fine. In which configuration did it fail for you?
(electron-builder)?

When the output is not specified, it writes the output into a "dist" folder instead of the publish output folder.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you ran publish without profile and without specifying a publish output folder?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I published with a profile. And it published to the given directory, however, it got stuck in the process (as described) and the signing tool started go berserk (only seen with verbose flags provided, otherwise all of that is hidden).

The error is really nasty and as written you don't need that flag. The PublishUrl we use to specify the CWD, so I don't see why we should double it. For me it only caused havoc.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if I would not have published without a profile I don't why we should specify this. The error is really nasty as it does not only stay hidden (and fails to complete the publish process), it also eats up essentially all the disk space if not stopped in time.

Again, as the publish is done in the CWD and the electron-builder just works as designed I don't see why we should be explicit here. Have you maybe skipped signing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I think it's when

`<ElectronNetDevMode>true</ElectronNetDevMode>`

is enabled.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have seen this with the actual packages, but I guess / fear that with the dev mode it might also be true. TBH I think the actual problem is within the electron-builder. Even setting some directories as ignored did not help. It should never act like this. But we can't patch / change the electron-builder.

<_NpxCmd Condition="'$(IsLinuxWsl)' == 'true'">wsl bash -ic '$(_NpxCmd)'</_NpxCmd>
</PropertyGroup>

Expand Down