Update release scripts and info

This commit is contained in:
Ximi1970
2020-03-30 21:15:58 +02:00
parent b15db8d982
commit 78f51b14c7
7 changed files with 226 additions and 1 deletions

2
.gitignore vendored
View File

@@ -1,2 +1,4 @@
/*.xpi
/SysTray-X
/app/SysTray-X/.qmake.stash
/app/SysTray-X/SysTray-X.pro.user.*

141
README.build-farm.txt Normal file
View File

@@ -0,0 +1,141 @@
Install VirtualBox
==================
zypper install virtualbox freerdp
Install your guest systems.
Use bridged networking so your VMs are visible on your local net.
Enable remote desktop for your guests for easy access later.
Starting a Virtual Machine
==========================
Find your VM with:
VBoxManage list vms
Start the VM headless:
VBoxHeadless -s "Windows 10"
Start a full screen remote session:
xfreerdp /u:<user> /v:<vms-ip> /f
Windows 10
==========
Packages to install:
* Visual Studio Express 2017
(https://visualstudio.microsoft.com/vs/express/, https://aka.ms/vs/15/release/vs_WDExpress.exe
* Visual Studio Express 2019
(https://visualstudio.microsoft.com/vs/express/)
* TortoiseGit (https://tortoisegit.org/)
* Git for Windows (https://gitforwindows.org/)
* PuTTY (https://www.putty.org/)
* Qt (https://www.qt.io/)
* Jom (https://wiki.qt.io/Jom)
* Cygwin (https://www.cygwin.com/) (default install) (packages to add: make, zip, lftp)
Optional:
* Notepad++
(https://notepad-plus-plus.org/)
* Total commander
(https://www.ghisler.com/)
Installing OpenSSH:
Settings -> Apps -> Optional features -> Add a feature -> OpenSSH Server -> Install
Back to Optional features and wait for the install to finish.
Reboot
Enable the OpenSSH server:
Right click start menu -> Computer Management -> Services And Applications -> Services
Find "OpenSSh SSH Server" in the list.
Double click -> Startup: Automatic
Click "Start"
Click "Ok"
Use cygwin-bash:
Copy c:\cygwin64\Cygwin.bat to c:\cygwin64\Cygwin-ssh.bat
@echo off
setlocal enableextensions
set TERM=
cd /d "%~dp0bin" && .\bash --login
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "c:\cygwin64\Cygwin-ssh.bat" -PropertyType String -Force
///////////// Alternative SSH shell setups
Set SSH shell to Powershell:
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force
// New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShellCommandOption -Value "/c" -PropertyType String -Force
// New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShellEscapeArguments -Value 1 -PropertyType DWORD -Force
Use git-bash:
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Program Files\Git\bin\bash.exe" -PropertyType String -Force
/////////////////////////////////////////
Password less login:
--------------------
For sshd-config do the following changes:
Comment this one:
#Match Group administrators
# AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys
Uncomment these two:
PubkeyAuthentication yes
Then open PowerShell as Admin and restart service:
Restart-Service sshd
Then through File Explorer GUI.
Create the directory C:\Users\<name>\.ssh and C:\Users\<name>\.ssh\authorized_keys
For .ssh folder and authorized_keys file do the following:
Properties -> Security -> Advanced -> Disable inheritance -> Convert inherited permissions into explicit permissions on this object.
Then delete all users(groups) except:
System
Administrators
current user
Relevant docs (warning: some outdated):
https://winaero.com/blog/enable-openssh-server-windows-10/
https://github.com/PowerShell/Win32-OpenSSH/wiki/DefaultShell
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_overview
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration
https://github.com/PowerShell/Win32-OpenSSH/issues/1306#issuecomment-484475323 // Passwordless login, see bottom

View File

@@ -14,6 +14,11 @@ https://sourceforge.net/projects/nsis/
Assets uploader:
https://github.com/tcnksm/ghr
Windows
=========================================

72
create-win-installers.sh Executable file
View File

@@ -0,0 +1,72 @@
#!/bin/bash
UPLOAD_SERVER="upload.server.com"
UPLOAD_USER="user"
UPLOAD_PASSWORD="password"
UPLOAD_DIR="~/src/systray-x/bin"
BUILD_FARM="build.farm.com"
BUILD_FARM_USER="farmuser"
BUILD_WORKER="worker.build.farm.com"
BUILD_WORKER_USER="BuildUser"
BUILD_WORKER_VMNAME="Virtual Machine Name"
VERSION=`git describe --long | sed "s/-.*//"`
#
# Start the worker on the farm
#
ssh ${BUILD_FARM_USER}@${BUILD_FARM} <<-ENDSSH
VBoxHeadless -startvm "${BUILD_WORKER_VMNAME}" > /dev/null 2>&1 &
ENDSSH
#
# Wait for the worker to become active
#
timeout=30
t=0
while [ $t -lt $timeout ] ; do
ping -c1 ${BUILD_WORKER}
if [ $? -eq 0 ] ; then
break;
fi
sleep 10
t=$((t+1))
done
if [ $t -eq $timeout ] ; then
echo "Cannot find server"
exit 1
fi
#
# Start build
#
ssh ${BUILD_WORKER_USER}@${BUILD_WORKER} -T <<-ENDSSH
cd /cygdrive/c/Users/${BUILD_WORKER_USER}/Documents
mkdir -p Projects/Github/Ximi1970
cd Projects/Github/Ximi1970
rm -rf systray-x
git clone https://github.com/Ximi1970/systray-x.git
cd systray-x
make
cd dist
/cygdrive/c/Program\ Files\ \(x86\)/NSIS/Bin/makensis.exe SysTray-X-32bit.nsi
/cygdrive/c/Program\ Files\ \(x86\)/NSIS/Bin/makensis.exe SysTray-X-64bit.nsi
mv -f SysTray-X-setup32.exe SysTray-X-setup32-${VERSION}.exe
mv -f SysTray-X-setup64.exe SysTray-X-setup64-${VERSION}.exe
lftp -u ${UPLOAD_USER},${UPLOAD_PASSWORD} ${UPLOAD_SERVER}/${UPLOAD_DIR} <<-ENDFTP
mput SysTray-X-setup*.exe
close
quit
ENDFTP
exit
ENDSSH
#
# Shutdown worker
#
VBoxManage controlvm "${BUILD_WORKER_VMNAME}" acpipowerbutton

View File

@@ -6,7 +6,7 @@ OBS_BASE="https://download.opensuse.org/repositories/home:/Ximi1970:/Mozilla:/Ad
OBS_PACKAGE="systray-x"
OBS_RPM_ARCHS="openSUSE_Leap_15.1/x86_64 "
OBS_RPM_ARCHS="openSUSE_Leap_15.2/x86_64 "
OBS_RPM_ARCHS+="openSUSE_Leap_15.2/x86_64 "
OBS_RPM_ARCHS+="openSUSE_Tumbleweed/i586 "
OBS_RPM_ARCHS+="openSUSE_Tumbleweed/x86_64 "
OBS_RPM_ARCHS+="SLE_15/x86_64 "

BIN
ghr Executable file

Binary file not shown.

5
upload-assets.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
VERSION=`git describe --long | sed "s/-.*//"`
./ghr ${VERSION} bin/