mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
first attempt creating a full bundle
This commit is contained in:
parent
2b21aab26b
commit
e1b5872e26
3 changed files with 48 additions and 49 deletions
|
@ -14,6 +14,21 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
|
|
||||||
|
- name: Electron Builder
|
||||||
|
env: # Setting environment variables for the entire job
|
||||||
|
GH_TOKEN: ${{ secrets.github_token }}
|
||||||
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||||
|
working-directory: gui
|
||||||
|
run: |
|
||||||
|
npm i
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
- name: LIST ALL FILES
|
||||||
|
run: ls -R
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
|
@ -38,7 +53,7 @@ jobs:
|
||||||
- name: Create installer
|
- name: Create installer
|
||||||
uses: joncloud/makensis-action@v4
|
uses: joncloud/makensis-action@v4
|
||||||
with:
|
with:
|
||||||
script-file: "freedata-server-nsis-config.nsi"
|
script-file: "freedata-nsis-config.nsi"
|
||||||
arguments: '/V3'
|
arguments: '/V3'
|
||||||
|
|
||||||
- name: LIST ALL FILES
|
- name: LIST ALL FILES
|
||||||
|
@ -47,12 +62,12 @@ jobs:
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: 'FreeData-Server-Installer'
|
name: 'FreeDATA-Installer'
|
||||||
path: ./FreeData-Server-Installer.exe
|
path: ./FreeDATA-Installer.exe
|
||||||
|
|
||||||
- name: Upload Installer to Release
|
- name: Upload Installer to Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
files: ./FreeData-Server-Installer.exe
|
files: ./FreeDATA-Installer.exe
|
|
@ -4,16 +4,14 @@
|
||||||
RequestExecutionLevel admin
|
RequestExecutionLevel admin
|
||||||
|
|
||||||
; The name and file name of the installer
|
; The name and file name of the installer
|
||||||
Name "FreeData Server"
|
Name "FreeDATA Installer"
|
||||||
OutFile "FreeData-Server-Installer.exe"
|
OutFile "FreeDATA-Installer.exe"
|
||||||
|
|
||||||
; Default installation directory
|
; Default installation directory for the server
|
||||||
; InstallDir "$PROGRAMFILES\FreeData\freedata-server"
|
InstallDir "$LOCALAPPDATA\FreeDATA"
|
||||||
|
|
||||||
InstallDir "$LOCALAPPDATA\FreeData\freedata-server"
|
|
||||||
|
|
||||||
; Registry key to store the installation directory
|
; Registry key to store the installation directory
|
||||||
InstallDirRegKey HKCU "Software\FreeData\freedata-server" "Install_Dir"
|
InstallDirRegKey HKCU "Software\FreeDATA" "Install_Dir"
|
||||||
|
|
||||||
; Modern UI settings
|
; Modern UI settings
|
||||||
!define MUI_ABORTWARNING
|
!define MUI_ABORTWARNING
|
||||||
|
@ -22,19 +20,15 @@ InstallDirRegKey HKCU "Software\FreeData\freedata-server" "Install_Dir"
|
||||||
!define MUI_ICON "documentation\icon.ico"
|
!define MUI_ICON "documentation\icon.ico"
|
||||||
!define MUI_UNICON "documentation\icon.ico" ; Icon for the uninstaller
|
!define MUI_UNICON "documentation\icon.ico" ; Icon for the uninstaller
|
||||||
|
|
||||||
|
|
||||||
; Define the welcome page text
|
; 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_WELCOMEPAGE_TEXT "Welcome to the FreeDATA Setup Wizard. This wizard will guide you through the installation process."
|
||||||
!define MUI_FINISHPAGE_TEXT "Folder: $INSTDIR"
|
!define MUI_FINISHPAGE_TEXT "Folder: $INSTDIR"
|
||||||
|
!define MUI_DIRECTORYPAGE_TEXT_TOP "Please select the installation folder. It's recommended to use the suggested one to avoid permission problems."
|
||||||
|
|
||||||
!define MUI_DIRECTORYPAGE_TEXT_TOP "Please select the installation folder. Its recommended using the suggested one for avoiding permission problems."
|
|
||||||
|
|
||||||
|
|
||||||
; Pages
|
; Pages
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
!insertmacro MUI_PAGE_LICENSE "LICENSE"
|
!insertmacro MUI_PAGE_LICENSE "LICENSE"
|
||||||
;!insertmacro MUI_PAGE_COMPONENTS
|
!insertmacro MUI_PAGE_COMPONENTS
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
!insertmacro MUI_PAGE_FINISH
|
!insertmacro MUI_PAGE_FINISH
|
||||||
|
@ -50,53 +44,43 @@ InstallDirRegKey HKCU "Software\FreeData\freedata-server" "Install_Dir"
|
||||||
|
|
||||||
; Installer Sections
|
; Installer Sections
|
||||||
Section "FreeData Server" SEC01
|
Section "FreeData Server" SEC01
|
||||||
|
|
||||||
; Set output path to the installation directory
|
; Set output path to the installation directory
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR\freedata-server
|
||||||
|
|
||||||
; Check if "config.ini" exists and back it up
|
|
||||||
IfFileExists $INSTDIR\config.ini backupConfig
|
|
||||||
|
|
||||||
doneBackup:
|
|
||||||
; Add your application files here
|
; Add your application files here
|
||||||
File /r "modem\server.dist\*.*"
|
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
|
; Create a shortcut in the user's desktop
|
||||||
CreateShortCut "$DESKTOP\FreeData Server.lnk" "$INSTDIR\freedata-server.exe"
|
CreateShortCut "$DESKTOP\FreeDATA Server.lnk" "$INSTDIR\freedata-server.exe"
|
||||||
|
|
||||||
; Create Uninstaller
|
; Create Uninstaller
|
||||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
; Backup "config.ini" before overwriting files
|
Section "FreeData GUI" SEC02
|
||||||
backupConfig:
|
; Set output path to the GUI installation directory
|
||||||
Rename $INSTDIR\config.ini $INSTDIR\config.ini.bak
|
SetOutPath $INSTDIR\freedata-gui
|
||||||
Goto doneBackup
|
|
||||||
|
|
||||||
; Restore the original "config.ini"
|
|
||||||
restoreConfig:
|
|
||||||
Delete $INSTDIR\config.ini
|
|
||||||
Rename $INSTDIR\config.ini.bak $INSTDIR\config.ini
|
|
||||||
|
|
||||||
|
; Add GUI files here
|
||||||
|
File /r "gui\release\windows-unpacked\*"
|
||||||
|
|
||||||
|
; Create a shortcut on the desktop for the GUI
|
||||||
|
CreateShortCut "$DESKTOP\FreeDATA GUI.lnk" "$INSTDIR\freedata-gui\freedata.exe"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
; Uninstaller Section
|
; Uninstaller Section
|
||||||
Section "Uninstall"
|
Section "Uninstall"
|
||||||
|
; Delete files and directories for the server
|
||||||
; Delete files and directories
|
|
||||||
Delete $INSTDIR\freedata-server.exe
|
Delete $INSTDIR\freedata-server.exe
|
||||||
RMDir /r $INSTDIR
|
RMDir /r $INSTDIR\freedata-server
|
||||||
|
|
||||||
; Remove the shortcut
|
; Delete files and directories for the GUI
|
||||||
Delete "$DESKTOP\FreeData Server.lnk"
|
Delete $INSTDIR\freedata-gui\*.*
|
||||||
|
RMDir /r $INSTDIR\freedata-gui
|
||||||
|
|
||||||
|
; Remove the desktop shortcuts
|
||||||
|
Delete "$DESKTOP\FreeDATA Server.lnk"
|
||||||
|
Delete "$DESKTOP\FreeDATA GUI.lnk"
|
||||||
|
|
||||||
; Additional uninstallation commands here
|
; Additional uninstallation commands here
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
"icon": "build/icon.png",
|
"icon": "build/icon.png",
|
||||||
"target": [
|
"target": [
|
||||||
{
|
{
|
||||||
"target": "nsis",
|
"target": "portable",
|
||||||
"arch": ["arm64", "x64"]
|
"arch": ["arm64", "x64"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue