Compare commits

...

112 Commits

Author SHA1 Message Date
Befator
6c9763a0a8 Revert "Remove the MINGW32 shortcut"
This reverts commit cf1e9b4c20.
2025-10-12 00:47:57 +02:00
Befator
3d24b45be7 Initial Befator Inc import 2025-10-12 00:47:47 +02:00
Christoph Reiter
4c976e8ef9 CI: remove arm64 sfx build again
It doesn't add much over the x86_64 one, we can re-enable it easily if needed
2025-08-30 14:08:36 +02:00
Christoph Reiter
be354de86b Build arm64 variants of everything
except tarballs, since they are the same
2025-08-23 21:45:19 +02:00
Christoph Reiter
2473ff0808 Update 7-Zip-zstd
https://github.com/mcmilk/7-Zip-zstd/releases/tag/v25.01-v1.5.7-R1
2025-08-22 11:07:47 +02:00
Christoph Reiter
f65d1b8a42 CI: drop windows-2019 jobs
The images will be removed at the end of the month:
https://github.com/actions/runner-images/issues/12045
2025-06-22 20:16:34 +02:00
Christoph Reiter
65a56be710 zizmor: allow unpinned setup-msys2
we trust our own code
2025-04-28 06:25:35 +02:00
Christoph Reiter
750994a32b CI: test on windows-11-arm
docker doesn't work because:

Step 1/3 : FROM mcr.microsoft.com/windows/servercore:ltsc2025-arm64
ltsc2025-arm64: Pulling from windows/servercore
a Windows version 10.0.26100-based image is incompatible with a 10.0.22631 host

The installer doesn't work because of #96
2025-04-15 09:53:06 +02:00
Christoph Reiter
c30215fef8 Revert "CI: skip 2025 docker job, GHA is broken"
This reverts commit de2a6ca3e7.
2025-04-15 07:43:31 +02:00
Christoph Reiter
1c7eee8426 Update 7-Zip-zstd to v24.09-v1.5.7-R1
https://github.com/mcmilk/7-Zip-zstd/releases/tag/v24.09-v1.5.7-R1
2025-03-03 10:06:31 +01:00
Christoph Reiter
f2c532a889 config: disable AllowRepositoriesForOfflineInstaller
See https://doc.qt.io/qtinstallerframework/ifw-globalconfig.html
and bf5b701b10
and https://bugreports.qt.io/browse/QTIFW-3078

This doesn't look like a feature we need, and it used to be disabled,
so disable it again.

The code it guards seems related to #96, so maybe it helps there.
2025-02-27 06:51:02 +01:00
Christoph Reiter
de2a6ca3e7 CI: skip 2025 docker job, GHA is broken
See https://github.com/actions/runner-images/issues/11582
2025-02-14 07:52:51 +01:00
Christoph Reiter
39996f539c CI: force strict default permissions to make zizmor happy
This doesn't change much as we already set it to read-only in the GUI
settings, but doesn't hurt, an makes zizmor happy.
2025-01-19 09:24:24 +01:00
Christoph Reiter
c286b296d3 CI: add a zizmor job 2025-01-18 10:40:03 +01:00
Christoph Reiter
84dfd74760 CI: build and test with windows-2025 2024-12-19 22:40:10 +01:00
Christoph Reiter
3cf8b7eabe Use WizardStyle=Modern instead of Aero
The later seems to be the default for some reason but does not
support dark mode (or breaks when dark mode is enabled).
Use the "Modern" style instead, and also set a smaller default
width while at it.

Note that the style is a QWizard concept and not QTIFW specific.

The only related upstream issue I found was
https://bugreports.qt.io/browse/QTBUG-123853

Fixes #84
2024-12-07 22:15:24 +01:00
Christoph Reiter
58f6dc63ea CI: use "persist-credentials: false" for actions/checkout
See https://woodruffw.github.io/zizmor/audits/#artipacked
2024-12-06 15:00:34 +01:00
Christoph Reiter
cf1e9b4c20 Remove the MINGW32 shortcut
We are phasing out 32-bit support, so let's not install a shortcut for it by default.
Users can still access it via the mingw32.exe directly if needed.
2024-09-23 06:45:12 +02:00
Christoph Reiter
477a2f5603 Provide a .tar.zst in addition to the .tar.xz
So people can stop using xz if they want.
2024-04-05 12:04:27 +02:00
Christoph Reiter
97d7bf58b4 Switch to CLANG64 instead
installerbase.exe is a bit smaller there
2024-02-23 13:01:51 +01:00
مهدي شينون (Mehdi Chinoune)
759168a89b generate installer on UCRT64 environment 2024-02-23 13:01:51 +01:00
Christoph Reiter
3b935b9f61 Revert "Downgrade GH actions"
This reverts commit 4d83cc210c.
2024-01-20 13:24:38 +01:00
Christoph Reiter
4d83cc210c Downgrade GH actions
they are broken: https://github.com/actions/download-artifact/issues/249
2024-01-05 17:59:39 +01:00
Christoph Reiter
6eaa6d49cd CI: update actions 2023-12-28 18:18:00 +01:00
Christoph Reiter
a3839b22e2 Generate a list of all included packages and their versions
might be useful to know what changed between installers
2023-10-26 10:31:33 +02:00
Christoph Reiter
224d05263c Update 7-Zip-zstd to v22.01-v1.5.5-R3 2023-07-17 20:06:39 +02:00
Christoph Reiter
59a34503fe Update 7-Zip-zstd to v22.01-v1.5.5-R2 2023-05-26 14:31:36 +02:00
Christoph Reiter
741fb309a2 Update 7-Zip-zstd to v22.01-v1.5.4-R4
https://github.com/mcmilk/7-Zip-zstd/releases/tag/v22.01-v1.5.4-R4
2023-03-18 11:12:57 +01:00
Christoph Reiter
e73e164c3c Revert "CI: add a workflow dispatch option to build from staging"
This reverts commit cdda721492.

Despite it defaulting to false it somehow is true when starting via the github UI.
Not sure why right now, so reverting.
2023-01-19 00:43:23 +01:00
Christoph Reiter
56d39282b5 Revert "CI: another try at skipping upload with staging"
This reverts commit b5fb298387.
2023-01-19 00:43:06 +01:00
Christoph Reiter
68a5ee8f33 Revert "add note that building from staging will not upload the installer"
This reverts commit cfd23616d2.
2023-01-19 00:43:04 +01:00
Christoph Reiter
cfd23616d2 add note that building from staging will not upload the installer 2023-01-14 15:27:45 +01:00
Christoph Reiter
b5fb298387 CI: another try at skipping upload with staging 2023-01-14 14:13:36 +01:00
Christoph Reiter
cdda721492 CI: add a workflow dispatch option to build from staging
If active it includes the staging repo, but doesn't upload
the build in the end.
2023-01-14 13:24:03 +01:00
Christoph Reiter
81f081a283 Add a clangarm64 shortcut
We enable the repo by default now, so we can stop hiding it by default.
2023-01-01 10:21:39 +01:00
Christoph Reiter
e3ead38d71 README: split out build instructions and add FAQs 2022-11-13 12:10:34 +01:00
Christoph Reiter
10a4d0854e CI: update actions 2022-11-13 11:39:50 +01:00
Christoph Reiter
f295a63b69 CI: run in a MINGW64 shell 2022-11-13 00:37:49 +01:00
Christoph Reiter
eb76bfb492 script: lots of cleanup and simplify 2022-11-13 00:26:46 +01:00
Christoph Reiter
e48c22a1dc add main 2022-11-12 23:24:30 +01:00
Christoph Reiter
e2246ea5db split up functions some more 2022-11-12 23:24:15 +01:00
Christoph Reiter
b0d576213a Merge the two installer packages
It's not clear to me why there are two of them.
Let's simplify things..
2022-11-12 23:11:44 +01:00
Christoph Reiter
d4cb165312 Switch to 7zip for the installer archive
faster to compress and smaller
2022-11-12 21:24:50 +01:00
Christoph Reiter
512da17221 script: remove _arch 2022-11-12 21:04:50 +01:00
Christoph Reiter
7a48e24250 Remove the log file handling
This just complicates things for not much gain.
2022-11-12 21:02:29 +01:00
Christoph Reiter
73aa4870d8 split the sfx creation out of the installer archive creation 2022-11-12 20:26:08 +01:00
Christoph Reiter
82a3c5ccd5 Move the page hiding into the controller
This way they are hidden right away when the installer is
started and not after the first next click.

We have to take care here to not hide pages used by the uninstaller
though.
2022-11-12 20:10:20 +01:00
Christoph Reiter
cbdbd2e246 Don't try to hide QInstaller.Introduction
It never worked (it was shown anyway), and in the new installer
framework 4.5.0 this breaks the target dir selection on the
next page.
2022-11-12 19:32:12 +01:00
Christoph Reiter
3b0215d235 Error out on Windows <8.1
We are slowly dropping support for Windows 7.
2022-10-29 14:10:25 +02:00
Christoph Reiter
c76b36f1f0 Check the Windows version and error out if it's not supported
Currently it's Windows 7+. In the future we might bump it to 8.1
(so >= kernel 6.3) .

Fixes #55
2022-10-23 09:38:08 +02:00
Christoph Reiter
1012614b7a Suggest to start a ucrt64 shell after the installer is done
see https://github.com/msys2/MINGW-packages/issues/13371
2022-10-07 21:16:08 +02:00
Christoph Reiter
56bdbbadbf CI: adjust upload condition for new default branch name 2022-09-04 06:39:52 +02:00
Christoph Reiter
07f47e5e96 Start a mingw64 shell at the end
Many new users want to compile some C code with gcc for Windows,
so that's what we suggest as first steps on the download page.

At the end of the wizard there is a "Run MSYS2 now" checkbox which
would start a MSYS shell where mingw tools aren't in path.

Run a mingw64 shell instead, so users end up in the environment the
install guide suggests and don't have to search in the start menu
for it etc.
2022-09-03 09:37:41 +02:00
Christoph Reiter
439a6c5cba Remove auto-install.js
In theory all it did can now be done via the CLI, see README.md
for details, and it's not even clear if the script still worked
as it's not tested in CI.

In case the CLI doesn't work for you let us know and we can try
to fix it, or re-instate this script again.
2022-09-03 09:34:35 +02:00
Christoph Reiter
19b98a20ac Remove 32bit support and any mention of 64bit
We haven't supported 32bit in a long time, so remove anything
referencing it.

Also remove the "64bit" tag from all names/titles/descriptions to avoid
implying that there is a different variant of the installer available.
2022-09-03 09:34:17 +02:00
Christoph Reiter
2480a1e1ae shortcuts: start launcher and rename
Instead of calling msys2_shell.cmd call the respective launchers.
This unifies the way MSYS2 is started for most users and allows them
to set launch variables in the launcher .ini files.

While at it also rename the shortcuts to reference the environment names
instead of describing the environment. Not everyone might care or know
what these mean, so just unify them with the MSYSTEM env var which is
shown when starting bash right after.

Fixes #24
2022-08-15 22:09:51 +02:00
Christoph Reiter
bb31bc4758 Run package checksum tests as well
But don't fail, since most packages are missing the checksums still.
Once we have rebuilt everything in base we can treat errors there as fatal.

This shows us what is missing still..
2022-05-03 09:50:47 +02:00
Christoph Reiter
a63c2efbb1 release todo list: update setup-msys2 first, to make sure all tests pass 2022-03-19 09:25:25 +01:00
Christoph Reiter
0f0ce8ac4a CI: prefix the matrix job name with the parent job name
so it's easier to understand what type of test it runs
2022-01-28 12:03:05 +01:00
Christoph Reiter
92cd8703f0 Fix install scripts failing when installing into the chroot
While everything can asume base is there, packages in base also
implicitely depend on the runtime (and maybe filesystem?), so install
them first.

Until now we were just lucky that pacman installed them in the right order.

Fixes #40
2022-01-28 12:03:05 +01:00
Christoph Reiter
d7119e21be CI: test syncing without a login shell and installing a package 2022-01-28 12:03:05 +01:00
Christoph Reiter
3afa802e7b Move to the 2022 image, like everywhere else 2022-01-28 12:03:05 +01:00
Christoph Reiter
109259037b Use a higher compression level for xz 2022-01-01 14:23:47 +01:00
Christoph Reiter
ff11ad435d CI: run daily 2021-12-20 08:56:37 +01:00
Christoph Reiter
5ff691e212 CI: stop testing with windows-2016
The image is going away beginning of next year.
2021-12-12 14:46:57 +01:00
Christoph Reiter
a2903688fa Update .gitignore
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
2021-11-29 17:31:21 +01:00
Christoph Reiter
c898282f3f Switch the sfx installer to zstandard
Using a 7zip fork with zstandard support: https://github.com/mcmilk/7-Zip-zstd

Saves 20% CPU when extracting, also uses ~50MB less peak memory.
Downside is a 5% larger installer.
2021-11-29 17:31:21 +01:00
Christoph Reiter
289a0c9938 Fix switching to the main mirror
The config files have changed in the mean time.
2021-11-23 09:57:15 +01:00
Christoph Reiter
097ca2e025 CI: only upload the "latest" variants 2021-11-23 09:53:01 +01:00
Mehdi Chinoune
14c8d38bc1 Use github-cli to upload installers 2021-11-23 08:56:39 +01:00
Christoph Reiter
17b1d7ee2d Revert "try py3.9 for eine/tip"
This reverts commit febbec6b28.

GH doesn't allow commits not on a branch
2021-11-20 11:56:42 +01:00
Christoph Reiter
febbec6b28 try py3.9 for eine/tip 2021-11-20 11:33:49 +01:00
Christoph Reiter
8216e9655b CI: disable concurrency 2021-11-20 09:15:02 +01:00
Mehdi Chinoune
f898970dc7 Add clang64 shortcut
Co-Authored-By: jeremyd2019 <github@jdrake.com>
2021-11-20 08:54:40 +01:00
Mehdi Chinoune
0fd65b0ee4 Remove duplicated code 2021-10-20 22:25:18 +02:00
Christoph Reiter
2779e83ac4 CI: require 2022 for upload 2021-08-24 09:03:58 +02:00
Christoph Reiter
f9dca48d21 CI: test installer with 2022 2021-08-24 08:35:22 +02:00
Christoph Reiter
26c21ec33f README: add instructions for how to create a new release 2021-06-25 16:11:16 +02:00
Christoph Reiter
dbb542e04b Add a license file 2021-06-07 06:10:39 +02:00
Christoph Reiter
1491e3b29c Update README.md 2021-06-04 10:28:46 +02:00
Christoph Reiter
6a200a8209 README: add some CLI examples 2021-06-04 10:23:00 +02:00
Christoph Reiter
13d7be8a0e Run some tests on the produced installers before uploading
Install on both server 2016 and 2019, using the qt installer and the sfx inside docker

This makes the nightly builds safer to use, since they are likely never completely broken.

Fixes #27
2021-06-03 22:30:16 +02:00
Christoph Reiter
9526399f7c CI: Add a docker image and test 2021-05-20 07:47:54 +02:00
FeRD (Frank Dana)
c0f11534c2 control.js: Use const variables 2021-05-03 22:40:23 +02:00
Christoph Reiter
9fedc87b6a MaintenanceToolName: uninstall 2021-05-03 18:12:03 +02:00
Frank Dana
7cd10e81b9 Update qt-ifw/config/config.xml 2021-05-03 18:11:19 +02:00
FeRD (Frank Dana)
b2ede322c2 Remove all modify functionality, rename binary
- Maintenance tool is now installed as 'Uninstall_MSYS2.exe'
- 'Modify' button is disabled in Windows Settings 'Apps' list
- Add/Remove and Modify choices are hidden on Introduction page,
  leaving 'Remove all components' as only available choice
- Even though it's no longer accessible, the Repository
  configuration tab of the Settings dialog is also removed
2021-05-03 18:11:19 +02:00
Christoph Reiter
02864876e3 CI: add write permissions for the upload job 2021-04-24 10:01:40 +02:00
Christoph Reiter
59f5965b5c README: Update the installer screenshot 2021-03-31 19:52:12 +02:00
Christoph Reiter
013ed1d783 Update the install icon 2021-03-31 19:50:20 +02:00
Christoph Reiter
059986c768 Add ucrt64 shortcut 2021-03-31 19:49:12 +02:00
Christoph Reiter
7b4b35f659 CI: fix syntax 2021-02-15 10:09:15 +01:00
Christoph Reiter
d5dd27fe4d CI: use the main mirror in the end 2021-02-15 10:07:03 +01:00
Christoph Reiter
7b149f78c1 Merge pull request #20 from beliaev-maksim/beliaev/optional_arg
make installation path argument default
2021-01-30 16:02:36 +01:00
Maksim Beliaev
a588bcc370 make installation path argument default 2021-01-07 11:44:22 +01:00
Christoph Reiter
8e7f4c3fe6 Run the nightly build two times a week 2020-09-26 14:36:16 +02:00
Christoph Reiter
d51f1426b6 gha: add workflow_dispatch 2020-09-03 20:18:40 +02:00
Christoph Reiter
049636c00b CI: Port to GHA
Fixes #9
2020-08-15 15:04:49 +02:00
Christoph Reiter
032322e2f7 Revert "Install filesystem first to work around some missing dependencies"
This reverts commit a76eaa8cfa.
2020-08-02 14:17:23 +02:00
Christoph Reiter
6eca2a3ba6 Log and upload the checksums to the release
So we have a trail, and I can sleep better.
2020-07-20 23:04:41 +02:00
Christoph Reiter
a76eaa8cfa Install filesystem first to work around some missing dependencies 2020-07-18 22:59:45 +02:00
Christoph Reiter
ec7c5c7ad0 Use the highest compression level for the installer
Saves 9MB and there is no difference for the install/extraction time.
2020-07-18 22:53:03 +02:00
Christoph Reiter
bc9f3ede64 Just add everything into the installer
Instead of maintaining a list ofr toplevel directories and files
that get added to the installer add everything.

Both the filesystem and the rebase package emit a warning on upgrade
because the list of path sto include wasn't updated. I don't see a reason why
we should exclude anything, so don't.

Fixes #10
2020-07-18 22:37:47 +02:00
Christoph Reiter
f0ec7840b9 Clean up README 2020-07-18 18:23:14 +02:00
Christoph Reiter
695cddc87d Remove references to i686 build which we no longer support 2020-07-18 16:33:45 +02:00
Christoph Reiter
fcc4de14cb Remove unused files 2020-07-18 16:33:26 +02:00
Christoph Reiter
6a8907277d CI: switch to a newer installer 2020-07-17 10:12:08 +02:00
Christoph Reiter
d967ccb3be Clean up CI an switch to the official installer as base 2020-05-30 14:57:20 +02:00
Christoph Reiter
e5b378fa10 Add a 7zip based sfx archive 2020-05-21 00:24:14 +02:00
Christoph Reiter
c45d2116aa Merge pull request #2 from Fabien-Chouteau/patch-1
auto-install.js: add support for custom installation dir
2020-05-20 23:20:16 +02:00
Christoph Reiter
56d9cf180c Remove the i686 nightly job
The i686 installer is deprecated, so stop building it.
2020-05-20 23:10:18 +02:00
Fabien Chouteau
6be76e2021 auto-install.js: add support for custom installation dir 2020-03-25 12:17:58 +01:00
20 changed files with 294 additions and 425 deletions

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
_cache
*.exe
*.xz
*.zst
_build

16
HACKING.md Normal file
View File

@@ -0,0 +1,16 @@
## Build Instructions
```bash
# Run in a MINGW64 environment
./make-msys2-installer
```
## New Release TODO List
* Trigger a new nightly build via https://github.com/msys2/msys2-installer/actions/workflows/build.yml or use an existing one
* Get all files with dates in their names, sign them and create checksum files (.sig and .sha256)
* Create a new git tag following format: `date -I`
* Upload the installer files to the release tag
* Update the download link and checksum for the GiHub action and verify that all tests pass: https://github.com/msys2/setup-msys2/blob/master/main.js
* Run `msys2-devtools/update-installer "$(date -I)"` on the server to copy the release from GitHub
* Update the link, name and checksum on the main website (pointing to GitHub): https://github.com/msys2/msys2.github.io/blob/source/web/index.md

26
LICENSE Normal file
View File

@@ -0,0 +1,26 @@
Copyright 2021 MSYS2 devs
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,14 +1,35 @@
# MSYS2 Installer
Nightly builds:
* x86_64: [msys2-x86_64-latest.exe](https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-x86_64-latest.exe)
* i686: [msys2-i686-latest.exe](https://github.com/msys2/msys2-installer/releases/download/nightly-i686/msys2-i686-latest.exe)
Stable builds:
* x86_64: http://repo.msys2.org/distrib/x86_64
* i686: http://repo.msys2.org/distrib/i686
![screenshot](screenshot.png)
## CLI Usage examples
Installing the GUI installer via the CLI to `C:\msys64`:
```powershell
.\msys2-x86_64-latest.exe in --confirm-command --accept-messages --root C:/msys64
```
Uninstalling an existing installation in `C:\msys64` via the CLI:
```powershell
C:\msys64\uninstall.exe pr --confirm-command
```
Installing the self extracting archive to `C:\msys64`:
```powershell
.\msys2-base-x86_64-latest.sfx.exe -y -oC:\
```
## FAQ
### What's the difference between the installer and the archives?
The installer provides some additional features such as installing shortcuts, registering an uninstaller, a GUI for selecting the installation path and automatically running a login shell at the end to initialize the MSYS2 environment.
If you unpack the archives and run a login shell once, you will get a functionally equivalent MSYS2 installation.
### What is contained in the installer/archives?
It contains the [base](https://packages.msys2.org/package/base) package and all its dependencies. You can list the contained packages using: `pactree base -lu | sort`

View File

@@ -1,78 +0,0 @@
// Run with:
// ./msys2-x86_64-$(date +'%Y%m%d').exe --platform minimal --script auto-install.js -v
// Currently it gets stuck on the last page.
// To see graphically what's happening, remove "--platform minimal"
function Controller()
{
print("(print) Hello Installer World!\n");
console.log("(console.log) Hello Installer World!\n");
installer.setDefaultPageVisible(QInstaller.Introduction, true);
installer.setDefaultPageVisible(QInstaller.TargetDirectory, false);
var page = gui.pageWidgetByObjectName( "ComponentSelectionPage" );
page.selectComponent( "com.msys2.root" );
page.selectComponent( "com.msys2.root.base" );
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
installer.setDefaultPageVisible(QInstaller.StartMenuSelection, false);
installer.setDefaultPageVisible(QInstaller.LicenseCheck, false);
installer.setDefaultPageVisible(QInstaller.ReadyForInstallation, false);
installer.setDefaultPageVisible(QInstaller.PerformInstallation, true);
installer.setDefaultPageVisible(QInstaller.InstallationFinished, true);
installer.setDefaultPageVisible(QInstaller.FinishedPage, true);
ComponentSelectionPage.selectAll();
installer.autoRejectMessageBoxes();
var result = QMessageBox.question("quit.question", "Installer", "Do you want to quit the installer?",
QMessageBox.Yes | QMessageBox.No);
console.log("(console.log) result " + result);
installer.setDefaultPageVisible(QInstaller.TargetDirectory, false);
installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes);
installer.setMessageBoxAutomaticAnswer("stopProcessesForUpdates", QMessageBox.Ignore);
}
Controller.prototype.IntroductionPageCallback = function()
{
gui.clickButton(buttons.NextButton);
}
Controller.prototype.PerformInstallationPageCallback = function()
{
var page = gui.pageWidgetByObjectName("PerformInstallationPage");
installer.setAutomatedPageSwitchEnabled(true);
gui.clickButton(buttons.NextButton);
}
Controller.prototype.InstallationFinishedPageCallback = function()
{
console.log("(console.log) InstallationFinishedPageCallback ");
var checkBox = gui.pageWidgetByObjectName("RunItCheckBox");
console.log("typeof checkBox is " + typeof checkBox);
assert(typeof checkBox === 'object');
var page = gui.pageWidgetByObjectName("InstallationFinishedPage");
gui.clickButton(buttons.NexthButton);
}
Controller.prototype.FinishedPageCallback = function()
{
console.log("(console.log) FinishedPageCallback ");
// var checkBox = gui.pageWidgetByObjectName("RunItCheckBox");
// console.log("typeof checkBox is " + typeof checkBox);
// assert(typeof checkBox === 'object');
var page = gui.pageWidgetByObjectName("FinishedPage");
page.RunItCheckBox.checked = false;
gui.clickButton(buttons.FinishButton);
}
/*
Controller.prototype.ComponentSelectionPageCallback = function()
{
var page = gui.pageWidgetByObjectName( "ComponentSelectionPage" )
page.deselectComponent( "com.nokia.ndk.tools.maemo.usbdriver" )
gui.clickButton( buttons.NextButton )
}
*/

View File

@@ -1,59 +0,0 @@
schedules:
- cron: '0 0 * * 0'
displayName: weekly build
branches:
include:
- master
always: true
jobs:
- job: MSYS
timeoutInMinutes: 360
pool:
vmImage: 'windows-2019'
strategy:
maxParallel: 5
matrix:
i686:
MSYS_DIR: msys32
BASE_REPO: msys2-ci-base-i686
ARCH: i686
x86_64:
MSYS_DIR: msys64
BASE_REPO: msys2-ci-base
ARCH: x86_64
steps:
- script: |
git clone https://github.com/msys2/$(BASE_REPO).git %CD:~0,2%\$(MSYS_DIR)
displayName: Install MSYS2
- script: |
set PATH=%CD:~0,2%\$(MSYS_DIR)\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%CD:~0,2%\$(MSYS_DIR)\usr\bin\pacman --noconfirm -Syyuu
%CD:~0,2%\$(MSYS_DIR)\usr\bin\pacman --noconfirm -Syuu
displayName: Update MSYS2
- script: |
set CHERE_INVOKING=yes
set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%CD:~0,2%\$(MSYS_DIR)\usr\bin\bash -lc "bash make-msys2-installer; cp msys2-*.exe msys2-$(ARCH)-latest.exe; cp msys2-*.tar.xz msys2-base-$(ARCH)-latest.tar.xz"
displayName: CI-Build
- task: CopyFiles@2
inputs:
contents: 'msys2-*'
targetFolder: $(Build.ArtifactStagingDirectory)
displayName: Copy installer
- task: GithubRelease@0
inputs:
githubConnection: 'msys2-installer-release-connection'
action: 'edit'
tag: nightly-$(ARCH)
assets: '$(Build.ArtifactStagingDirectory)/*'
assetUploadMode: 'delete'
addChangeLog: false
displayName: 'Create GitHub Release'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'), ne(variables['Build.Reason'], 'PullRequest'))
- task: PublishBuildArtifacts@1
displayName: Publish packages
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: $(MSYS_DIR)
condition: and(succeeded(), or(ne(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.Reason'], 'PullRequest')))

View File

@@ -1,32 +0,0 @@
#!/usr/bin/env bash
_arch=$(uname -m)
_date=$(date +'%Y%m%d')
_filename=${_arch}-msys2-${_date}.tar.xz
_log=/tmp/compress.log
echo "Creating MSYS2 archive /tmp/$_filename"
if [ -f /tmp/$_filename ]; then
rm -f /tmp/$_filename
fi
_dirs=
for curr_dir in /etc /include /lib /libexec /sbin /share /ssl /tmp /usr /var /msys2.ico /msys2_shell.cmd; do
if [[ -d $curr_dir || -f $curr_dir ]]; then
_dirs="$_dirs $curr_dir"
fi
done
if [ -n "$_dirs" ]; then
_compress_cmd="/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cvJf /tmp/${_filename} $_dirs -X /etc/compress_exclude"
cd /
eval ${_compress_cmd} | tee $_log 2>&1
_result=$?
if [ "$_result" -eq "0" ]; then
echo " done"
else
die "MSYS2 compressing fail. See $_log"
fi
fi
exit 0

View File

@@ -1,13 +0,0 @@
/etc/postinstall/postinstall.marker
/etc/group
/etc/passwd
/etc/mtab
/etc/fstab
/etc/hosts
/etc/networks
/etc/protocols
/etc/services
/home/*
/dev/*
/tmp/*
/var/tmp/*

35
create-sfx.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
# usage: ./create-sfx.sh /some/path/to/msys64 installer.exe
set -e
if [ "$MSYSTEM" = "CLANGARM64" ]; then
ARCH="arm64"
CHECKSUM="c526e8c6cb5dc0d175778f1b6b67bd1571ba8a2cf6f6b36b7c8a8d3197ad2bac"
else
ARCH="x64"
CHECKSUM="d140094f0277b49a4e895159bd734da03cd2b60fb73a65e4151edfedc612981e"
fi
# Download and extract https://github.com/mcmilk/7-Zip-zstd
NAME="7z25.01-zstd-${ARCH}"
DIR="$( cd "$( dirname "$0" )" && pwd )"
mkdir -p "$DIR/_cache"
BASE="$DIR/_cache/$NAME"
if [ ! -f "$BASE.exe" ]; then
curl --fail -L "https://github.com/mcmilk/7-Zip-zstd/releases/download/v25.01-v1.5.7-R1/$NAME.exe" -o "$BASE.exe"
fi
echo "$CHECKSUM $BASE.exe" | sha256sum --quiet --check
if [ ! -d "$BASE" ]; then
7z e -o"$BASE" "$DIR/_cache/$NAME.exe"
fi
# Create SFX installer
INPUT="$1"
OUTPUT="$2"
TEMP="$OUTPUT.payload"
rm -f "$TEMP"
"$BASE/7z" a "$TEMP" -ms1T -m0=zstd -mx22 "$INPUT"
cat "$BASE/7zCon.sfx" "$TEMP" > "$OUTPUT"
rm "$TEMP"

View File

@@ -1,149 +1,113 @@
#!/usr/bin/env bash
_thisdir="$(dirname $0)"
test "${_thisdir}" = "." && _thisdir=${PWD}
_ifwroot="${_thisdir}"/qt-ifw
_arch=$(uname -m)
set -e
_thisdir="$( cd "$( dirname "$0" )" && pwd )"
_build="${_thisdir}/_build"
_ifwroot="${_build}/qt-ifw"
_date=$(date +'%Y%m%d')
_dateqif=$(date +'%Y-%m-%d')
_version=${_date}
_filename=msys2-${_arch}-${_date}.exe
_filename2=msys2-base-${_arch}-${_date}.tar.xz
_log=/tmp/installer-${_arch}-${_date}.log
if [ "${_arch}" = "x86_64" ]; then
_bitness=64
_version="${_date}"
_newmsysbase="${_build}/newmsys"
_newmsys="${_newmsysbase}/msys64"
if [ "$MSYSTEM" = "CLANGARM64" ]; then
_arch_name="arm64"
else
_bitness=32
_arch_name="x86_64"
fi
_archivegen=/mingw${_bitness}/bin/archivegen.exe
_binarycreator=/mingw${_bitness}/bin/binarycreator.exe
_installerbase=/mingw${_bitness}/bin/installerbase.exe
_newmsysbase=/tmp/newmsys
_newmsys=${_newmsysbase}/msys"${_bitness}"
declare -a undo_commands
create_installer_archive() {
echo "[Creating installer archive...]"
_exitcode=5
exit_with_undo() {
for _cmd in ${undo_commands[@]}; do
eval "${_cmd}" | tee -a ${_log}
done
exit ${_exitcode}
}
exit_cleanly() {
_exitcode=$1; shift;
local _message=$1; shift;
echo "${_message}" | tee -a ${_log}
exit_with_undo
}
do_seds() {
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" \) -exec sed -i "s|@DATE@|${_dateqif}|g" "{}" \;
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" \) -exec sed -i "s|@VERSION@|${_version}|g" "{}" \;
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" -or -name "installscript.js" \) -exec sed -i "s|@BITNESS@|${_bitness}|g" "{}" \;
undo_commands+=("undo_seds")
}
undo_seds() {
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" \) -exec sed -i "s|<ReleaseDate>${_dateqif}<|<ReleaseDate>@DATE@<|g" "{}" \;
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" \) -exec sed -i "s|<Version>${_version}<|<Version>@VERSION@<|g" "{}" \;
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" -or -name "installscript.js" \) -exec sed -i "s|msys${_bitness}|msys@BITNESS@|g" "{}" \;
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" -or -name "installscript.js" \) -exec sed -i "s|${_bitness}bit|@BITNESS@bit|g" "{}" \;
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" -or -name "installscript.js" \) -exec sed -i "s|if (\"@BITNESS@bit\" === \"@BITNESS@bit\")|if (\"@BITNESS@bit\" === \"32bit\")|g" "{}" \;
local _data="${_ifwroot}"/packages/com.msys2.root/data
pushd / > /dev/null
mkdir -p "${_data}"
7z a -mx9 -md128m "${_data}/msys64.7z" "${_newmsys}/"*
popd > /dev/null
}
create_archives() {
local _data="${_ifwroot}"/packages/com.msys2.root.base/data
[ -d "${_data}" ] && rm -rf "${_data}"
mkdir -p "${_data}"
local _dirs=
for curr_dir in /dev /etc /var /tmp /usr /mingw32 /mingw64 /msys2_shell.cmd /msys2.exe /mingw32.exe /mingw64.exe /msys2.ini /mingw32.ini /mingw64.ini /msys2.ico /autorebase.bat autorebasebase1st.bat; do
if [[ -d ${_newmsys}${curr_dir} || -f ${_newmsys}${curr_dir} ]]; then
_dirs="${_dirs} ${_newmsys}$curr_dir"
fi
done
echo "[Creating tarball...]"
pushd "${_newmsysbase}" > /dev/null
/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cf "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar" msys64
popd > /dev/null
if [ -n "${_dirs}" ]; then
local _compress_cmd="${_archivegen} ${_data}/msys${_bitness}.7z ${_dirs}"
pushd / > /dev/null
echo "Run: ${_compress_cmd} ..." | tee -a ${_log}
eval "${_compress_cmd}" 2>&1 | tee -a ${_log}
_result=$?
if [ "${_result}" -eq "0" ]; then
echo " archivegen succeeded. Created ${_data}/msys${_bitness}.7z" | tee -a ${_log}
else
exit_cleanly "3" "archivegen failed. See ${_log}"
fi
popd > /dev/null
echo "[Creating xz archive...]"
xz -9 --keep --verbose --force --compress --threads=0 "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar"
xz --test "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar.xz"
pushd ${_newmsysbase} > /dev/null
local _compress_cmd2="/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cJf ${_thisdir}/${_filename2} msys${_bitness}"
echo "Run: ${_compress_cmd2} ..." | tee -a ${_log}
eval "${_compress_cmd2}" 2>&1 | tee -a ${_log}
_result=$?
if [ "${_result}" -eq "0" ]; then
echo " tar succeeded. Created " | tee -a ${_log}
else
die "MSYS2 compressing fail. See ${_log}"
fi
popd > /dev/null
fi
echo "[Creating zstd archive...]"
zstd -T0 -22 --ultra --force "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar" -o "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar.zst"
zstd --test "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar.zst"
rm "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar"
}
# Add -v to get more information.
make_installer() {
eval "\"${_binarycreator}\" \
-t \"${_installerbase}\" \
-p \"${_ifwroot}/packages\" \
-c \"${_ifwroot}/config/config.xml\" \
--offline-only \
\"${_filename}\" \
-v" | tee -a ${_log}
create_sfx() {
echo "[Creating SFX...]"
pushd "${_newmsysbase}" > /dev/null
"${_thisdir}/create-sfx.sh" "msys64" "${_thisdir}/msys2-base-${_arch_name}-${_date}.sfx.exe"
popd > /dev/null
}
trap exit_with_undo 1 2 15
copy_installer() {
echo "[Copying installer...]"
rm -Rf "${_ifwroot}" && cp -r "${_thisdir}"/qt-ifw "${_ifwroot}"
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" \) -exec sed -i "s|@DATE@|${_dateqif}|g" "{}" \;
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" \) -exec sed -i "s|@VERSION@|${_version}|g" "{}" \;
}
create_installer() {
echo "[Creating installer...]"
pushd "${_build}" > /dev/null
binarycreator \
-t "$(command -v installerbase)" \
-p "${_ifwroot}/packages" \
-c "${_ifwroot}/config/config.xml" \
--offline-only \
"${_thisdir}/msys2-${_arch_name}-${_date}.exe" \
-v
popd > /dev/null
}
create_chroot_system() {
[ -d ${_newmsysbase} ] && rm -rf ${_newmsysbase}
mkdir -p "${_newmsys}"
pushd "${_newmsys}" > /dev/null
echo "[Creating chroot system...]"
rm -Rf "${_newmsysbase}" && mkdir -p "${_newmsys}"
pushd "${_newmsys}" > /dev/null
mkdir -p var/lib/pacman
mkdir -p var/log
mkdir -p tmp
eval "pacman -Syu --root \"${_newmsys}\"" | tee -a ${_log}
eval "pacman -S base --noconfirm --root \"${_newmsys}\"" | tee -a ${_log}
_result=$?
if [ "${_result}" -ne "0" ]; then
exit_cleanly "1" "failed to create newmsys2 via command 'pacman -S base --noconfirm --root ${_newmsys}'"
fi
pacman -Syu --root "${_newmsys}"
pacman -S filesystem msys2-runtime --noconfirm --root "${_newmsys}"
pacman -S base --noconfirm --root "${_newmsys}"
pacman -Q --root "${_newmsys}" > "${_thisdir}/msys2-base-${_arch_name}-${_date}.packages.txt"
popd > /dev/null
}
if [ ! -f "${_archivegen}" ]; then
eval "pacman -S --noconfirm mingw${_bitness}/mingw-w64-${_arch}-qt-installer-framework" | tee -a ${_log}
fi
main() {
pacman -S --noconfirm --needed \
"${MINGW_PACKAGE_PREFIX}-qt-installer-framework" \
"${MINGW_PACKAGE_PREFIX}-7zip" \
"${MINGW_PACKAGE_PREFIX}-xz" \
"${MINGW_PACKAGE_PREFIX}-zstd" \
"tar"
if [ ! -f "${_archivegen}" ]; then
exit_cleanly "2" "installation of qt installer framework failed. See ${_log}"
fi
create_chroot_system
if [ -f "${_log}" ]; then
rm "${_log}"
fi
copy_installer
create_installer_archive
create_installer
echo "Creating MSYS2 chroot system ${_newmsys}" | tee -a ${_log}
create_chroot_system
if [ "$_arch_name" != "arm64" ]; then
create_archives
create_sfx
fi
}
echo "Creating MSYS2 installer /tmp/${_filename}" | tee -a ${_log}
if [ -f /tmp/${_filename} ]; then
rm -f /tmp/${_filename}
fi
do_seds
create_archives
make_installer
exit_cleanly "0" "All done, see ${_filename}"
main

View File

@@ -1,52 +0,0 @@
@echo off
REM Copyright (c) 2014, Ray Donnelly <mingw.android@gmail.com>
if "%1"=="" (
echo Please re-run, passing the the location of an existing MSYS2 installation
exit /b 1
)
if not exist %1\msys2_shell.cmd (
echo '%1' does not seem to be the root folder of an existing MSYS2 installation?!
exit /b 2
)
set "NEWMSYS=%CD:\=/%/newmsys/msys64"
set "NEWMSYSW=%CD%\newmsys\msys64"
echo.
echo ***********
echo * Warning *
echo ***********
echo.
echo This batch file will sync (forcibly) the 'base' group of the MSYS2 installation in '%1'
<nul set /p =.. Do you want to proceed?
choice /N
if "%errorlevel%"=="1" (
echo.
) else (
exit /b 0
)
REM set "PATH=%1\bin;%PATH%"
echo Updating 'base' group of the existing MSYS2 installation
pushd %1
REM %1\bin\bash -l -c "pacman -S base --force --noconfirm" | more /E /P
timeout 1 > NUL
popd
echo Creating new MSYS2 installation containing only 'base'
timeout 1 > NUL
pushd %1
mkdir %NEWMSYSW%\var\lib\pacman
echo bin\bash -l -c "pacman -Syu --root %NEWMSYS%"
bin\bash -l -c "pacman -Syu --root %NEWMSYS%"
exit /b 999
%1\bin\bash -l -c "pacman -S pacman --root %NEWMSYS%"
%1\bin\bash -l -c "pacman -S base --force --root %NEWMSYS%" | more /E /P
timeout 1 > NUL
popd
exit /b 0

BIN
msys2.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -1,12 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
<Name>MSYS2 @BITNESS@bit</Name>
<Name>MSYS2</Name>
<Version>@VERSION@</Version>
<Title>MSYS2 @BITNESS@bit</Title>
<Publisher>The MSYS2 Developers</Publisher>
<StartMenuDir>MSYS2 @BITNESS@bit</StartMenuDir>
<RunProgram>@TargetDir@/msys2_shell.cmd</RunProgram>
<Title>MSYS2</Title>
<Publisher>Befator Inc.</Publisher>
<ControlScript>control.js</ControlScript>
<StartMenuDir>MSYS2</StartMenuDir>
<RunProgram>@TargetDir@/ucrt64.exe</RunProgram>
<RunProgramArguments></RunProgramArguments>
<InstallerApplicationIcon>../../msys2</InstallerApplicationIcon>
<InstallerWindowIcon>../../msys2</InstallerWindowIcon>
<InstallerApplicationIcon>msys2</InstallerApplicationIcon>
<InstallerWindowIcon>msys2.ico</InstallerWindowIcon>
<InstallActionColumnVisible>false</InstallActionColumnVisible>
<WizardStyle>Modern</WizardStyle>
<WizardDefaultWidth>40em</WizardDefaultWidth>
<MaintenanceToolName>uninstall</MaintenanceToolName>
<SupportsModify>false</SupportsModify>
<RepositorySettingsPageVisible>false</RepositorySettingsPageVisible>
<SaveDefaultRepositories>false</SaveDefaultRepositories>
<AllowRepositoriesForOfflineInstaller>false</AllowRepositoriesForOfflineInstaller>
</Installer>

20
qt-ifw/config/control.js Normal file
View File

@@ -0,0 +1,20 @@
function Controller()
{
installer.setDefaultPageVisible(QInstaller.LicenseCheck, false);
if (installer.isInstaller()) {
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
installer.setDefaultPageVisible(QInstaller.ReadyForInstallation, false);
}
}
Controller.prototype.IntroductionPageCallback = function()
{
const widget = gui.currentPageWidget();
const radioNames = ["PackageManagerRadioButton", "UpdaterRadioButton"];
for (const name of radioNames) {
const el = gui.findChild(widget, name);
if (el != null) {
el.hide();
}
}
}

BIN
qt-ifw/config/msys2.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -1,38 +0,0 @@
function Component()
{
// constructor
}
Component.prototype.isDefault = function()
{
// select the component by default
return true;
}
function createShortcuts()
{
var windir = installer.environmentVariable("WINDIR");
if (windir === "") {
QMessageBox["warning"]( "Error" , "Error", "Could not find windows installation directory");
return;
}
var cmdLocation = installer.value("TargetDir") + "\\msys2_shell.cmd";
component.addOperation("CreateShortcut", cmdLocation, "@StartMenuDir@/MSYS2 MinGW 32-bit.lnk", "-mingw32", "iconPath=@TargetDir@/mingw32.exe");
component.addOperation("CreateShortcut", cmdLocation, "@StartMenuDir@/MSYS2 MinGW 64-bit.lnk", "-mingw64", "iconPath=@TargetDir@/mingw64.exe");
component.addOperation("CreateShortcut", cmdLocation, "@StartMenuDir@/MSYS2 MSYS.lnk", "-msys", "iconPath=@TargetDir@/msys2.exe");
if ("@BITNESS@bit" === "32bit") {
component.addOperation( "Execute",
["@TargetDir@\\autorebase.bat"]);
}
component.addOperation( "Execute",
["@TargetDir@\\usr\\bin\\bash.exe", "--login", "-c", "exit"]);
}
Component.prototype.createOperations = function()
{
component.createOperations();
createShortcuts();
}

View File

@@ -1,9 +0,0 @@
<?xml version="1.0"?>
<Package>
<DisplayName>MSYS2 @BITNESS@bit base</DisplayName>
<Description>Cygwin-derived Posix-like env. for Windows with Arch Linux's Pacman</Description>
<Version>@VERSION@</Version>
<ReleaseDate>@DATE@</ReleaseDate>
<Default>true</Default>
<Script>installscript.js</Script>
</Package>

View File

@@ -1,16 +1,69 @@
function cancelInstaller(message)
{
installer.setDefaultPageVisible(QInstaller.Introduction, false);
installer.setDefaultPageVisible(QInstaller.TargetDirectory, false);
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
installer.setDefaultPageVisible(QInstaller.ReadyForInstallation, false);
installer.setDefaultPageVisible(QInstaller.StartMenuSelection, false);
installer.setDefaultPageVisible(QInstaller.PerformInstallation, false);
installer.setDefaultPageVisible(QInstaller.LicenseCheck, false);
var abortText = "<font color='red'>" + message +"</font>";
installer.setValue("FinishedText", abortText);
installer.setValue("RunProgram", null);
}
function isSupported()
{
if (systemInfo.kernelType === "winnt") {
var major = parseInt(systemInfo.kernelVersion.split(".", 1));
var minor = parseInt(systemInfo.kernelVersion.split(".", 2)[1]);
// Windows >= 8.1
if (major > 6 || (major == 6 && minor >= 3)) {
return true;
}
}
return false;
}
function createShortcuts()
{
var windir = installer.environmentVariable("WINDIR");
if (windir === "") {
QMessageBox["warning"]( "Error" , "Error", "Could not find windows installation directory");
return;
}
component.addOperation("CreateShortcut", "@TargetDir@/mingw32.exe", "@StartMenuDir@/MSYS2 MINGW32.lnk", "iconPath=@TargetDir@/mingw32.exe");
component.addOperation("CreateShortcut", "@TargetDir@/mingw64.exe", "@StartMenuDir@/MSYS2 MINGW64.lnk", "iconPath=@TargetDir@/mingw64.exe");
component.addOperation("CreateShortcut", "@TargetDir@/ucrt64.exe", "@StartMenuDir@/MSYS2 UCRT64.lnk", "iconPath=@TargetDir@/ucrt64.exe");
component.addOperation("CreateShortcut", "@TargetDir@/clang64.exe", "@StartMenuDir@/MSYS2 CLANG64.lnk", "iconPath=@TargetDir@/clang64.exe");
component.addOperation("CreateShortcut", "@TargetDir@/clangarm64.exe", "@StartMenuDir@/MSYS2 CLANGARM64.lnk", "iconPath=@TargetDir@/clangarm64.exe");
component.addOperation("CreateShortcut", "@TargetDir@/msys2.exe", "@StartMenuDir@/MSYS2 MSYS.lnk", "iconPath=@TargetDir@/msys2.exe");
component.addOperation( "Execute",
["@TargetDir@\\usr\\bin\\bash.exe", "--login", "-c", "exit"]);
}
function Component() {
if (!isSupported()) {
cancelInstaller("Installation on " + systemInfo.prettyProductName + " is not supported");
return;
}
var systemDrive = installer.environmentVariable("SystemDrive");
// Use C: as a default for messed up systems.
if (systemDrive === "") {
systemDrive = "C:";
}
var targetDir = installer.value("TargetDir", systemDrive+"\\msys@BITNESS@")
var targetDir = installer.value("TargetDir", systemDrive+"\\msys64")
installer.setValue("TargetDir", targetDir);
installer.setDefaultPageVisible(QInstaller.Introduction, false);
installer.setDefaultPageVisible(QInstaller.TargetDirectory, true);
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
installer.setDefaultPageVisible(QInstaller.ReadyForInstallation, false);
installer.setDefaultPageVisible(QInstaller.StartMenuSelection, true);
installer.setDefaultPageVisible(QInstaller.LicenseCheck, false);
}
Component.prototype.createOperations = function()
{
component.createOperations();
createShortcuts();
}

View File

@@ -1,8 +1,9 @@
<?xml version="1.0"?>
<Package>
<DisplayName>MSYS2 @BITNESS@bit</DisplayName>
<DisplayName>Befator Inc. MSYS2</DisplayName>
<Description>Cygwin-derived Posix-like env. for Windows with Arch Linux's Pacman</Description>
<Version>@VERSION@</Version>
<ReleaseDate>@DATE@</ReleaseDate>
<Default>true</Default>
<Script>installscript.js</Script>
</Package>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB