Skip to content

Commit

Permalink
Improvements [v0.6] (#2)
Browse files Browse the repository at this point in the history
* Organize start menu icons

* Add filename override to seed

* Extract 7za once

* Set up components and install types

Add option to choose a branch
Fix install size

* Remove app version always saying "master"

* Support for conditionally installing dependencies (still disabled in setup)

* Simplify Git install

* Simplify Python install

* Make a custom options page

* Update readme

* Update 7-zip, add licenses

* Optimize custom page using a type

* Bump version just so I don't forget

* Disable resizable wizard

* Inject dependency versions

into components page and ready page

* "Bring your own dependencies"

* Save port in config.ini

* Use local repo when /LOCALREPO is provided

* Update readme

* Update installer messages

* Ensure that the correct executable was selected

* Configure custom Python using v(irtual)env (with fallbacks)

* Rename artifact and deployed file

* Fix NSSM regression

* Hide virtualenv `Exec`s

* Decouple ParseDependency and IDP

* Remove defined size from seed download

* Calculate MaxProgress for dependency install page
  • Loading branch information
sharkykh authored and medariox committed Jun 26, 2019
1 parent 9b480cc commit d33b6ab
Show file tree
Hide file tree
Showing 9 changed files with 565 additions and 95 deletions.
554 changes: 475 additions & 79 deletions Medusa.iss

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# MedusaInstaller
A Windows Installer for Medusa

**NOTE:** This installer intentionally ignores any existing installations of Git or Python you might already have installed on your system. If you would prefer to use those versions, we recommend installing Medusa manually.
### **Please note:**
By default, this installer provides the dependencies required to run Medusa.
If you have Git or Python already installed on your system, and you would prefer to use those versions,
you may deselect the dependencies you already have and provide a path to the already-installed versions.

Features
--------
Expand All @@ -13,6 +16,7 @@ Here are some of the features of MedusaInstaller:
- Creates Start Menu shortcuts
- When uninstalling, asks user if they want to delete or keep their database and configuration
- Allows configuring the web UI port during install
- Allows configuring the branch during install

The install script is written using the excellent [Inno Setup](http://www.jrsoftware.org/isinfo.php) by Jordan Russell.

Expand Down
21 changes: 12 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,16 @@ before_build:
Write-Warning "$message`n$details" `
}
- ps: |-
$env:ReleaseVersion = Select-String -Path .\Medusa.iss `
-Pattern '^#define\sMedusaInstallerVersion\s"v([\d.]+)"' | `
% { $($_.matches.groups[1]).Value };
build_script:
- ps: '& "${env:ProgramFiles(x86)}\Inno Setup 6\iscc.exe" /Q Medusa.iss'
# Set output file to: "Output\MedusaInstaller-[commit_hash[:7]].exe"
- ps: $env:OutputFile = "MedusaInstaller-" + $env:APPVEYOR_REPO_COMMIT.Substring(0, 7);
- ps: '& "${env:ProgramFiles(x86)}\Inno Setup 6\iscc.exe" /O"Output" /F"$env:OutputFile" /Q Medusa.iss;'
- ps: $env:InstallerFile = "Output\${env:OutputFile}.exe";

test: off

Expand All @@ -69,8 +77,8 @@ notifications:
</ul>
artifacts:
- path: Output\MedusaInstaller.exe
name: MedusaInstaller.exe
- path: $(InstallerFile)
name: MedusaInstaller-$(ReleaseVersion).exe

environment:
GH_TOKEN:
Expand All @@ -92,11 +100,6 @@ before_deploy:
throw "$message`n$details" `
}
- ps: |-
$env:ReleaseVersion = Select-String -Path .\Medusa.iss `
-Pattern '^#define\sMedusaInstallerVersion\s"v([\d.]+)"' | `
% { $($_.matches.groups[1]).Value };
- ps: |-
$headers = @{
"Authorization" = "Bearer $env:GH_TOKEN"
Expand All @@ -121,6 +124,6 @@ deploy:
force_update: true # replaces current release
draft: true # release as a draft
auth_token: $(GH_TOKEN)
artifact: MedusaInstaller.exe
artifact: MedusaInstaller-$(ReleaseVersion).exe
on:
branch: master # release from master branch only
21 changes: 16 additions & 5 deletions run_installer.cmd
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
:: Run the installer with the local seed and external files

@ECHO OFF
SETLOCAL EnableDelayedExpansion

CALL :NORMALIZEPATH "."
SET ROOT=%RETVAL%
SET INSTALLER="%ROOT%\Output\MedusaInstaller.exe"

if not exist %INSTALLER% (
echo Installer not found, have you compiled the .iss file?
IF NOT EXIST %INSTALLER% (
ECHO Installer not found, have you compiled the .iss file?
EXIT /B 1
)

IF "%~1" NEQ "" (
SET REPO=%~dpfn1
IF NOT EXIST !REPO!\ (
ECHO Provided local repo location does not exist.
EXIT /B 1
)
SET LOCALREPO=/LOCALREPO="!REPO!"
) ELSE (
SET LOCALREPO=
)

:: Runs the installer with the local seed and local install files
%INSTALLER% ^
/SEED="%ROOT%\seed.ini" ^
/LOCALFILES="%ROOT%\files" ^
/LOCALREPO="%ROOT%\repo" ^
/LOG="%ROOT%\Output\installer.log" ^
%*
%LOCALREPO%

:: ========== FUNCTIONS ==========
EXIT /B
EXIT /B %ERRORLEVEL%

:NORMALIZEPATH
SET RETVAL=%~dpfn1
Expand Down
4 changes: 3 additions & 1 deletion seed.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
[Installer]
Version=10005
Version=10006
DownloadUrl=https://github.com/pymedusa/MedusaInstaller

[Python.x86]
url=https://www.nuget.org/api/v2/package/pythonx86/3.7.3
filename=pythonx86.3.7.3.nupkg
size=10974884
sha1=46330a0e3b40d1b9d16593e9d4993aac28b6c163

[Python.x64]
url=https://www.nuget.org/api/v2/package/python/3.7.3
filename=python.3.7.3.nupkg
size=11466309
sha1=1aeffcacdfd5b85855120ee321595b2af43720f3

Expand Down
2 changes: 2 additions & 0 deletions seed_data.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ IF NOT EXIST %1 (
EXIT /B 1
)

SET FILENAME=%~nx1
SET SIZE=%~z1
FOR /F "tokens=*" %%i IN ('CertUtil -hashfile "%~1" SHA1 ^| find /i /v "SHA1" ^| find /i /v "certutil"') do (
SET SHA1=%%i
)

echo filename=%FILENAME%
echo size=%SIZE%
echo sha1=%SHA1%
30 changes: 30 additions & 0 deletions utils/7za-License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
7-Zip Extra
~~~~~~~~~~~
License for use and distribution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Copyright (C) 1999-2019 Igor Pavlov.

7-Zip Extra files are under the GNU LGPL license.


Notes:
You can use 7-Zip Extra on any computer, including a computer in a commercial
organization. You don't need to register or pay for 7-Zip.


GNU LGPL information
--------------------

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You can receive a copy of the GNU Lesser General Public License from
http://www.gnu.org/
Binary file modified utils/7za.exe
Binary file not shown.
22 changes: 22 additions & 0 deletions utils/nssm-License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2016, Alexander <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

0 comments on commit d33b6ab

Please sign in to comment.