Compare commits
57 Commits
2020-05-17
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2480a1e1ae | ||
|
|
bb31bc4758 | ||
|
|
a63c2efbb1 | ||
|
|
0f0ce8ac4a | ||
|
|
92cd8703f0 | ||
|
|
d7119e21be | ||
|
|
3afa802e7b | ||
|
|
109259037b | ||
|
|
ff11ad435d | ||
|
|
5ff691e212 | ||
|
|
a2903688fa | ||
|
|
c898282f3f | ||
|
|
289a0c9938 | ||
|
|
097ca2e025 | ||
|
|
14c8d38bc1 | ||
|
|
17b1d7ee2d | ||
|
|
febbec6b28 | ||
|
|
8216e9655b | ||
|
|
f898970dc7 | ||
|
|
0fd65b0ee4 | ||
|
|
2779e83ac4 | ||
|
|
f9dca48d21 | ||
|
|
26c21ec33f | ||
|
|
dbb542e04b | ||
|
|
1491e3b29c | ||
|
|
6a200a8209 | ||
|
|
13d7be8a0e | ||
|
|
9526399f7c | ||
|
|
c0f11534c2 | ||
|
|
9fedc87b6a | ||
|
|
7cd10e81b9 | ||
|
|
b2ede322c2 | ||
|
|
02864876e3 | ||
|
|
59f5965b5c | ||
|
|
013ed1d783 | ||
|
|
059986c768 | ||
|
|
7b4b35f659 | ||
|
|
d5dd27fe4d | ||
|
|
7b149f78c1 | ||
|
|
a588bcc370 | ||
|
|
8e7f4c3fe6 | ||
|
|
d51f1426b6 | ||
|
|
049636c00b | ||
|
|
032322e2f7 | ||
|
|
6eca2a3ba6 | ||
|
|
a76eaa8cfa | ||
|
|
ec7c5c7ad0 | ||
|
|
bc9f3ede64 | ||
|
|
f0ec7840b9 | ||
|
|
695cddc87d | ||
|
|
fcc4de14cb | ||
|
|
6a8907277d | ||
|
|
d967ccb3be | ||
|
|
e5b378fa10 | ||
|
|
c45d2116aa | ||
|
|
56d9cf180c | ||
|
|
6be76e2021 |
13
.ci/Dockerfile.2019
Normal file
13
.ci/Dockerfile.2019
Normal file
@@ -0,0 +1,13 @@
|
||||
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';
|
||||
13
.ci/Dockerfile.2022
Normal file
13
.ci/Dockerfile.2022
Normal file
@@ -0,0 +1,13 @@
|
||||
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
Normal file
181
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,181 @@
|
||||
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 }}
|
||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
_cache
|
||||
*.exe
|
||||
*.xz
|
||||
26
LICENSE
Normal file
26
LICENSE
Normal 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.
|
||||
48
README.md
48
README.md
@@ -1,14 +1,44 @@
|
||||
# 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
|
||||
## Nightly build
|
||||
|
||||
https://github.com/msys2/msys2-installer/releases/tag/nightly-x86_64
|
||||
|
||||

|
||||
|
||||
## 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:\
|
||||
```
|
||||
|
||||
## Build Instructions
|
||||
|
||||
```bash
|
||||
# Run in a MSYS2 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
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
// 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);
|
||||
installer.setDefaultPageVisible(QInstaller.TargetDirectory, false);
|
||||
|
||||
var page = gui.pageWidgetByObjectName( "ComponentSelectionPage" );
|
||||
page.selectComponent( "com.msys2.root" );
|
||||
@@ -27,8 +29,7 @@ function Controller()
|
||||
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);
|
||||
}
|
||||
@@ -38,6 +39,20 @@ 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");
|
||||
@@ -59,9 +74,6 @@ Controller.prototype.InstallationFinishedPageCallback = function()
|
||||
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;
|
||||
|
||||
@@ -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')))
|
||||
@@ -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
|
||||
@@ -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/*
|
||||
28
create-sfx.sh
Normal file
28
create-sfx.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# usage: ./create-sfx.sh /some/path/to/msys64 installer.exe
|
||||
|
||||
set -e
|
||||
|
||||
# Download and extract https://github.com/mcmilk/7-Zip-zstd
|
||||
NAME="7z21.03-zstd-x64"
|
||||
CHECKSUM="531b20dfb03d8f30f61ae56a181610bbb6f3cf7cc71dac1d8f95511289de76f3"
|
||||
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"
|
||||
fi
|
||||
echo "$CHECKSUM $BASE.exe" | sha256sum --quiet --check
|
||||
if [ ! -d "$BASE" ]; then
|
||||
7z e -o"$BASE" "$DIR/_cache/$NAME.exe"
|
||||
fi
|
||||
|
||||
# Creat 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"
|
||||
@@ -9,6 +9,7 @@ _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
|
||||
@@ -58,38 +59,35 @@ 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"
|
||||
|
||||
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
|
||||
done
|
||||
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
|
||||
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
|
||||
|
||||
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
|
||||
# self extracting cli 7z archive
|
||||
"${_thisdir}/create-sfx.sh" "msys${_bitness}" "${_thisdir}/${_filename3}"
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
# Add -v to get more information.
|
||||
@@ -115,6 +113,7 @@ create_chroot_system() {
|
||||
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
|
||||
|
||||
@@ -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
BIN
msys2.ico
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 38 KiB |
@@ -4,9 +4,15 @@
|
||||
<Version>@VERSION@</Version>
|
||||
<Title>MSYS2 @BITNESS@bit</Title>
|
||||
<Publisher>The MSYS2 Developers</Publisher>
|
||||
<ControlScript>control.js</ControlScript>
|
||||
<StartMenuDir>MSYS2 @BITNESS@bit</StartMenuDir>
|
||||
<RunProgram>@TargetDir@/msys2_shell.cmd</RunProgram>
|
||||
<RunProgramArguments></RunProgramArguments>
|
||||
<InstallerApplicationIcon>../../msys2</InstallerApplicationIcon>
|
||||
<InstallerWindowIcon>../../msys2</InstallerWindowIcon>
|
||||
<InstallActionColumnVisible>false</InstallActionColumnVisible>
|
||||
<MaintenanceToolName>uninstall</MaintenanceToolName>
|
||||
<SupportsModify>false</SupportsModify>
|
||||
<RepositorySettingsPageVisible>false</RepositorySettingsPageVisible>
|
||||
<SaveDefaultRepositories>false</SaveDefaultRepositories>
|
||||
</Installer>
|
||||
|
||||
15
qt-ifw/config/control.js
Normal file
15
qt-ifw/config/control.js
Normal file
@@ -0,0 +1,15 @@
|
||||
function Controller()
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,10 +17,11 @@ function createShortcuts()
|
||||
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");
|
||||
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",
|
||||
|
||||
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 8.2 KiB |
Reference in New Issue
Block a user