Compare commits
55 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c9763a0a8 | ||
|
|
3d24b45be7 | ||
|
|
4c976e8ef9 | ||
|
|
be354de86b | ||
|
|
2473ff0808 | ||
|
|
f65d1b8a42 | ||
|
|
65a56be710 | ||
|
|
750994a32b | ||
|
|
c30215fef8 | ||
|
|
1c7eee8426 | ||
|
|
f2c532a889 | ||
|
|
de2a6ca3e7 | ||
|
|
39996f539c | ||
|
|
c286b296d3 | ||
|
|
84dfd74760 | ||
|
|
3cf8b7eabe | ||
|
|
58f6dc63ea | ||
|
|
cf1e9b4c20 | ||
|
|
477a2f5603 | ||
|
|
97d7bf58b4 | ||
|
|
759168a89b | ||
|
|
3b935b9f61 | ||
|
|
4d83cc210c | ||
|
|
6eaa6d49cd | ||
|
|
a3839b22e2 | ||
|
|
224d05263c | ||
|
|
59a34503fe | ||
|
|
741fb309a2 | ||
|
|
e73e164c3c | ||
|
|
56d39282b5 | ||
|
|
68a5ee8f33 | ||
|
|
cfd23616d2 | ||
|
|
b5fb298387 | ||
|
|
cdda721492 | ||
|
|
81f081a283 | ||
|
|
e3ead38d71 | ||
|
|
10a4d0854e | ||
|
|
f295a63b69 | ||
|
|
eb76bfb492 | ||
|
|
e48c22a1dc | ||
|
|
e2246ea5db | ||
|
|
b0d576213a | ||
|
|
d4cb165312 | ||
|
|
512da17221 | ||
|
|
7a48e24250 | ||
|
|
73aa4870d8 | ||
|
|
82a3c5ccd5 | ||
|
|
cbdbd2e246 | ||
|
|
3b0215d235 | ||
|
|
c76b36f1f0 | ||
|
|
1012614b7a | ||
|
|
56bdbbadbf | ||
|
|
07f47e5e96 | ||
|
|
439a6c5cba | ||
|
|
19b98a20ac |
@@ -1,13 +0,0 @@
|
|||||||
FROM mcr.microsoft.com/windows/servercore:ltsc2019
|
|
||||||
|
|
||||||
COPY ./msys2-base-x86_64-latest.sfx.exe /msys2.exe
|
|
||||||
|
|
||||||
RUN powershell -Command \
|
|
||||||
$ErrorActionPreference = 'Stop'; \
|
|
||||||
$ProgressPreference = 'SilentlyContinue'; \
|
|
||||||
/msys2.exe -y -oC:\; \
|
|
||||||
function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
|
|
||||||
msys ' '; \
|
|
||||||
msys 'pacman --noconfirm -Syuu'; \
|
|
||||||
msys 'pacman --noconfirm -Syuu'; \
|
|
||||||
msys 'pacman --noconfirm -Scc';
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
FROM mcr.microsoft.com/windows/servercore:ltsc2022
|
|
||||||
|
|
||||||
COPY ./msys2-base-x86_64-latest.sfx.exe /msys2.exe
|
|
||||||
|
|
||||||
RUN powershell -Command \
|
|
||||||
$ErrorActionPreference = 'Stop'; \
|
|
||||||
$ProgressPreference = 'SilentlyContinue'; \
|
|
||||||
/msys2.exe -y -oC:\; \
|
|
||||||
function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
|
|
||||||
msys ' '; \
|
|
||||||
msys 'pacman --noconfirm -Syuu'; \
|
|
||||||
msys 'pacman --noconfirm -Syuu'; \
|
|
||||||
msys 'pacman --noconfirm -Scc';
|
|
||||||
181
.github/workflows/build.yml
vendored
181
.github/workflows/build.yml
vendored
@@ -1,181 +0,0 @@
|
|||||||
name: 'build'
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 3 * * *'
|
|
||||||
|
|
||||||
concurrency: nope
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-installer:
|
|
||||||
runs-on: windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: setup-msys2
|
|
||||||
uses: msys2/setup-msys2@v2
|
|
||||||
with:
|
|
||||||
msystem: MSYS
|
|
||||||
update: true
|
|
||||||
install: p7zip tar mingw-w64-x86_64-qt-installer-framework
|
|
||||||
|
|
||||||
- name: Switch to the main mirror
|
|
||||||
shell: msys2 {0}
|
|
||||||
run: |
|
|
||||||
echo 'Server = https://repo.msys2.org/mingw/$repo/' > /etc/pacman.d/mirrorlist.mingw
|
|
||||||
echo 'Server = https://repo.msys2.org/msys/$arch/' > /etc/pacman.d/mirrorlist.msys
|
|
||||||
pacman-conf.exe
|
|
||||||
|
|
||||||
- name: Update using the main mirror & Check install
|
|
||||||
run: |
|
|
||||||
msys2 -c 'pacman --noconfirm -Suuy'
|
|
||||||
msys2 -c 'pacman --noconfirm -Suu'
|
|
||||||
msys2 -c 'pacman -Qkq'
|
|
||||||
|
|
||||||
- name: Build Installer
|
|
||||||
shell: msys2 {0}
|
|
||||||
run: |
|
|
||||||
bash make-msys2-installer
|
|
||||||
|
|
||||||
- name: Create 'latest' Variants and Checksums
|
|
||||||
run: |
|
|
||||||
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
|
|
||||||
sha256sum.exe msys2-*
|
|
||||||
sha256sum.exe msys2-* > msys2-checksums.txt
|
|
||||||
|
|
||||||
- name: Upload Results
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: installer
|
|
||||||
path: msys2-*
|
|
||||||
|
|
||||||
test-installer:
|
|
||||||
name: installer-${{ matrix.image }}
|
|
||||||
runs-on: windows-${{ matrix.image }}
|
|
||||||
needs: build-installer
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
image: [2019, 2022]
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: installer
|
|
||||||
|
|
||||||
- name: Install
|
|
||||||
run: |
|
|
||||||
./msys2-x86_64-latest.exe in --confirm-command --accept-messages --root C:/msys2-install-test
|
|
||||||
|
|
||||||
- name: Test without Login Shell
|
|
||||||
run: |
|
|
||||||
C:\msys2-install-test\usr\bin\pacman.exe -Syy
|
|
||||||
C:\msys2-install-test\usr\bin\pacman.exe --noconfirm -S vim
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman --version"
|
|
||||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Qkv"
|
|
||||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Syy"
|
|
||||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman --noconfirm -S git"
|
|
||||||
|
|
||||||
- name: Uninstall
|
|
||||||
run: |
|
|
||||||
C:\msys2-install-test\uninstall.exe pr --confirm-command
|
|
||||||
|
|
||||||
test-docker-sfx:
|
|
||||||
name: docker-sfx-${{ matrix.image }}
|
|
||||||
runs-on: windows-${{ matrix.image }}
|
|
||||||
needs: build-installer
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
image: [2019, 2022]
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: installer
|
|
||||||
|
|
||||||
- name: Build image
|
|
||||||
run: |
|
|
||||||
docker build -t msys2-base -f ./.ci/Dockerfile.${{ matrix.image }} .
|
|
||||||
|
|
||||||
- name: Test without Login Shell
|
|
||||||
run: |
|
|
||||||
docker run msys2-base C:\msys64\usr\bin\pacman.exe -Syy
|
|
||||||
docker run msys2-base C:\msys64\usr\bin\pacman.exe --noconfirm -S vim
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman --version"
|
|
||||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Qkv"
|
|
||||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Qkk || true"
|
|
||||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Syy"
|
|
||||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm git"
|
|
||||||
|
|
||||||
test-sfx:
|
|
||||||
name: sfx-${{ matrix.image }}
|
|
||||||
runs-on: windows-${{ matrix.image }}
|
|
||||||
needs: build-installer
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
image: [2019, 2022]
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: installer
|
|
||||||
|
|
||||||
- name: Install
|
|
||||||
run: |
|
|
||||||
./msys2-base-x86_64-latest.sfx.exe -y -oC:/msys2-install-test
|
|
||||||
|
|
||||||
- name: Test without Login Shell
|
|
||||||
run: |
|
|
||||||
$env:Path = 'C:\msys2-install-test\msys64\usr\bin;' + $env:Path
|
|
||||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman-key --init"
|
|
||||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman-key --populate"
|
|
||||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman -Syy"
|
|
||||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman --noconfirm -S vim"
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman --version"
|
|
||||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -Qkv"
|
|
||||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -Qkk || true"
|
|
||||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -Syy"
|
|
||||||
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm git"
|
|
||||||
|
|
||||||
upload-nightly:
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
needs:
|
|
||||||
- test-docker-sfx
|
|
||||||
- test-installer
|
|
||||||
- test-sfx
|
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: installer
|
|
||||||
|
|
||||||
- name: Upload Installers
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
gh release upload nightly-x86_64 msys2-* --clobber -R ${{ github.repository }}
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
|||||||
_cache
|
_cache
|
||||||
*.exe
|
*.exe
|
||||||
*.xz
|
*.xz
|
||||||
|
*.zst
|
||||||
|
_build
|
||||||
16
HACKING.md
Normal file
16
HACKING.md
Normal 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
|
||||||
25
README.md
25
README.md
@@ -1,9 +1,5 @@
|
|||||||
# MSYS2 Installer
|
# MSYS2 Installer
|
||||||
|
|
||||||
## Nightly build
|
|
||||||
|
|
||||||
https://github.com/msys2/msys2-installer/releases/tag/nightly-x86_64
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## CLI Usage examples
|
## CLI Usage examples
|
||||||
@@ -26,19 +22,14 @@ Installing the self extracting archive to `C:\msys64`:
|
|||||||
.\msys2-base-x86_64-latest.sfx.exe -y -oC:\
|
.\msys2-base-x86_64-latest.sfx.exe -y -oC:\
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build Instructions
|
## FAQ
|
||||||
|
|
||||||
```bash
|
### What's the difference between the installer and the archives?
|
||||||
# Run in a MSYS2 environment
|
|
||||||
./make-msys2-installer
|
|
||||||
```
|
|
||||||
|
|
||||||
## 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
|
If you unpack the archives and run a login shell once, you will get a functionally equivalent MSYS2 installation.
|
||||||
* 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`
|
### What is contained in the installer/archives?
|
||||||
* 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
|
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`
|
||||||
* 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
|
|
||||||
|
|||||||
@@ -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 )
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
17
create-sfx.sh
Normal file → Executable file
17
create-sfx.sh
Normal file → Executable file
@@ -3,21 +3,28 @@
|
|||||||
|
|
||||||
set -e
|
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
|
# Download and extract https://github.com/mcmilk/7-Zip-zstd
|
||||||
NAME="7z21.03-zstd-x64"
|
NAME="7z25.01-zstd-${ARCH}"
|
||||||
CHECKSUM="531b20dfb03d8f30f61ae56a181610bbb6f3cf7cc71dac1d8f95511289de76f3"
|
|
||||||
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
mkdir -p "$DIR/_cache"
|
mkdir -p "$DIR/_cache"
|
||||||
BASE="$DIR/_cache/$NAME"
|
BASE="$DIR/_cache/$NAME"
|
||||||
if [ ! -f "$BASE.exe" ]; then
|
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/v25.01-v1.5.7-R1/$NAME.exe" -o "$BASE.exe"
|
||||||
fi
|
fi
|
||||||
echo "$CHECKSUM $BASE.exe" | sha256sum --quiet --check
|
echo "$CHECKSUM $BASE.exe" | sha256sum --quiet --check
|
||||||
if [ ! -d "$BASE" ]; then
|
if [ ! -d "$BASE" ]; then
|
||||||
7z e -o"$BASE" "$DIR/_cache/$NAME.exe"
|
7z e -o"$BASE" "$DIR/_cache/$NAME.exe"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Creat SFX installer
|
# Create SFX installer
|
||||||
INPUT="$1"
|
INPUT="$1"
|
||||||
OUTPUT="$2"
|
OUTPUT="$2"
|
||||||
TEMP="$OUTPUT.payload"
|
TEMP="$OUTPUT.payload"
|
||||||
@@ -25,4 +32,4 @@ TEMP="$OUTPUT.payload"
|
|||||||
rm -f "$TEMP"
|
rm -f "$TEMP"
|
||||||
"$BASE/7z" a "$TEMP" -ms1T -m0=zstd -mx22 "$INPUT"
|
"$BASE/7z" a "$TEMP" -ms1T -m0=zstd -mx22 "$INPUT"
|
||||||
cat "$BASE/7zCon.sfx" "$TEMP" > "$OUTPUT"
|
cat "$BASE/7zCon.sfx" "$TEMP" > "$OUTPUT"
|
||||||
rm "$TEMP"
|
rm "$TEMP"
|
||||||
@@ -1,148 +1,113 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
_thisdir="$(dirname $0)"
|
set -e
|
||||||
test "${_thisdir}" = "." && _thisdir=${PWD}
|
|
||||||
_ifwroot="${_thisdir}"/qt-ifw
|
_thisdir="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
_arch=$(uname -m)
|
_build="${_thisdir}/_build"
|
||||||
|
_ifwroot="${_build}/qt-ifw"
|
||||||
_date=$(date +'%Y%m%d')
|
_date=$(date +'%Y%m%d')
|
||||||
_dateqif=$(date +'%Y-%m-%d')
|
_dateqif=$(date +'%Y-%m-%d')
|
||||||
_version=${_date}
|
_version="${_date}"
|
||||||
_filename=msys2-${_arch}-${_date}.exe
|
_newmsysbase="${_build}/newmsys"
|
||||||
_filename2=msys2-base-${_arch}-${_date}.tar.xz
|
_newmsys="${_newmsysbase}/msys64"
|
||||||
_filename3=msys2-base-${_arch}-${_date}.sfx.exe
|
|
||||||
_log=/tmp/installer-${_arch}-${_date}.log
|
if [ "$MSYSTEM" = "CLANGARM64" ]; then
|
||||||
if [ "${_arch}" = "x86_64" ]; then
|
_arch_name="arm64"
|
||||||
_bitness=64
|
|
||||||
else
|
else
|
||||||
_bitness=32
|
_arch_name="x86_64"
|
||||||
fi
|
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
|
local _data="${_ifwroot}"/packages/com.msys2.root/data
|
||||||
|
pushd / > /dev/null
|
||||||
exit_with_undo() {
|
mkdir -p "${_data}"
|
||||||
for _cmd in ${undo_commands[@]}; do
|
7z a -mx9 -md128m "${_data}/msys64.7z" "${_newmsys}/"*
|
||||||
eval "${_cmd}" | tee -a ${_log}
|
popd > /dev/null
|
||||||
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" "{}" \;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
create_archives() {
|
create_archives() {
|
||||||
local _data="${_ifwroot}"/packages/com.msys2.root.base/data
|
echo "[Creating tarball...]"
|
||||||
[ -d "${_data}" ] && rm -rf "${_data}"
|
pushd "${_newmsysbase}" > /dev/null
|
||||||
mkdir -p "${_data}"
|
/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cf "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar" msys64
|
||||||
|
|
||||||
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
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
pushd ${_newmsysbase} > /dev/null
|
echo "[Creating xz archive...]"
|
||||||
export XZ_OPT="-e9T0"
|
xz -9 --keep --verbose --force --compress --threads=0 "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar"
|
||||||
local _compress_cmd2="/usr/bin/tar --transform='s/:/_/g' --dereference --hard-dereference -cJf ${_thisdir}/${_filename2} msys${_bitness}"
|
xz --test "${_thisdir}/msys2-base-${_arch_name}-${_date}.tar.xz"
|
||||||
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
|
|
||||||
|
|
||||||
# self extracting cli 7z archive
|
echo "[Creating zstd archive...]"
|
||||||
"${_thisdir}/create-sfx.sh" "msys${_bitness}" "${_thisdir}/${_filename3}"
|
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"
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add -v to get more information.
|
copy_installer() {
|
||||||
make_installer() {
|
echo "[Copying installer...]"
|
||||||
eval "\"${_binarycreator}\" \
|
rm -Rf "${_ifwroot}" && cp -r "${_thisdir}"/qt-ifw "${_ifwroot}"
|
||||||
-t \"${_installerbase}\" \
|
|
||||||
-p \"${_ifwroot}/packages\" \
|
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" \) -exec sed -i "s|@DATE@|${_dateqif}|g" "{}" \;
|
||||||
-c \"${_ifwroot}/config/config.xml\" \
|
find "${_ifwroot}" \( -name "package.xml" -or -name "config.xml" \) -exec sed -i "s|@VERSION@|${_version}|g" "{}" \;
|
||||||
--offline-only \
|
|
||||||
\"${_filename}\" \
|
|
||||||
-v" | tee -a ${_log}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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-${_arch_name}-${_date}.exe" \
|
||||||
|
-v
|
||||||
|
popd > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
create_chroot_system() {
|
create_chroot_system() {
|
||||||
[ -d ${_newmsysbase} ] && rm -rf ${_newmsysbase}
|
echo "[Creating chroot system...]"
|
||||||
mkdir -p "${_newmsys}"
|
rm -Rf "${_newmsysbase}" && mkdir -p "${_newmsys}"
|
||||||
pushd "${_newmsys}" > /dev/null
|
|
||||||
|
|
||||||
|
pushd "${_newmsys}" > /dev/null
|
||||||
mkdir -p var/lib/pacman
|
mkdir -p var/lib/pacman
|
||||||
mkdir -p var/log
|
mkdir -p var/log
|
||||||
mkdir -p tmp
|
mkdir -p tmp
|
||||||
|
|
||||||
eval "pacman -Syu --root \"${_newmsys}\"" | tee -a ${_log}
|
pacman -Syu --root "${_newmsys}"
|
||||||
eval "pacman -S filesystem msys2-runtime --noconfirm --root \"${_newmsys}\"" | tee -a ${_log}
|
pacman -S filesystem msys2-runtime --noconfirm --root "${_newmsys}"
|
||||||
eval "pacman -S base --noconfirm --root \"${_newmsys}\"" | tee -a ${_log}
|
pacman -S base --noconfirm --root "${_newmsys}"
|
||||||
_result=$?
|
pacman -Q --root "${_newmsys}" > "${_thisdir}/msys2-base-${_arch_name}-${_date}.packages.txt"
|
||||||
if [ "${_result}" -ne "0" ]; then
|
|
||||||
exit_cleanly "1" "failed to create newmsys2 via command 'pacman -S base --noconfirm --root ${_newmsys}'"
|
|
||||||
fi
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -f "${_archivegen}" ]; then
|
main() {
|
||||||
eval "pacman -S --noconfirm mingw${_bitness}/mingw-w64-${_arch}-qt-installer-framework" | tee -a ${_log}
|
pacman -S --noconfirm --needed \
|
||||||
fi
|
"${MINGW_PACKAGE_PREFIX}-qt-installer-framework" \
|
||||||
|
"${MINGW_PACKAGE_PREFIX}-7zip" \
|
||||||
|
"${MINGW_PACKAGE_PREFIX}-xz" \
|
||||||
|
"${MINGW_PACKAGE_PREFIX}-zstd" \
|
||||||
|
"tar"
|
||||||
|
|
||||||
if [ ! -f "${_archivegen}" ]; then
|
create_chroot_system
|
||||||
exit_cleanly "2" "installation of qt installer framework failed. See ${_log}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "${_log}" ]; then
|
copy_installer
|
||||||
rm "${_log}"
|
create_installer_archive
|
||||||
fi
|
create_installer
|
||||||
|
|
||||||
echo "Creating MSYS2 chroot system ${_newmsys}" | tee -a ${_log}
|
if [ "$_arch_name" != "arm64" ]; then
|
||||||
create_chroot_system
|
create_archives
|
||||||
|
create_sfx
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
echo "Creating MSYS2 installer /tmp/${_filename}" | tee -a ${_log}
|
main
|
||||||
if [ -f /tmp/${_filename} ]; then
|
|
||||||
rm -f /tmp/${_filename}
|
|
||||||
fi
|
|
||||||
|
|
||||||
do_seds
|
|
||||||
create_archives
|
|
||||||
make_installer
|
|
||||||
exit_cleanly "0" "All done, see ${_filename}"
|
|
||||||
@@ -1,18 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Installer>
|
<Installer>
|
||||||
<Name>MSYS2 @BITNESS@bit</Name>
|
<Name>MSYS2</Name>
|
||||||
<Version>@VERSION@</Version>
|
<Version>@VERSION@</Version>
|
||||||
<Title>MSYS2 @BITNESS@bit</Title>
|
<Title>MSYS2</Title>
|
||||||
<Publisher>The MSYS2 Developers</Publisher>
|
<Publisher>Befator Inc.</Publisher>
|
||||||
<ControlScript>control.js</ControlScript>
|
<ControlScript>control.js</ControlScript>
|
||||||
<StartMenuDir>MSYS2 @BITNESS@bit</StartMenuDir>
|
<StartMenuDir>MSYS2</StartMenuDir>
|
||||||
<RunProgram>@TargetDir@/msys2_shell.cmd</RunProgram>
|
<RunProgram>@TargetDir@/ucrt64.exe</RunProgram>
|
||||||
<RunProgramArguments></RunProgramArguments>
|
<RunProgramArguments></RunProgramArguments>
|
||||||
<InstallerApplicationIcon>../../msys2</InstallerApplicationIcon>
|
<InstallerApplicationIcon>msys2</InstallerApplicationIcon>
|
||||||
<InstallerWindowIcon>../../msys2</InstallerWindowIcon>
|
<InstallerWindowIcon>msys2.ico</InstallerWindowIcon>
|
||||||
<InstallActionColumnVisible>false</InstallActionColumnVisible>
|
<InstallActionColumnVisible>false</InstallActionColumnVisible>
|
||||||
|
<WizardStyle>Modern</WizardStyle>
|
||||||
|
<WizardDefaultWidth>40em</WizardDefaultWidth>
|
||||||
<MaintenanceToolName>uninstall</MaintenanceToolName>
|
<MaintenanceToolName>uninstall</MaintenanceToolName>
|
||||||
<SupportsModify>false</SupportsModify>
|
<SupportsModify>false</SupportsModify>
|
||||||
<RepositorySettingsPageVisible>false</RepositorySettingsPageVisible>
|
<RepositorySettingsPageVisible>false</RepositorySettingsPageVisible>
|
||||||
<SaveDefaultRepositories>false</SaveDefaultRepositories>
|
<SaveDefaultRepositories>false</SaveDefaultRepositories>
|
||||||
|
<AllowRepositoriesForOfflineInstaller>false</AllowRepositoriesForOfflineInstaller>
|
||||||
</Installer>
|
</Installer>
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
function Controller()
|
function Controller()
|
||||||
{
|
{
|
||||||
|
installer.setDefaultPageVisible(QInstaller.LicenseCheck, false);
|
||||||
|
if (installer.isInstaller()) {
|
||||||
|
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
|
||||||
|
installer.setDefaultPageVisible(QInstaller.ReadyForInstallation, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.prototype.IntroductionPageCallback = function()
|
Controller.prototype.IntroductionPageCallback = function()
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
@@ -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();
|
|
||||||
}
|
|
||||||
@@ -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>
|
|
||||||
@@ -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() {
|
function Component() {
|
||||||
|
|
||||||
|
if (!isSupported()) {
|
||||||
|
cancelInstaller("Installation on " + systemInfo.prettyProductName + " is not supported");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var systemDrive = installer.environmentVariable("SystemDrive");
|
var systemDrive = installer.environmentVariable("SystemDrive");
|
||||||
// Use C: as a default for messed up systems.
|
// Use C: as a default for messed up systems.
|
||||||
if (systemDrive === "") {
|
if (systemDrive === "") {
|
||||||
systemDrive = "C:";
|
systemDrive = "C:";
|
||||||
}
|
}
|
||||||
var targetDir = installer.value("TargetDir", systemDrive+"\\msys@BITNESS@")
|
var targetDir = installer.value("TargetDir", systemDrive+"\\msys64")
|
||||||
|
|
||||||
installer.setValue("TargetDir", targetDir);
|
installer.setValue("TargetDir", targetDir);
|
||||||
installer.setDefaultPageVisible(QInstaller.Introduction, false);
|
}
|
||||||
installer.setDefaultPageVisible(QInstaller.TargetDirectory, true);
|
|
||||||
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
|
Component.prototype.createOperations = function()
|
||||||
installer.setDefaultPageVisible(QInstaller.ReadyForInstallation, false);
|
{
|
||||||
installer.setDefaultPageVisible(QInstaller.StartMenuSelection, true);
|
component.createOperations();
|
||||||
installer.setDefaultPageVisible(QInstaller.LicenseCheck, false);
|
createShortcuts();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<Package>
|
<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>
|
<Description>Cygwin-derived Posix-like env. for Windows with Arch Linux's Pacman</Description>
|
||||||
<Version>@VERSION@</Version>
|
<Version>@VERSION@</Version>
|
||||||
<ReleaseDate>@DATE@</ReleaseDate>
|
<ReleaseDate>@DATE@</ReleaseDate>
|
||||||
|
<Default>true</Default>
|
||||||
<Script>installscript.js</Script>
|
<Script>installscript.js</Script>
|
||||||
</Package>
|
</Package>
|
||||||
|
|||||||
Reference in New Issue
Block a user