Skip to content

Commit

Permalink
Merge pull request #27 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
Update master
  • Loading branch information
MeSophie authored Jan 11, 2023
2 parents ae02a5c + 48eef21 commit 1b1d6ec
Show file tree
Hide file tree
Showing 62 changed files with 6,573 additions and 1,512 deletions.
76 changes: 48 additions & 28 deletions .github/workflows/CreateInstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:

# set variables
env:
Solution_Name: Instat.sln # Replace with your solution name, i.e. MyWpfApp.sln.
Test_Project_Path: instat\instat.vbproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj.

Solution_Name: Instat.sln
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# check out r-instat
steps:
- name: Checkout
Expand All @@ -41,11 +41,11 @@ jobs:

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2
uses: microsoft/setup-msbuild@v1.1.3

# set up and restore NuGet packages
- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.6
uses: NuGet/setup-nuget@v1.1.1

- name: Restore NuGet
run: nuget restore $env:Solution_Name
Expand All @@ -71,29 +71,41 @@ jobs:
path: instat\My Project\AssemblyInfo.vb
# optional, default is ${{ github.workspace }}
# Version number to set on [AssemblyVersion] and [AssemblyFileVersion] attributes of AssemblyInfo.cs/.vb files
version: "${{ inputs.major_version }}.${{ inputs.minor_version }}.${{ inputs.build_no }}" #.${env:BUILD_NUMBER}"
version: "${{ inputs.major_version }}.${{ inputs.minor_version }}.${{ inputs.build_no }}.${env:BUILD_NUMBER}"

# Create the app package by building and packaging the Windows Application Packaging project
#Same output for 64bit and 32 bit
- name: Create the app package
run: msbuild $env:Test_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }}
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration /p:AppxBundlePlatforms=$env:Appx_Bundle_Platforms /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }}
env:
Appx_Bundle: Always
Appx_Bundle_Platforms: x86|x64
Appx_Bundle_Platforms: x64|x86
Appx_Package_Build_Mode: StoreUpload
Configuration: ${{ matrix.configuration }}

# Create directory and copy over application to a 32bit folder
# There is no difference in R instat other than the packaged R
- name: Make Library directory 64 bit
run: |
MKDIR instat\bin\x86\Release\
- name: Copy R-Instat Data 64 bit
run: |
ROBOCOPY instat\bin\Release\ instat\bin\x86\Release\ /E
continue-on-error: true

# Build 32 bit installer without R
- name: Building the installer 32bit - No R
run: |
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "inno_install_script_32bit.iss"
shell: cmd

# upload 32 bit installer without R
- name: Upload the 32 bit installer as an artifact
uses: actions/upload-artifact@v2
if: ${{ github.event_name != 'pull_request' }}
with:
path: "Output/R-Instat_0.7.4_Installer_32.exe"
path: "Output/R-Instat_Installer_32.exe"
name: rinstat32NoR-innosetup

# Build 64 bit installer without R
Expand All @@ -112,7 +124,7 @@ jobs:

# check out R-Instat Data
- name: Checkout Instat Data
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ' africanmathsinitiative/R-Instat-Data'
fetch-depth: 0
Expand All @@ -131,16 +143,16 @@ jobs:
# Create directory and copy over InstatData (32bit)
- name: Make Library directory 32 bit
run: |
MKDIR instat\bin\x64\Release\static\Library\
MKDIR instat\bin\x86\Release\static\Library\
- name: Copy R-Instat Data 32 bit
run: |
ROBOCOPY InstatData\data\*.* instat\bin\x64\Release\static\Library\ /E
ROBOCOPY InstatData\data\*.* instat\bin\x86\Release\static\Library\ /E
continue-on-error: true

# check out R for R-Instat
- name: Checkout R for R-Instat
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: 'ChrisMarsh82/R-RInstat'
fetch-depth: 0
Expand All @@ -153,41 +165,49 @@ jobs:

- name: Copy R 32 bit
run: |
ROBOCOPY R-RInstat\32Bit\ instat\bin\x64\Release\static\ /E
ROBOCOPY R-RInstat\32Bit\ instat\bin\x86\Release\static\ /E
continue-on-error: true

- name: Install R packages (64 bit)
run: |
"instat\bin\Release\static\R\bin\Rscript.exe" "instat\static\InstatObject\R\InstallPackages.R"
shell: cmd

- name: Install R packages (32 bit)
run: |
"instat\bin\x64\Release\static\R\bin\Rscript.exe" "instat\static\InstatObject\R\InstallPackages.R"
shell: cmd
shell: cmd

- name: Building the installer 64bit - With R
run: |
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "inno_install_script_64bit.iss"
shell: cmd

- name: Building the installer 32bit - With R
run: |
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "inno_install_script_32bit.iss"
shell: cmd

- name: Upload the 64 bit installer with R as an artifact
uses: actions/upload-artifact@v2
if: ${{ github.event_name != 'pull_request' }}
with:
path: "Output/R-Instat_Installer_64.exe"
name: rinstat64WithR-innosetup


- name: Remove 64 bit release files to free up space
run: |
Remove-Item "instat\bin\Release\" -Recurse
- name: Remove 64 innosetup to free up space
run: |
del "Output/R-Instat_Installer_64.exe"
- name: Install R packages (32 bit)
run: |
"instat\bin\x86\Release\static\R\bin\Rscript.exe" "instat\static\InstatObject\R\InstallPackages.R"
shell: cmd

- name: Building the installer 32bit - With R
run: |
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "inno_install_script_32bit.iss"
shell: cmd

- name: Upload the 32 bit installer with R as an artifact
uses: actions/upload-artifact@v2
if: ${{ github.event_name != 'pull_request' }}
with:
path: "Output/R-Instat_Installer_32.exe"
name: rinstat64WithR-innosetup
name: rinstat32WithR-innosetup


1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,4 @@ installer/Output/
# Package used by script window
/packages/jacobslusser.ScintillaNET.*/

/packages/NLog.*/
6 changes: 3 additions & 3 deletions inno_install_script_32bit.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
; 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.)
AppVersion= {#GetStringFileInfo("instat\bin\Release\instat.exe", "FileVersion")}
AppVersion= {#GetStringFileInfo("instat\bin\x86\Release\instat.exe", "FileVersion")}
AppId={{979E51D8-9BC4-418F-8D4D-9B44FEA869A6-{#SetupSetting("AppVersion")}}
AppName=R-Instat

Expand All @@ -27,8 +27,8 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; OnlyBelowVersion: 0

[Files]
Source: "instat\bin\x64\Release\instat.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "instat\bin\x64\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "instat\bin\x86\Release\instat.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "instat\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Expand Down
2 changes: 1 addition & 1 deletion instat/Interface/IGrid.vb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Public Interface IGrid

Sub UpdateAllWorksheetStyles()

Sub ReOrderWorksheets()
Sub ReOrderWorksheets(strCurrWorksheet As String)

Sub UpdateWorksheetStyle(worksheet As clsWorksheetAdapter)
End Interface
Loading

0 comments on commit 1b1d6ec

Please sign in to comment.