-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created Windows Installer + Nightly Builds #357
base: master
Are you sure you want to change the base?
Conversation
I would drop the binary files in the commit. |
Removed both the built application and the installer exe. To reproduce either one can run the powershell script.
I've updated it so it does not have the application or the installer. Running the Powershell script should generate both. |
|
||
# Default env configuration, gets overwritten by the C# code's settings handler | ||
$env:ASPNETCORE_ENVIRONMENT = "Production" | ||
$env:ASPNETCORE_URLS = "http://*:7801" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the majority of this script looks like... you converted the launch-windows.bat file to powershell? (there's already a powershell launch script available...) and doesn't actually make sense to be included with the installer
SetOutPath "$INSTDIR" | ||
# Add files to be installed | ||
File /r /x *.bat /x *.sh /x *.ps1 /x StableSwarmUI-Installer.exe /x DOCKERFILE /x .dockerignore \ | ||
/x docker-compose.yml /x colab /x .github /x .git /x bin ${__FILEDIR__}\*.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're just... installing the Swarm files to a path? So still a raw source file install, but minus the scripts and files essential to actually run it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured since the source files are packaged into an exe now they would not need the other scripts. In the powershell script the source code is built so they could show up as an application since I thought the batch file would be less familiar for a normal consumer. I can leave the mac and linux bash files but I thought it wouldn't be too helpful on a windows installer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it's still including eg *.cs
code files is what's confusing me - it's still dumping source code, just minus the bits to run it.
It also appears to not be excluding eg Data
, Models
, dlbackend
, etc. that would make a -giant- installer file if ever accidentally ran from an in-use directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I seemed to overlooked that. I'll remove the .cs files and have it exclude the mentioned directories but still create empty folders for the models and similar folders. I thought the script to make the installer would only be ran by the remote repository for the newest build but I suppose it doesn't hurt to make it foolproof if ran on a computer with a model loaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swarm's code autogenerates all needed folders already you don't need to worry about creating them.
How would updating work with this setup? ie how does an end user who installed with this update to a newer version of Swarm? |
shell: pwsh | ||
run: ./nightly_build.ps1 | ||
|
||
- name: Create Release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating a new release nightly would quickly spam the releases page - it would probably make more sense for it to just edit the file into the latest release rather than making a whole new release every time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was thinking about that, I will change it so it edits the same release.
oh btw, I recommend testing carefully - run an install and go through things like generating some images, using custom comfy workflows, etc. A particular point I'm worried about is, if you open up the C# in Visual Studio and track down usages of |
Yeah, I'll make sure to comb through the C# code and run models before pushing code. I'll let you know once I incorporate all of these changes so it can be reviewed. |
Created two scripts, a powershell script and nsis script, that work to compile the StableSwarmUI visual studio project into an exe and package it into an installer using NSIS. Also created a GitHub workflow to create a new nightly release every night, but the release portions of the workflow can be adjusted if you only wish to have a new build every week or so. (Can be deleted if unnecessary)
The installer comes with an uninstaller, registers it with Control Panel, and shares the same icon and Licensing as the original project.
Please let me know if I need to make any changes before it can be merged.