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
|
@ -14,6 +14,21 @@ jobs:
|
|||
with:
|
||||
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
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
|
@ -38,7 +53,7 @@ jobs:
|
|||
- name: Create installer
|
||||
uses: joncloud/makensis-action@v4
|
||||
with:
|
||||
script-file: "freedata-server-nsis-config.nsi"
|
||||
script-file: "freedata-nsis-config.nsi"
|
||||
arguments: '/V3'
|
||||
|
||||
- name: LIST ALL FILES
|
||||
|
@ -47,12 +62,12 @@ jobs:
|
|||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: 'FreeData-Server-Installer'
|
||||
path: ./FreeData-Server-Installer.exe
|
||||
name: 'FreeDATA-Installer'
|
||||
path: ./FreeDATA-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
|
||||
files: ./FreeDATA-Installer.exe
|
|
@ -4,16 +4,14 @@
|
|||
RequestExecutionLevel admin
|
||||
|
||||
; The name and file name of the installer
|
||||
Name "FreeData Server"
|
||||
OutFile "FreeData-Server-Installer.exe"
|
||||
Name "FreeDATA Installer"
|
||||
OutFile "FreeDATA-Installer.exe"
|
||||
|
||||
; Default installation directory
|
||||
; InstallDir "$PROGRAMFILES\FreeData\freedata-server"
|
||||
|
||||
InstallDir "$LOCALAPPDATA\FreeData\freedata-server"
|
||||
; Default installation directory for the server
|
||||
InstallDir "$LOCALAPPDATA\FreeDATA"
|
||||
|
||||
; Registry key to store the installation directory
|
||||
InstallDirRegKey HKCU "Software\FreeData\freedata-server" "Install_Dir"
|
||||
InstallDirRegKey HKCU "Software\FreeDATA" "Install_Dir"
|
||||
|
||||
; Modern UI settings
|
||||
!define MUI_ABORTWARNING
|
||||
|
@ -22,19 +20,15 @@ InstallDirRegKey HKCU "Software\FreeData\freedata-server" "Install_Dir"
|
|||
!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_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_DIRECTORYPAGE_TEXT_TOP "Please select the installation folder. Its recommended using the suggested one for avoiding permission problems."
|
||||
|
||||
!define MUI_DIRECTORYPAGE_TEXT_TOP "Please select the installation folder. It's recommended to use the suggested one to avoid permission problems."
|
||||
|
||||
; Pages
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "LICENSE"
|
||||
;!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
@ -50,53 +44,43 @@ InstallDirRegKey HKCU "Software\FreeData\freedata-server" "Install_Dir"
|
|||
|
||||
; Installer Sections
|
||||
Section "FreeData Server" SEC01
|
||||
|
||||
; 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
|
||||
File /r "modem\server.dist\*.*"
|
||||
|
||||
; Restore the original "config.ini" if it was backed up
|
||||
IfFileExists $INSTDIR\config.ini.bak restoreConfig
|
||||
|
||||
|
||||
File /r "modem\server.dist\*"
|
||||
|
||||
; 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
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
SectionEnd
|
||||
|
||||
; 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
|
||||
Section "FreeData GUI" SEC02
|
||||
; Set output path to the GUI installation directory
|
||||
SetOutPath $INSTDIR\freedata-gui
|
||||
|
||||
; 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
|
||||
|
||||
; Uninstaller Section
|
||||
Section "Uninstall"
|
||||
|
||||
; Delete files and directories
|
||||
; Delete files and directories for the server
|
||||
Delete $INSTDIR\freedata-server.exe
|
||||
RMDir /r $INSTDIR
|
||||
RMDir /r $INSTDIR\freedata-server
|
||||
|
||||
; Remove the shortcut
|
||||
Delete "$DESKTOP\FreeData Server.lnk"
|
||||
; Delete files and directories for the GUI
|
||||
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
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
"icon": "build/icon.png",
|
||||
"target": [
|
||||
{
|
||||
"target": "nsis",
|
||||
"target": "portable",
|
||||
"arch": ["arm64", "x64"]
|
||||
}
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue