mirror of
https://github.com/Ximi1970/systray-x.git
synced 2025-10-27 08:16:11 +01:00
Add windows bash commandline build
This commit is contained in:
34
Makefile
34
Makefile
@@ -1,9 +1,20 @@
|
||||
QMAKE = qmake-qt5
|
||||
ifeq (, $(shell which qmake-qt5 2>/dev/null))
|
||||
ifeq (, $(shell which qmake 2>/dev/null))
|
||||
SYSTEM =
|
||||
ifeq (Cygwin,$(shell uname -o))
|
||||
SYSTEM = Windows
|
||||
else
|
||||
ifeq (GNU/Linux,$(shell uname -o))
|
||||
SYSTEM = Linux
|
||||
|
||||
QMAKE = qmake-qt5
|
||||
ifeq (, $(shell which qmake-qt5 2>/dev/null))
|
||||
ifeq (, $(shell which qmake 2>/dev/null))
|
||||
$(error "No qmake in $(PATH)")
|
||||
endif
|
||||
QMAKE = qmake
|
||||
endif
|
||||
QMAKE = qmake
|
||||
else
|
||||
$(error "Unknown system")
|
||||
endif
|
||||
endif
|
||||
|
||||
.PHONY: clean \
|
||||
@@ -35,6 +46,7 @@ systray-x-xpi:
|
||||
zip ../systray-x@Ximi1970.xpi -qr * ;\
|
||||
cd ..
|
||||
|
||||
ifeq (Linux,$(SYSTEM))
|
||||
systray-x-app:
|
||||
@echo "Creating systray-x app" ;\
|
||||
rm -f SysTray-X ;\
|
||||
@@ -44,3 +56,17 @@ systray-x-app:
|
||||
make ;\
|
||||
cd ../.. ;\
|
||||
cp app/build/SysTray-X .
|
||||
else
|
||||
systray-x-app:
|
||||
@echo "Creating systray-x app" ;\
|
||||
rm -f SysTray-X ;\
|
||||
mkdir -p app/build32 ;\
|
||||
mkdir -p app/dist/win32 ;\
|
||||
cd app/build32 ;\
|
||||
../build.bat x86 5.14.1 ;\
|
||||
cd ../.. ;\
|
||||
mkdir -p app/build64 ;\
|
||||
cd app/build64 ;\
|
||||
../build.bat x86_64 5.14.1 ;\
|
||||
cd ../..
|
||||
endif
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
#<script>
|
||||
|
||||
|
||||
Installers
|
||||
|
||||
Bash:
|
||||
|
||||
https://www.matteomattei.com/create-self-contained-installer-in-bash-that-extracts-archives-and-perform-actitions/
|
||||
|
||||
Windows:
|
||||
|
||||
The good old Nullsoft:
|
||||
https://sourceforge.net/projects/nsis/
|
||||
|
||||
|
||||
|
||||
|
||||
Windows
|
||||
=========================================
|
||||
|
||||
|
||||
51
app/build.bat
Normal file
51
app/build.bat
Normal file
@@ -0,0 +1,51 @@
|
||||
@echo off
|
||||
|
||||
if "%1" == "" (
|
||||
goto :usage
|
||||
)
|
||||
if "%2" == "" (
|
||||
goto :usage
|
||||
)
|
||||
|
||||
set ARCH=
|
||||
set SPEC=
|
||||
set WIN=
|
||||
if /I "%1"=="x86" (
|
||||
set ARCH=x86
|
||||
set WIN=win32
|
||||
set SPEC=msvc2017
|
||||
)
|
||||
if /I "%1"=="x86_64" (
|
||||
set ARCH=x86_amd64
|
||||
set WIN=win64
|
||||
set SPEC=msvc2017_64
|
||||
)
|
||||
if "%ARCH%" == "" (
|
||||
goto :usage
|
||||
)
|
||||
|
||||
set QT_VER=
|
||||
if /I "%2"=="5.14.1" (
|
||||
set QT_VER=5.14.1
|
||||
)
|
||||
if "%QT_VER%" == "" (
|
||||
goto :usage
|
||||
)
|
||||
|
||||
@REM Setup Visual Studio Express 2017
|
||||
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\WDExpress\VC\Auxiliary\Build\vcvarsall.bat" %ARCH%
|
||||
|
||||
@REM Run qmake for VS2017
|
||||
|
||||
C:\Qt\%QT_VER%\%SPEC%\bin\qmake ..\SysTray-X\SysTray-X.pro -spec win32-msvc
|
||||
nmake
|
||||
xcopy /Q /Y release\SysTray-X.exe ..\dist\%WIN%\
|
||||
C:\Qt\%QT_VER%\%SPEC%\bin\windeployqt.exe ..\dist\%WIN%\SysTray-X.exe
|
||||
|
||||
goto :end
|
||||
|
||||
:usage
|
||||
echo Usage: build.bat ^< x86 ^| x86_64 ^> ^< Qt version ^>
|
||||
|
||||
:end
|
||||
Reference in New Issue
Block a user