Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…nto nt-dependency-rework
  • Loading branch information
Gold872 committed Jun 29, 2024
2 parents cb6cba1 + 72f34c4 commit d669002
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/elastic-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: flutter test --coverage

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
build:
Expand All @@ -83,10 +83,12 @@ jobs:
build-option: "macos"
artifact-path: "build/macos/Build/Products/Release/Elastic-macOS.zip"
artifact-name: Elastic-macOS
executable-type: portable
- os: ubuntu-latest
build-option: "linux"
artifact-path: "build/linux/x64/release/bundle"
artifact-name: Elastic-Linux
executable-type: portable

name: "Build - ${{ matrix.artifact-name }}"
needs: [formatting-analysis, test]
Expand Down Expand Up @@ -118,15 +120,39 @@ jobs:
- name: Build app
run: flutter build ${{ matrix.build-option }}

- name: Create installer
if: ${{ matrix.build-option == 'windows' }}
uses: Minionguyjpro/[email protected]
with:
path: installer_setup_script.iss
options: /O+

- name: Zip release
if: ${{ matrix.build-option == 'macos' }}
run: |
cd build/macos/Build/Products/Release
zip -r Elastic-macOS.zip elastic_dashboard.app --symlinks
- name: Upload artifact
uses: actions/upload-artifact@v3
if: ${{ matrix.build-option != 'windows' }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: ${{ matrix.artifact-path }}
if-no-files-found: error

- name: Upload artifact (Windows portable)
if: ${{ matrix.build-option == 'windows' }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}_portable
path: ${{ matrix.artifact-path }}
if-no-files-found: error

- name: Upload artifact (Windows installer)
if: ${{ matrix.build-option == 'windows' }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}_installer
path: "build/windows/x64/installer"
if-no-files-found: error
Binary file added assets/icon.ico
Binary file not shown.
62 changes: 62 additions & 0 deletions installer_setup_script.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#define MyAppName "Elastic"
#define MyAppFolderName "FRC Elastic"
#define MyAppPublisher "Gold87"
#define MyAppURL "https://github.com/gold872/elastic-dashboard/"
#define MyAppExeName "elastic_dashboard.exe"
#define ApplicationVersion GetStringFileInfo('build\windows\x64\runner\Release\elastic_dashboard.exe', 'ProductVersion')

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{2746922E-A2AC-4987-AF02-714F429C7C77}
AppName={#MyAppName}
AppVersion={#ApplicationVersion}
AppVerName={#MyAppName} {#ApplicationVersion}
VersionInfoVersion={#ApplicationVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppFolderName}
; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run
; on anything but x64 and Windows 11 on Arm.
ArchitecturesAllowed=x64compatible
; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the
; install be done in "64-bit mode" on x64 or Windows 11 on Arm,
; meaning it should use the native 64-bit Program Files directory and
; the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64compatible
DisableProgramGroupPage=yes
LicenseFile=LICENSE
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=build\windows\x64\installer
OutputBaseFilename=elastic-setup
SetupIconFile=assets\icon.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "build\windows\x64\runner\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "build\windows\x64\runner\Release\file_selector_windows_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "build\windows\x64\runner\Release\flutter_windows.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "build\windows\x64\runner\Release\screen_retriever_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "build\windows\x64\runner\Release\url_launcher_windows_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "build\windows\x64\runner\Release\window_manager_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "build\windows\x64\runner\Release\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

0 comments on commit d669002

Please sign in to comment.