diff --git a/.github/workflows/build_server.yml b/.github/workflows/build_server.yml index bb692f3d..a9472a3d 100644 --- a/.github/workflows/build_server.yml +++ b/.github/workflows/build_server.yml @@ -32,20 +32,10 @@ jobs: repository: DJ2LS/FreeDATA - name: Set up Python 3.11 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.11" - - name: Create modem/dist - working-directory: modem - run: | - mkdir -p dist - - - name: Create modem/dist/modem - working-directory: modem - run: | - mkdir -p dist/modem - - name: Install Linux dependencies # if: matrix.os == 'ubuntu-20.04' if: ${{startsWith(matrix.os, 'ubuntu')}} diff --git a/.github/workflows/build_server_nsis.yml b/.github/workflows/build_server_nsis.yml new file mode 100644 index 00000000..8f60cfc5 --- /dev/null +++ b/.github/workflows/build_server_nsis.yml @@ -0,0 +1,50 @@ +name: Build and Release NSIS Installer +on: [push] + +jobs: + build-and-release: + runs-on: windows-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Build binaries + working-directory: modem + run: | + python3 -m nuitka --remove-output --assume-yes-for-downloads --follow-imports --include-data-dir=lib=lib --include-data-files=lib/codec2/*=lib/codec2/ --include-data-files=config.ini.example=config.ini --standalone server.py --output-filename=freedata-server + + - name: LIST ALL FILES + run: ls -R + + - name: Create installer + uses: joncloud/makensis-action@v4 + with: + script-file: "freedata-server-nsis-config.nsi" + arguments: '/V3' + + - name: LIST ALL FILES + run: ls -R + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: 'FreeData-Server-Installer' + path: ./FreeData-Server-Installer.exe + + - name: Upload Installer to Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/v') + with: + draft: true + files: ./FreeData-Server-Installer.exe diff --git a/documentation/icon.ico b/documentation/icon.ico new file mode 100644 index 00000000..8d599819 Binary files /dev/null and b/documentation/icon.ico differ diff --git a/freedata-server-nsis-config.nsi b/freedata-server-nsis-config.nsi new file mode 100644 index 00000000..a7ec2948 --- /dev/null +++ b/freedata-server-nsis-config.nsi @@ -0,0 +1,102 @@ +!include "MUI2.nsh" + +; Request administrative rights +RequestExecutionLevel admin + +; The name and file name of the installer +Name "FreeData Server" +OutFile "FreeData-Server-Installer.exe" + +; Default installation directory +; InstallDir "$PROGRAMFILES\FreeData\freedata-server" + +InstallDir "$LOCALAPPDATA\FreeData\freedata-server" + +; Registry key to store the installation directory +InstallDirRegKey HKCU "Software\FreeData\freedata-server" "Install_Dir" + +; Modern UI settings +!define MUI_ABORTWARNING + +; Installer interface settings +!define MUI_ICON "documentation\icon.ico" +!define MUI_UNICON "documentation\icon.ico" ; Icon for the uninstaller + + +; Define the welcome page text +!define MUI_WELCOMEPAGE_TEXT "Welcome to the FreeData Server Setup Wizard. This wizard will guide you through the installation process." +!define MUI_FINISHPAGE_TEXT "Folder: $INSTDIR" + + +!define MUI_DIRECTORYPAGE_TEXT_TOP "Please select the installation folder. Its recommended using the suggested one for avoiding permission problems." + + +; Pages +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE "LICENSE" +;!insertmacro MUI_PAGE_COMPONENTS +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH + +; Uninstaller +!insertmacro MUI_UNPAGE_WELCOME +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_UNPAGE_FINISH + +; Language (you can choose and configure the language(s) you want) +!insertmacro MUI_LANGUAGE "English" + +; Installer Sections +Section "FreeData Server" SEC01 + + ; Set output path to the installation directory + SetOutPath $INSTDIR + + ; Check if "config.ini" exists and back it up + IfFileExists $INSTDIR\config.ini backupConfig + +doneBackup: + ; Add your application files here + File /r "modem\server.dist\*.*" + + ; Restore the original "config.ini" if it was backed up + IfFileExists $INSTDIR\config.ini.bak restoreConfig + + + + ; Create a shortcut in the user's desktop + CreateShortCut "$DESKTOP\FreeData Server.lnk" "$INSTDIR\freedata-server.exe" + + ; Create Uninstaller + WriteUninstaller "$INSTDIR\Uninstall.exe" + +; Backup "config.ini" before overwriting files +backupConfig: + Rename $INSTDIR\config.ini $INSTDIR\config.ini.bak + Goto doneBackup + +; Restore the original "config.ini" +restoreConfig: + Delete $INSTDIR\config.ini + Rename $INSTDIR\config.ini.bak $INSTDIR\config.ini + + +SectionEnd + +; Uninstaller Section +Section "Uninstall" + + ; Delete files and directories + Delete $INSTDIR\freedata-server.exe + RMDir /r $INSTDIR + + ; Remove the shortcut + Delete "$DESKTOP\FreeData Server.lnk" + + ; Additional uninstallation commands here + +SectionEnd + + diff --git a/gui/electron-builder.json5 b/gui/electron-builder.json5 index 5bcf15e6..13f06861 100644 --- a/gui/electron-builder.json5 +++ b/gui/electron-builder.json5 @@ -19,22 +19,8 @@ "files": [ "dist", "dist-electron", - "../modem/server.dist/", ], - "extraResources": [ - - { - "from": "../modem/server.dist/", - "to": "modem", - "filter": [ - "**/*", - "!**/.git" - ] - - } - ], - "mac": { "target": [ diff --git a/gui/package.json b/gui/package.json index e3ff3deb..295559d6 100644 --- a/gui/package.json +++ b/gui/package.json @@ -1,8 +1,8 @@ { "name": "FreeDATA", - "description": "FreeDATA", + "description": "FreeDATA Client application for connecting to FreeDATA server", "private": true, - "version": "0.12.1-alpha", + "version": "0.13.2-alpha", "main": "dist-electron/main/index.js", "scripts": { "start": "vite", @@ -32,43 +32,38 @@ }, "homepage": "https://freedata.app", "dependencies": { - "@electron/asar": "3.2.7", - "@electron/notarize": "2.2.0", - "@electron/universal": "2.0.0", + "@electron/notarize": "2.2.1", + "@electron/universal": "2.0.1", "@popperjs/core": "2.11.8", - "@vueuse/electron": "10.7.1", + "@vueuse/electron": "10.7.2", "blob-util": "2.0.2", "bootstrap": "5.3.2", - "bootstrap-icons": "1.11.2", + "bootstrap-icons": "1.11.3", "bootswatch": "5.3.2", "browser-image-compression": "2.0.2", "chart.js": "4.4.1", "chartjs-plugin-annotation": "3.0.1", - "electron-log": "5.0.3", + "electron-log": "5.1.1", "electron-updater": "6.1.7", - "emoji-picker-element": "1.20.1", + "emoji-picker-element": "1.21.0", "emoji-picker-element-data": "1.6.0", "file-saver": "2.0.5", "gridstack": "10.0.1", "mime": "4.0.1", "nconf": "^0.12.1", + "noto-color-emoji": "^1.0.1", "pinia": "2.1.7", - "pouchdb": "8.0.1", - "pouchdb-browser": "8.0.1", - "pouchdb-find": "8.0.1", - "pouchdb-upsert": "2.2.0", "qth-locator": "2.1.0", - "sass": "1.66.1", "socket.io": "4.7.2", - "uuid": "9.0.1", - "vue": "3.3.12", + "uuid": "^9.0.1", + "vue": "3.4.15", "vue-chartjs": "5.3.0", "vuemoji-picker": "0.2.0" }, "devDependencies": { "@types/nconf": "^0.10.6", - "@typescript-eslint/eslint-plugin": "6.17.0", - "@vitejs/plugin-vue": "4.5.2", + "@typescript-eslint/eslint-plugin": "6.19.1", + "@vitejs/plugin-vue": "5.0.3", "electron": "28.1.3", "electron-builder": "24.9.1", "eslint": "8.56.0", @@ -84,7 +79,7 @@ "vite-plugin-electron": "0.28.0", "vite-plugin-electron-renderer": "0.14.5", "vitest": "1.0.2", - "vue": "3.3.12", + "vue": "3.4.15", "vue-tsc": "1.8.27" } } diff --git a/gui/src/components/chat.vue b/gui/src/components/chat.vue index 7f0f145a..b5801183 100644 --- a/gui/src/components/chat.vue +++ b/gui/src/components/chat.vue @@ -1,22 +1,114 @@