Compare commits

..

37 Commits

Author SHA1 Message Date
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
14 changed files with 194 additions and 297 deletions

View File

@@ -14,14 +14,18 @@ jobs:
runs-on: windows-2022
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: setup-msys2
uses: msys2/setup-msys2@v2
with:
msystem: MSYS
msystem: CLANG64
update: true
install: p7zip tar mingw-w64-x86_64-qt-installer-framework
install: >-
tar
pacboy: >-
qt-installer-framework:p
7zip:p
- name: Switch to the main mirror
shell: msys2 {0}
@@ -46,11 +50,13 @@ jobs:
mv msys2-base-x86_64-[0-9]*.sfx.exe msys2-base-x86_64-latest.sfx.exe
mv msys2-x86_64-[0-9]*.exe msys2-x86_64-latest.exe
mv msys2-*.tar.xz msys2-base-x86_64-latest.tar.xz
mv msys2-*.tar.zst msys2-base-x86_64-latest.tar.zst
mv msys2-*.packages.txt msys2-base-x86_64-latest.packages.txt
sha256sum.exe msys2-*
sha256sum.exe msys2-* > msys2-checksums.txt
- name: Upload Results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: installer
path: msys2-*
@@ -65,9 +71,9 @@ jobs:
image: [2019, 2022]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: installer
@@ -101,9 +107,9 @@ jobs:
image: [2019, 2022]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: installer
@@ -134,9 +140,9 @@ jobs:
image: [2019, 2022]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: installer
@@ -167,10 +173,10 @@ jobs:
- test-docker-sfx
- test-installer
- test-sfx
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: installer

2
.gitignore vendored
View File

@@ -1,3 +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

View File

@@ -26,19 +26,14 @@ Installing the self extracting archive to `C:\msys64`:
.\msys2-base-x86_64-latest.sfx.exe -y -oC:\
```
## Build Instructions
## FAQ
```bash
# Run in a MSYS2 environment
./make-msys2-installer
```
### What's the difference between the installer and the archives?
## New Release TODO List
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.
* 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
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,90 +0,0 @@
// Run with:
// ./msys2-x86_64-$(date +'%Y%m%d').exe --platform minimal --script auto-install.js -v
// To specify the installation directory, add InstallDir="C:\custom_install\path\"
// Currently it gets stuck on the last page.
// To see graphically what's happening, remove "--platform minimal"
var install_dir = installer.value("InstallDir")
function Controller()
{
print("(print) Hello Installer World!\n");
console.log("(console.log) Hello Installer World!\n");
installer.setDefaultPageVisible(QInstaller.Introduction, true);
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.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes);
installer.setMessageBoxAutomaticAnswer("stopProcessesForUpdates", QMessageBox.Ignore);
}
Controller.prototype.IntroductionPageCallback = function()
{
gui.clickButton(buttons.NextButton);
}
Controller.prototype.TargetDirectoryPageCallback = function()
{
if (!install_dir) {
install_dir = "C:/MSYS64"
}
gui.currentPageWidget().TargetDirectoryLineEdit.setText(install_dir);
gui.clickButton(buttons.NextButton);
}
Controller.prototype.StartMenuDirectoryPageCallback = 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 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

@@ -4,13 +4,13 @@
set -e
# Download and extract https://github.com/mcmilk/7-Zip-zstd
NAME="7z21.03-zstd-x64"
CHECKSUM="531b20dfb03d8f30f61ae56a181610bbb6f3cf7cc71dac1d8f95511289de76f3"
NAME="7z22.01-zstd-x64"
CHECKSUM="d542d78397bbed8e77c221f36cad461a0d83f1263b993a7048e81df40f403fb8"
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/v21.03-v1.5.0-R2/$NAME.exe" -o "$BASE.exe"
curl --fail -L "https://github.com/mcmilk/7-Zip-zstd/releases/download/v22.01-v1.5.5-R3/$NAME.exe" -o "$BASE.exe"
fi
echo "$CHECKSUM $BASE.exe" | sha256sum --quiet --check
if [ ! -d "$BASE" ]; then

View File

@@ -1,148 +1,105 @@
#!/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
_filename3=msys2-base-${_arch}-${_date}.sfx.exe
_log=/tmp/installer-${_arch}-${_date}.log
if [ "${_arch}" = "x86_64" ]; then
_bitness=64
else
_bitness=32
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}"
_version="${_date}"
_newmsysbase="${_build}/newmsys"
_newmsys="${_newmsysbase}/msys64"
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="${_newmsys}/"*
local _compress_cmd="${_archivegen} --compression 9 ${_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
echo "[Creating tarball...]"
pushd "${_newmsysbase}" > /dev/null
/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cf "${_thisdir}/msys2-base-x86_64-${_date}.tar" msys64
popd > /dev/null
pushd ${_newmsysbase} > /dev/null
export XZ_OPT="-e9T0"
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
echo "[Creating xz archive...]"
xz -9 --keep --verbose --force --compress --threads=0 "${_thisdir}/msys2-base-x86_64-${_date}.tar"
xz --test "${_thisdir}/msys2-base-x86_64-${_date}.tar.xz"
# self extracting cli 7z archive
"${_thisdir}/create-sfx.sh" "msys${_bitness}" "${_thisdir}/${_filename3}"
echo "[Creating zstd archive...]"
zstd -T0 -22 --ultra --force "${_thisdir}/msys2-base-x86_64-${_date}.tar" -o "${_thisdir}/msys2-base-x86_64-${_date}.tar.zst"
zstd --test "${_thisdir}/msys2-base-x86_64-${_date}.tar.zst"
rm "${_thisdir}/msys2-base-x86_64-${_date}.tar"
}
create_sfx() {
echo "[Creating SFX...]"
pushd "${_newmsysbase}" > /dev/null
"${_thisdir}/create-sfx.sh" "msys64" "${_thisdir}/msys2-base-x86_64-${_date}.sfx.exe"
popd > /dev/null
}
# 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}
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" "{}" \;
}
trap exit_with_undo 1 2 15
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-x86_64-${_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 filesystem msys2-runtime --noconfirm --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-x86_64-${_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
create_archives
create_sfx
}
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,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
<Name>MSYS2 @BITNESS@bit</Name>
<Name>MSYS2</Name>
<Version>@VERSION@</Version>
<Title>MSYS2 @BITNESS@bit</Title>
<Title>MSYS2</Title>
<Publisher>The MSYS2 Developers</Publisher>
<ControlScript>control.js</ControlScript>
<StartMenuDir>MSYS2 @BITNESS@bit</StartMenuDir>
<RunProgram>@TargetDir@/msys2_shell.cmd</RunProgram>
<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>
<MaintenanceToolName>uninstall</MaintenanceToolName>
<SupportsModify>false</SupportsModify>

View File

@@ -1,5 +1,10 @@
function Controller()
{
installer.setDefaultPageVisible(QInstaller.LicenseCheck, false);
if (installer.isInstaller()) {
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
installer.setDefaultPageVisible(QInstaller.ReadyForInstallation, false);
}
}
Controller.prototype.IntroductionPageCallback = function()

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -1,39 +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;
}
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@/msys2.exe", "@StartMenuDir@/MSYS2 MSYS.lnk", "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>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>