Skip to content

Commit

Permalink
Merge pull request #119 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
updating branch
  • Loading branch information
anastasia-mbithe authored Feb 14, 2023
2 parents 90e7340 + e812021 commit 369fde2
Show file tree
Hide file tree
Showing 102 changed files with 5,567 additions and 2,845 deletions.
87 changes: 43 additions & 44 deletions .github/workflows/CreateInstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,14 @@ on:
minor_version:
description: 'Minor Version'
required: true
build_no:
description: 'Build No'
revision_no:
description: 'Revision'
required: true

jobs:

build:

strategy:
matrix:
configuration: [Release]

# running on 2019 so that .NET version 4.5 and lower can be used
runs-on: windows-2019

Expand Down Expand Up @@ -53,12 +49,10 @@ jobs:

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=Release

# increment revision number
- name: Generate revision number
# increment build number
- name: Generate build number
uses: einaregilsson/build-number@v3
with:
token: ${{secrets.github_token}}
Expand All @@ -71,28 +65,25 @@ 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.revision_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: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 }}
# 32 bit
- name: Create the app package 32bit
run: msbuild $env:Solution_Name /p:Configuration=Release /p:Platform=x86 /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: 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

# Create the app package by building and packaging the Windows Application Packaging project
# 64bit
- name: Create the app package 64 bit
run: msbuild $env:Solution_Name /p:Configuration=Release /p:Platform=x64 /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_Package_Build_Mode: StoreUpload
Configuration: ${{ matrix.configuration }}

# Build 32 bit installer without R
- name: Building the installer 32bit - No R
Expand All @@ -105,8 +96,12 @@ jobs:
uses: actions/upload-artifact@v2
if: ${{ github.event_name != 'pull_request' }}
with:
path: "Output/R-Instat_Installer_32.exe"
name: rinstat32NoR-innosetup
path: "Output/"
name: rinstat32NoR

- name: Remove 32 bit without R installer
run: |
del "Output/*"
# Build 64 bit installer without R
- name: Building the installer 64bit - No R
Expand All @@ -119,8 +114,12 @@ jobs:
uses: actions/upload-artifact@v2
if: ${{ github.event_name != 'pull_request' }}
with:
path: "Output/R-Instat_Installer_64.exe"
name: rinstat64NoR-innosetup
path: "Output/"
name: rinstat64NoR

- name: Remove 64 bit without R installer
run: |
del "Output/*"
# check out R-Instat Data
- name: Checkout Instat Data
Expand All @@ -133,21 +132,21 @@ jobs:
# Create directory and copy over InstatData (64bit)
- name: Make Library directory 64 bit
run: |
MKDIR instat\bin\Release\static\Library\
MKDIR instat\bin\x64\Release\static\Library\
- name: Copy R-Instat Data 64 bit
run: |
ROBOCOPY InstatData\data\ instat\bin\Release\static\Library\ /E
ROBOCOPY InstatData\data\ instat\bin\x64\Release\static\Library\ /E
continue-on-error: true

# Create directory and copy over InstatData (32bit)
- name: Make Library directory 32 bit
run: |
MKDIR instat\bin\x86\Release\static\Library\
MKDIR instat\bin\Release\static\Library\
- name: Copy R-Instat Data 32 bit
run: |
ROBOCOPY InstatData\data\*.* instat\bin\x86\Release\static\Library\ /E
ROBOCOPY InstatData\data\*.* instat\bin\Release\static\Library\ /E
continue-on-error: true

# check out R for R-Instat
Expand All @@ -160,17 +159,17 @@ jobs:

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

- name: Copy R 32 bit
run: |
ROBOCOPY R-RInstat\32Bit\ instat\bin\x86\Release\static\ /E
ROBOCOPY R-RInstat\32Bit\ instat\bin\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"
"instat\bin\x64\Release\static\R\bin\Rscript.exe" "instat\static\InstatObject\R\InstallPackages.R"
shell: cmd

- name: Building the installer 64bit - With R
Expand All @@ -182,20 +181,20 @@ jobs:
uses: actions/upload-artifact@v2
if: ${{ github.event_name != 'pull_request' }}
with:
path: "Output/R-Instat_Installer_64.exe"
path: "Output/"
name: rinstat64WithR-innosetup

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

- name: Building the installer 32bit - With R
Expand All @@ -207,7 +206,7 @@ jobs:
uses: actions/upload-artifact@v2
if: ${{ github.event_name != 'pull_request' }}
with:
path: "Output/R-Instat_Installer_32.exe"
path: "Output/"
name: rinstat32WithR-innosetup


18 changes: 14 additions & 4 deletions docs/Download.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,23 @@
<section class="bg-primary" id="about">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 text-center">
<div class="col-lg-8 col-lg-offset-2 text-center">
<h2 class="section-heading">Download R-Instat</h2>
<p><strong>In response to the recent <a href=https://r4stats.com/articles/software-reviews/r-instat/ style="color:blue;" target="_blank">review of R-Instat</a> by Bob Muenchen we have released a new version of R-Instat, version 0.7.5, which includes some new features and initial improvements from the review. Many thanks to Bob for reviewing R-Instat.</strong></p>
<p><strong>In response to the recent <a href="https://r4stats.com/articles/software-reviews/r-instat/" style="color:blue;" target="_blank">review of R-Instat</a>
by Bob Muenchen we continue to develop new versions of R-Instat. Many thanks to Bob for reviewing R-Instat.</strong></p>
<hr class="light">
<p><a href=https://downloads.r-instat.org/R-Instat_0.7.6_Installer_32.exe style="color:blue;" target="_blank">R-Instat 0.7.6 Installer 32 Bit (.exe 802MB)</a></p>
<h3>Latest stable release 0.7.6</h3>
<p><a href="https://downloads.r-instat.org/R-Instat_0.7.6_Installer_32.exe" style="color:blue;" target="_blank">32 Bit Installer (.exe 802MB)</a></p>
<p><a href="https://downloads.r-instat.org/R-Instat_0.7.6_Installer_64.exe" style="color:blue;" target="_blank">64 Bit Installer (.exe 802MB)</a></p>
<p></p>
<p>If you know that you have a 64 bit computer, we suggest you download the 64 Bit version</p>
<a href=https://downloads.r-instat.org/R-Instat_0.7.6_Installer_64.exe style="color:blue;" target="_blank">R-Instat 0.7.6 Installer 64 Bit (.exe 802MB)</a>
<hr class="light">
<h3>Other releases (beta)</h3>
<h4>0.7.8</h4>
<p>
<a href="https://downloads.r-instat.org/R-Instat_0_7_8_Installer_32.exe" style="color:blue;" target="_blank">32 Bit (.exe 780MB)</a> |
<a href="https://downloads.r-instat.org/R-Instat_0_7_8_Installer_64.exe" style="color:blue;" target="_blank">64 Bit (.exe 912MB)</a>
</p>
<p>R-Instat is currently a Windows only application. However, it can be accessed on Mac or Linux through use of a Virtual Windows Machine.</p>

<h2 class="section-heading">Installation & Documentation</h2>
Expand Down
24 changes: 19 additions & 5 deletions inno_install_script_32bit.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
; 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\x86\Release\instat.exe", "FileVersion")}
AppVersion= {#GetStringFileInfo("instat\bin\Release\instat.exe", "FileVersion")}
AppId={{979E51D8-9BC4-418F-8D4D-9B44FEA869A6-{#SetupSetting("AppVersion")}}
AppName=R-Instat
AppVerName ={code:GetShortAppVersion|{#SetupSetting("AppVersion")}}

AppPublisher=African Maths Initiative
AppPublisherURL=http://r-instat.org/
AppSupportURL=http://r-instat.org/
AppUpdatesURL=http://r-instat.org/
DefaultDirName={autopf}\R-Instat\
DefaultDirName={autopf}\R-Instat\{#SetupSetting("AppVerName")}\
DefaultGroupName=R-Instat
AllowNoIcons=yes
OutputBaseFilename=R-Instat_Installer_32
OutputBaseFilename=R-Instat_{#SetupSetting("AppVersion")}_Installer_32
SetupIconFile=.\instat\Resources\rinstat_icon_Hih_icon.ico
UninstallDisplayIcon=.\instat\Resources\rinstat_icon_Hih_icon.ico
Compression=lzma
Expand All @@ -27,8 +28,8 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; OnlyBelowVersion: 0

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

[Icons]
Expand All @@ -40,3 +41,16 @@ Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\R-Instat {#SetupSe

[Run]
Filename: "{app}\instat.exe"; Description: "{cm:LaunchProgram,R-Instat}"; Flags: nowait postinstall skipifsilent

[Code]
function GetShortAppVersion(Param: String): String;
var
major,minor,revision:String;
begin
major := Copy(Param,0,Pos('.',Param));
Delete(Param,1,Pos('.',Param));
minor := Copy(Param,0,Pos('.',Param));
Delete(Param,1,Pos('.',Param));
revision := Copy(Param,0,Pos('.',Param)-1);
Result := major + minor + revision;
end;
24 changes: 19 additions & 5 deletions inno_install_script_64bit.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
; 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\x64\Release\instat.exe", "FileVersion")}
AppId={{5455FC1A-85BE-4679-B600-8A1A4FC3CDD9-{#SetupSetting("AppVersion")}}
AppName=R-Instat
AppVerName ={code:GetShortAppVersion|{#SetupSetting("AppVersion")}}

AppPublisher=African Maths Initiative
AppPublisherURL=http://r-instat.org/
AppSupportURL=http://r-instat.org/
AppUpdatesURL=http://r-instat.org/
DefaultDirName={autopf}\R-Instat\
DefaultDirName={autopf}\R-Instat\{#SetupSetting("AppVerName")}\
DefaultGroupName=R-Instat
AllowNoIcons=yes
OutputBaseFilename=R-Instat_Installer_64
OutputBaseFilename=R-Instat_{#SetupSetting("AppVersion")}_Installer_64
SetupIconFile=.\instat\Resources\rinstat_icon_Hih_icon.ico
UninstallDisplayIcon=.\instat\Resources\rinstat_icon_Hih_icon.ico
Compression=lzma
Expand All @@ -28,8 +29,8 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; OnlyBelowVersion: 0

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

[Icons]
Expand All @@ -41,3 +42,16 @@ Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\R-Instat {#SetupSe

[Run]
Filename: "{app}\instat.exe"; Description: "{cm:LaunchProgram,R-Instat}"; Flags: nowait postinstall skipifsilent

[Code]
function GetShortAppVersion(Param: String): String;
var
major,minor,revision:String;
begin
major := Copy(Param,0,Pos('.',Param));
Delete(Param,1,Pos('.',Param));
minor := Copy(Param,0,Pos('.',Param));
Delete(Param,1,Pos('.',Param));
revision := Copy(Param,0,Pos('.',Param)-1);
Result := major + minor + revision;
end;
Loading

0 comments on commit 369fde2

Please sign in to comment.