diff --git a/.github/workflows/cli.yaml b/.github/workflows/cli.yaml
index aa7b228..c703e32 100644
--- a/.github/workflows/cli.yaml
+++ b/.github/workflows/cli.yaml
@@ -13,7 +13,7 @@ on:
env:
APP_NAME: "WebSocketReflectorX"
- APP_VERSION: "0.2.9"
+ APP_VERSION: "0.2.10"
#-------------------------------------------------------------------------------
# Workflow jobs
diff --git a/.github/workflows/pr.yaml b/.github/workflows/commit.yaml
similarity index 99%
rename from .github/workflows/pr.yaml
rename to .github/workflows/commit.yaml
index 08fc069..f6a2745 100644
--- a/.github/workflows/pr.yaml
+++ b/.github/workflows/commit.yaml
@@ -7,6 +7,8 @@ on:
push:
paths-ignore:
- '**/README.md'
+ branches:
+ - 'master'
pull_request:
workflow_dispatch:
@@ -16,7 +18,7 @@ on:
env:
APP_NAME: "WebSocketReflectorX"
- APP_VERSION: "0.2.9"
+ APP_VERSION: "0.2.10"
QT_VERSION: "6.7.1"
#-------------------------------------------------------------------------------
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5f08a7a..6a21ab8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -13,7 +13,7 @@ on:
env:
APP_NAME: "WebSocketReflectorX"
- APP_VERSION: "0.2.9"
+ APP_VERSION: "0.2.10"
QT_VERSION: "6.7.1"
#-------------------------------------------------------------------------------
@@ -111,13 +111,6 @@ jobs:
- name: Deploy application
run: ./deploy_macos.sh -c -p
- # Upload application ZIP
- - name: Upload application ZIP
- uses: actions/upload-artifact@v4
- with:
- name: ${{env.APP_NAME}}-${{env.APP_VERSION}}-macOS-x86_64.zip
- path: ${{env.APP_NAME}}-${{env.APP_VERSION}}-macOS-x86_64.zip
-
# Upload application DMG
- name: Upload application DMG
uses: actions/upload-artifact@v4
@@ -130,7 +123,6 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
- ${{env.APP_NAME}}-${{env.APP_VERSION}}-macOS-x86_64.zip
${{env.APP_NAME}}-${{env.APP_VERSION}}-macOS-x86_64.dmg
## macOS build ###############################################################
@@ -171,13 +163,6 @@ jobs:
- name: Deploy application
run: ./deploy_macos.sh -c -p
- # Upload application ZIP
- - name: Upload application ZIP
- uses: actions/upload-artifact@v4
- with:
- name: ${{env.APP_NAME}}-${{env.APP_VERSION}}-macOS-arm64.zip
- path: ${{env.APP_NAME}}-${{env.APP_VERSION}}-macOS-arm64.zip
-
# Upload application DMG
- name: Upload application DMG
uses: actions/upload-artifact@v4
@@ -190,7 +175,6 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
- ${{env.APP_NAME}}-${{env.APP_VERSION}}-macOS-arm64.zip
${{env.APP_NAME}}-${{env.APP_VERSION}}-macOS-arm64.dmg
## Windows build #############################################################
@@ -240,13 +224,6 @@ jobs:
- name: Deploy application
run: sh deploy_windows.sh -c -p
- # Upload application ZIP
- - name: Upload application ZIP
- uses: actions/upload-artifact@v4
- with:
- name: ${{env.APP_NAME}}-${{env.APP_VERSION}}-win64.zip
- path: ${{env.APP_NAME}}-${{env.APP_VERSION}}-win64.zip
-
# Upload NSIS installer
- name: Upload NSIS installer
uses: actions/upload-artifact@v4
@@ -260,4 +237,3 @@ jobs:
with:
files: |
${{env.APP_NAME}}-${{env.APP_VERSION}}-win64.exe
- ${{env.APP_NAME}}-${{env.APP_VERSION}}-win64.zip
diff --git a/CMakeLists.txt b/CMakeLists.txt
index da9d951..bff2ae5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20)
set(VERSION_MAJOR 0)
set(VERSION_MINOR 2)
-set(VERSION_PATCH 9)
+set(VERSION_PATCH 10)
execute_process(
COMMAND git describe --always --dirty
diff --git a/deploy_linux.sh b/deploy_linux.sh
index 736afa1..e3a0687 100755
--- a/deploy_linux.sh
+++ b/deploy_linux.sh
@@ -1,13 +1,11 @@
#!/usr/bin/env bash
export APP_NAME="WebSocketReflectorX"
-export APP_VERSION=0.2.9
+export APP_VERSION=0.2.10
export GIT_VERSION=$(git rev-parse --short HEAD)
echo "> $APP_NAME packager (Linux x86_64) [v$APP_VERSION]"
-## CHECKS ######################################################################
-
if [ "$(id -u)" == "0" ]; then
echo "This script MUST NOT be run as root" 1>&2
exit 1
@@ -18,51 +16,15 @@ if [ ${PWD##*/} != $APP_NAME ]; then
exit 1
fi
-## SETTINGS ####################################################################
-
-use_contribs=false
-make_install=false
-create_package=false
-upload_package=false
-
-while [[ $# -gt 0 ]]
-do
-case $1 in
- -c|--contribs)
- use_contribs=true
- ;;
- -i|--install)
- make_install=true
- ;;
- -p|--package)
- create_package=true
- ;;
- -u|--upload)
- upload_package=true
- ;;
- *)
- echo "> Unknown argument '$1'"
- ;;
-esac
-shift # skip argument or value
-done
-
-## COPY FILES ##################################################################
-
mkdir -p dist
APP_ROOT=dist
+strip ./build/bin/wsrx
install -D ./build/bin/wsrx "${APP_ROOT}/usr/bin/wsrx"
install -D ./build/bin/wsrx-desktop "${APP_ROOT}/usr/bin/wsrx-desktop"
install -Dm644 "./freedesktop/tech.woooo.wsrx.desktop" "$APP_ROOT"/usr/share/applications/tech.woooo.wsrx.desktop
install -Dm644 "./freedesktop/tech.woooo.wsrx.svg" "$APP_ROOT"/usr/share/icons/hicolor/scalable/apps/tech.woooo.wsrx.svg
-## DEPLOY ######################################################################
-
-if [[ $use_contribs = true ]] ; then
- export LD_LIBRARY_PATH=$(pwd)/contribs/src/env/linux_x86_64/usr/lib/:/usr/lib
-else
- export LD_LIBRARY_PATH=/usr/lib/
-fi
+export LD_LIBRARY_PATH=$(pwd)/contribs/src/env/linux_x86_64/usr/lib/:/usr/lib
echo '---- Prepare linuxdeploy + plugins'
@@ -85,22 +47,10 @@ chmod a+x contribs/deploy/linuxdeploy-x86_64.AppImage
chmod a+x contribs/deploy/linuxdeploy-plugin-appimage-x86_64.AppImage
chmod a+x contribs/deploy/linuxdeploy-plugin-qt-x86_64.AppImage
-# linuxdeploy settings
export EXTRA_QT_PLUGINS="svg;"
export EXTRA_PLATFORM_PLUGINS="libqxcb.so;libqwayland-egl.so;libqwayland-generic.so"
export QML_SOURCES_PATHS="desktop/ui:desktop/components"
-## PACKAGE (AppImage) ##########################################################
-
-if [[ $create_package = true ]] ; then
- echo '---- Running AppImage packager'
- ./contribs/deploy/linuxdeploy-x86_64.AppImage --appdir $APP_ROOT --plugin qt --output appimage
- mv $APP_NAME-x86_64.AppImage $APP_NAME-$APP_VERSION-linux64.AppImage
-fi
-## UPLOAD ######################################################################
-
-if [[ $upload_package = true ]] ; then
- printf "---- Uploading to transfer.sh"
- curl --upload-file $APP_NAME*.AppImage https://transfer.sh/$APP_NAME-$APP_VERSION-git$GIT_VERSION-linux64.AppImage
- printf "\n"
-fi
+echo '---- Running AppImage packager'
+./contribs/deploy/linuxdeploy-x86_64.AppImage --appdir $APP_ROOT --plugin qt --output appimage
+mv $APP_NAME-x86_64.AppImage $APP_NAME-$APP_VERSION-linux64.AppImage
diff --git a/deploy_macos.sh b/deploy_macos.sh
index eac662e..471e107 100755
--- a/deploy_macos.sh
+++ b/deploy_macos.sh
@@ -1,13 +1,11 @@
#!/usr/bin/env bash
export APP_NAME="WebSocketReflectorX"
-export APP_VERSION=0.2.9
+export APP_VERSION=0.2.10
export GIT_VERSION=$(git rev-parse --short HEAD)
echo "> $APP_NAME packager (macOS x86_64) [v$APP_VERSION]"
-## CHECKS ######################################################################
-
if [ "$(id -u)" == "0" ]; then
echo "This script MUST NOT be run as root" 1>&2
exit 1
@@ -17,67 +15,17 @@ if [ ${PWD##*/} != $APP_NAME ]; then
echo "This script MUST be run from the $APP_NAME/ directory"
exit 1
fi
-
-## SETTINGS ####################################################################
-
-use_contribs=false
-make_install=false
-create_package=false
-upload_package=false
-
-while [[ $# -gt 0 ]]
-do
-case $1 in
- -c|--contribs)
- use_contribs=true
- ;;
- -i|--install)
- make_install=true
- ;;
- -p|--package)
- create_package=true
- ;;
- -u|--upload)
- upload_package=true
- ;;
- *)
- echo "> Unknown argument '$1'"
- ;;
-esac
-shift # skip argument or value
-done
-
-## DEPLOY ######################################################################
-
CPU_ARCH=$(uname -m)
-if [[ $use_contribs = true ]] ; then
- export LD_LIBRARY_PATH=$(pwd)/contribs/src/env/macOS_x86_64/usr/lib/
-else
- export LD_LIBRARY_PATH=/usr/local/lib/
-fi
+export LD_LIBRARY_PATH=$(pwd)/contribs/src/env/macOS_x86_64/usr/lib/
echo '---- Running macdeployqt'
+strip build/bin/wsrx
cp build/bin/wsrx build/bin/wsrx-desktop.app/Contents/MacOS/wsrx
cp -r build/bin/wsrx-desktop.app $APP_NAME.app
-macdeployqt $APP_NAME.app -qmldir=./desktop/components -qmldir=./desktop/ui -hardened-runtime -timestamp -appstore-compliant -dmg
-
-#echo '---- Installation directory content recap (after macdeployqt):'
-#find bin/
-
-## PACKAGE (zip) ###############################################################
-
-if [[ $create_package = true ]] ; then
- echo '---- Compressing package'
- zip -r -y -X $APP_NAME-$APP_VERSION-macOS-$CPU_ARCH.zip $APP_NAME.app
- mv $APP_NAME.dmg $APP_NAME-$APP_VERSION-macOS-$CPU_ARCH.dmg
-fi
-
-## UPLOAD ######################################################################
-
-if [[ $upload_package = true ]] ; then
- printf "---- Uploading to transfer.sh"
- curl --upload-file $APP_NAME*.zip https://transfer.sh/$APP_NAME.$APP_VERSION-git$GIT_VERSION-macOS-$CPU_ARCH.zip
- curl --upload-file $APP_NAME*.dmg https://transfer.sh/$APP_NAME.$APP_VERSION-git$GIT_VERSION-macOS-$CPU_ARCH.dmg
- printf "\n"
-fi
+macdeployqt $APP_NAME.app -qmldir=./desktop/components -qmldir=./desktop/ui -hardened-runtime -timestamp
+find $APP_NAME.app/ -name "*.dSYM" | xargs rm -rf
+sleep 3
+hdiutil create $APP_NAME-tmp.dmg -ov -volname $APP_NAME -fs HFS+ -srcfolder ./$APP_NAME.app
+hdiutil convert $APP_NAME-tmp.dmg -format UDZO -o $APP_NAME.dmg
+mv $APP_NAME.dmg $APP_NAME-$APP_VERSION-macOS-$CPU_ARCH.dmg
diff --git a/deploy_windows.sh b/deploy_windows.sh
index 9df1d11..68b660e 100755
--- a/deploy_windows.sh
+++ b/deploy_windows.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
export APP_NAME="WebSocketReflectorX"
-export APP_VERSION=0.2.9
+export APP_VERSION=0.2.10
export GIT_VERSION=$(git rev-parse --short HEAD)
echo "> $APP_NAME packager (Windows x86_64) [v$APP_VERSION]"
@@ -13,77 +13,21 @@ if [ ${PWD##*/} != $APP_NAME ]; then
exit 1
fi
-## SETTINGS ####################################################################
-
-use_contribs=false
-make_install=false
-create_package=false
-upload_package=false
-
-while [[ $# -gt 0 ]]
-do
-case $1 in
- -c|--contribs)
- use_contribs=true
- ;;
- -i|--install)
- make_install=true
- ;;
- -p|--package)
- create_package=true
- ;;
- -u|--upload)
- upload_package=true
- ;;
- *)
- echo "> Unknown argument '$1'"
- ;;
-esac
-shift # skip argument or value
-done
-
-## APP INSTALL #################################################################
-
echo '---- Running make install'
mkdir -p dist
APP_ROOT=dist
cp ./build/bin/wsrx.exe "${APP_ROOT}/wsrx.exe"
cp ./build/bin/wsrx-desktop.exe "${APP_ROOT}/wsrx-desktop.exe"
-#echo '---- Installation directory content recap (after make install):'
-#find bin/
-
-## DEPLOY ######################################################################
echo '---- Running windeployqt'
windeployqt $APP_ROOT/ --qmldir ./desktop/ui --qmldir ./desktop/components
-#echo '---- Installation directory content recap (after windeployqt):'
-#find bin/
-
mv $APP_ROOT $APP_NAME
-## PACKAGE (zip) ###############################################################
+echo '---- Compressing package'
+7z a $APP_NAME-$APP_VERSION-win64.zip $APP_NAME
-if [[ $create_package = true ]] ; then
- echo '---- Compressing package'
- 7z a $APP_NAME-$APP_VERSION-win64.zip $APP_NAME
-fi
-
-## PACKAGE (NSIS) ##############################################################
-
-if [[ $create_package = true ]] ; then
- echo '---- Creating installer'
- mv $APP_NAME windows/$APP_NAME
- makensis windows/setup.nsi
- mv windows/*.exe $APP_NAME-$APP_VERSION-win64.exe
-fi
-
-## UPLOAD ######################################################################
-
-if [[ $upload_package = true ]] ; then
- printf "---- Uploading to transfer.sh"
- curl --upload-file $APP_NAME*.zip https://transfer.sh/$APP_NAME-$APP_VERSION-git$GIT_VERSION-win64.zip
- printf "\n"
- curl --upload-file $APP_NAME*.exe https://transfer.sh/$APP_NAME-$APP_VERSION-git$GIT_VERSION-win64.exe
- printf "\n"
-fi
+echo '---- Creating installer'
+mv $APP_NAME windows/$APP_NAME
+makensis windows/setup.nsi
+mv windows/*.exe $APP_NAME-$APP_VERSION-win64.exe
diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt
index 2e9e31c..c83b4c4 100644
--- a/desktop/CMakeLists.txt
+++ b/desktop/CMakeLists.txt
@@ -26,6 +26,13 @@ set(
ui/ui.qrc
)
+if (APPLE)
+ # And the following tells CMake where to find and install the file itself.
+ set(APPLE_ICON "${CMAKE_SOURCE_DIR}/macos/WebSocketReflectorX.icns")
+ set_source_files_properties(${APPLE_ICON} PROPERTIES
+ MACOSX_PACKAGE_LOCATION "Resources")
+endif()
+
qt_add_big_resources(RESOURCES resources/i18n.qrc resources/resources.qrc)
if(WIN32)
@@ -34,10 +41,8 @@ elseif(APPLE)
set(CMAKE_XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "tech.woooo.wsrx")
set(CMAKE_XCODE_ATTRIBUTE_MARKETING_VERSION "${FULL_VERSION}")
# set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
- set(CMAKE_OSX_DEPLOYMENT_TARGET "12.7")
- set(CMAKE_XCODE_ATTRIBUTE_INFOPLIST_FILE "${CMAKE_SOURCE_DIR}/macos/Info.plist")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_SOURCE_DIR}/macos/WebSocketReflectorX.entitlements")
- add_executable(${PROJECT_NAME}-desktop MACOSX_BUNDLE ${SOURCES} ${RESOURCES})
+ set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0")
+ add_executable(${PROJECT_NAME}-desktop MACOSX_BUNDLE ${SOURCES} ${RESOURCES} ${APPLE_ICON})
else()
add_executable(${PROJECT_NAME}-desktop ${SOURCES} ${RESOURCES})
endif()
@@ -61,8 +66,17 @@ set_target_properties(
if (APPLE)
set_target_properties(
${PROJECT_NAME}-desktop PROPERTIES
- MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/macos/Info.plist
+ MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/macos/Info.plist.in
)
+ set(MACOSX_BUNDLE_DISPLAY_NAME "WebSocket Reflector X")
+ set(MACOSX_BUNDLE_GUI_IDENTIFIER "tech.woooo.wsrx")
+ set(MACOSX_BUNDLE_BUNDLE_NAME "wsrx")
+ set(MACOSX_BUNDLE_ICON_FILE WebSocketReflectorX.icns)
+ set(MACOSX_BUNDLE_INFO_STRING "WebSocket Reflector X - Controlled WebSocket-TCP tunnel.")
+ set(MACOSX_BUNDLE_LONG_VERSION_STRING "wsrx ${FULL_VERSION}")
+ set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}")
+ set(MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
+ set(MACOSX_BUNDLE_COPYRIGHT "2021-2024 XDSEC Developers")
endif()
include(FetchContent)
diff --git a/desktop/main.cc b/desktop/main.cc
index 39af714..bd22a80 100644
--- a/desktop/main.cc
+++ b/desktop/main.cc
@@ -72,8 +72,11 @@ int main(int argc, char* argv[]) {
parser.addPositionalArgument(QObject::tr("link"), QObject::tr("The websocket link to connect to."));
parser.process(app);
- QFontDatabase::addApplicationFont(":/resources/fonts/sarasa-mono-sc-regular.ttf");
- auto defaultFont = QFont("Sarasa Mono SC");
+ QFontDatabase::addApplicationFont(":/resources/fonts/reverier-mono-regular.ttf");
+ auto defaultFont = QFont();
+ auto fontFamilies = QStringList() << "Reverier Mono" << "Noto Sans CJK SC" << "PingFang SC" << "Microsoft YaHei" << "Hiragino Sans GB" << "Source Han Sans CN" << "Noto Sans";
+ defaultFont.setFamilies(fontFamilies);
+
QApplication::setFont(defaultFont);
QString link = parser.positionalArguments().isEmpty() ? "" : parser.positionalArguments().first();
#ifdef Q_OS_UNIX
diff --git a/desktop/resources/fonts/reverier-mono-regular.ttf b/desktop/resources/fonts/reverier-mono-regular.ttf
new file mode 100644
index 0000000..497225e
Binary files /dev/null and b/desktop/resources/fonts/reverier-mono-regular.ttf differ
diff --git a/desktop/resources/fonts/sarasa-mono-sc-regular.ttf b/desktop/resources/fonts/sarasa-mono-sc-regular.ttf
deleted file mode 100644
index dfb5804..0000000
Binary files a/desktop/resources/fonts/sarasa-mono-sc-regular.ttf and /dev/null differ
diff --git a/desktop/resources/resources.qrc b/desktop/resources/resources.qrc
index 51e3980..d2a2769 100644
--- a/desktop/resources/resources.qrc
+++ b/desktop/resources/resources.qrc
@@ -42,6 +42,6 @@
assets/flash-on.svg
assets/checkmark-circle.svg
assets/error-circle.svg
- fonts/sarasa-mono-sc-regular.ttf
+ fonts/reverier-mono-regular.ttf
diff --git a/macos/Info.plist b/macos/Info.plist.in
similarity index 66%
rename from macos/Info.plist
rename to macos/Info.plist.in
index edf02ef..ca17368 100644
--- a/macos/Info.plist
+++ b/macos/Info.plist.in
@@ -6,28 +6,28 @@
APPL
CFBundleName
- WebSocketReflectorX
+ ${MACOSX_BUNDLE_BUNDLE_NAME}
CFBundleDisplayName
- WebSocketReflectorX
+ ${MACOSX_BUNDLE_BUNDLE_NAME}
CFBundleExecutable
- wsrx-desktop
+ ${MACOSX_BUNDLE_EXECUTABLE_NAME}
CFBundleIdentifier
- tech.woooo.wsrx
+ ${MACOSX_BUNDLE_GUI_IDENTIFIER}
CFBundleVersion
- 0.2.9
+ ${MACOSX_BUNDLE_BUNDLE_VERSION}
CFBundleShortVersionString
- 0.2
+ ${MACOSX_BUNDLE_SHORT_VERSION_STRING}
CFBundleSignature
????
CFBundleIconFile
- WebSocketReflectorX.icns
+ ${MACOSX_BUNDLE_ICON_FILE}
LSMinimumSystemVersion
${MACOSX_DEPLOYMENT_TARGET}
@@ -36,12 +36,14 @@
public.app-category.utilities
NSHumanReadableCopyright
- @MACOSX_BUNDLE_COPYRIGHT@
+ ${MACOSX_BUNDLE_COPYRIGHT}
NSHighResolutionCapable
NSSupportsAutomaticGraphicsSwitching
+
+ ${QT_MAC_ITS_ENCRYPTION_KEYS}
diff --git a/wsrx/Cargo.toml b/wsrx/Cargo.toml
index e55392a..57c886f 100644
--- a/wsrx/Cargo.toml
+++ b/wsrx/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "wsrx"
-version = "0.2.9"
+version = "0.2.10"
edition = "2021"
authors = ["Reverier-Xu "]
description = "Controlled TCP-over-WebSocket forwarding tunnel."