-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
169 changed files
with
6,167 additions
and
2,630 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: build and test | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- '**.cs' | ||
- '**.csproj' | ||
push: | ||
branches: [ dev ] | ||
|
||
env: | ||
DOTNET_VERSION: '7.0.x' # The .NET SDK version to use | ||
|
||
jobs: | ||
build-and-test: | ||
|
||
name: build-and-test | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
|
||
- name: Setup Chrome | ||
uses: browser-actions/[email protected] | ||
|
||
- name: Install dependencies | ||
run: dotnet restore | ||
|
||
- name: Build | ||
run: dotnet build --configuration Release --no-restore | ||
|
||
- name: Test | ||
run: dotnet test --no-restore -v normal --filter Priority!=2 | ||
|
||
- name: Upload Log Artifact | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: log-file | ||
#using $env{appdata} did't work so use this for now, fine until cross platform | ||
path: C:\Users\runneradmin\AppData\Roaming\COMPASS\logs\test.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Deployment Steps | ||
|
||
## Increment Version (done by running $: py publish.py x.x.x) | ||
|
||
- [x] Increment AssemblyInfo Version Number | ||
- [x] Increment installer.iss Version Number | ||
- [x] Update versionInfo.xml | ||
- [x] Append changelog from changes.md to Changelog.md | ||
|
||
## Build all the things (also done when running $: py publish.py x.x.x) | ||
|
||
- [x] Build Release | ||
- [x] Publish | ||
- [x] Create installer using install.iss | ||
|
||
## Test | ||
|
||
- [ ] Run all the unit and integration tests | ||
- [ ] Run setup file to make sure installer works | ||
|
||
## Deploy to github | ||
|
||
- [ ] Create a PR | ||
- [ ] Create new github tag based on dev | ||
- [ ] create new github release | ||
- [ ] Merge the PR <-- must be done AFTER release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
; Script generated by the Inno Setup Script Wizard. | ||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ||
|
||
#define MyAppName "COMPASS" | ||
#define MyAppVersion "1.7.0" | ||
#define MyAppPublisher "Paul De Smul" | ||
#define MyAppURL "https://www.compassapp.info" | ||
#define MyAppExeName "COMPASS.exe" | ||
|
||
[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={{6BB9B60C-E9A6-4342-9E26-663ACBE88F2C} | ||
AppName={#MyAppName} | ||
AppVersion={#MyAppVersion} | ||
AppVerName={#MyAppName} {#MyAppVersion} | ||
AppPublisher={#MyAppPublisher} | ||
AppPublisherURL={#MyAppURL} | ||
AppSupportURL={#MyAppURL} | ||
AppUpdatesURL={#MyAppURL} | ||
DefaultDirName={autopf}\{#MyAppName} | ||
ArchitecturesInstallIn64BitMode = x64 | ||
DisableProgramGroupPage=yes | ||
; Uncomment the following line to run in non administrative install mode (install for current user only.) | ||
;PrivilegesRequired=lowest | ||
OutputDir=Versions\{#MyAppVersion} | ||
OutputBaseFilename=COMPASS_Setup_{#MyAppVersion} | ||
Compression=lzma | ||
SolidCompression=yes | ||
WizardStyle=modern | ||
ChangesAssociations = yes | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl" | ||
|
||
[Tasks] | ||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked | ||
|
||
[Files] | ||
Source: "..\src\bin\Publish\win-x64\*"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "..\src\bin\Publish\win-x64\Media\*"; DestDir: "{app}\Media"; Flags: ignoreversion | ||
Source: "..\src\bin\Publish\win-x64\gs\*"; DestDir: "{app}\gs"; Flags: ignoreversion | ||
Source: "..\src\bin\Publish\win-x64\selenium-manager\windows\*"; DestDir : "{app}\selenium-manager\windows"; Flags: ignoreversion | ||
; 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 | ||
|
||
[Registry] | ||
; ----------- Register .satchel as a COMPASS file -------------- ; | ||
; register the .sathel extension | ||
Root: HKCR; Subkey: ".satchel"; ValueType: string; ValueName: ""; ValueData: "COMPASSSatchelFile"; Flags: uninsdeletevalue | ||
; Give it a type name "COMPASS Satchel" | ||
Root: HKCR; Subkey: "COMPASSSatchelFile"; ValueType: string; ValueName: ""; ValueData: "COMPASS Satchel"; Flags: uninsdeletekey | ||
; Give it the COMPASS Icon | ||
Root: HKCR; Subkey: "COMPASSSatchelFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\COMPASS.EXE,0" | ||
; Make double click open the file using compass, not handled yet in COMPASS | ||
; Root: HKCR; Subkey: "COMPASSSatchelFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\COMPASS.EXE"" ""%1""" | ||
; -------------------------------------------------------------- ; | ||
|
||
[Code] | ||
procedure CurUninstallStepChanged (CurUninstallStep: TUninstallStep); | ||
var | ||
mres : integer; | ||
begin | ||
case CurUninstallStep of | ||
usPostUninstall: | ||
begin | ||
mres := MsgBox('Delete data on uninstall.', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) | ||
if mres = IDYES then | ||
DelTree(ExpandConstant('{userappdata}\{#MyAppName}'), True, True, True); | ||
end; | ||
end; | ||
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
from dataclasses import replace | ||
from datetime import date | ||
import os | ||
import sys | ||
import re | ||
|
||
def replaceVersion(path, old, new): | ||
with open(path, "r") as f: | ||
data = f.read() | ||
data = data.replace(old,new) | ||
with open(path,"w") as f: | ||
f.write(data) | ||
|
||
def getOldVersion(): | ||
#open and read AssemblyInfo | ||
with open(r"../src/Properties/AssemblyInfo.cs", "r+") as f: | ||
data = f.read() | ||
#find old version number | ||
return re.findall(r".*\[assembly: AssemblyVersion\(\"(.+)\"\)\].*", data, re.MULTILINE)[0] | ||
|
||
def IncrementVersions(): | ||
# Increment AssemblyInfo | ||
replaceVersion(r"../src/Properties/AssemblyInfo.cs", OLD_VERSION, NEW_VERSION) | ||
# Increment installer.iss | ||
replaceVersion("install.iss", OLD_VERSION, NEW_VERSION) | ||
# Increment versionInfo.xml | ||
replaceVersion(r"../versionInfo.xml", OLD_VERSION,NEW_VERSION) | ||
|
||
def WriteChangelog(): | ||
|
||
data = "" | ||
# add changelog of this release to full changelog | ||
if os.path.exists("changes.md"): | ||
with open("changes.md", "r") as f: | ||
data = f.read() | ||
|
||
# make dir to put changelog in | ||
dir = f"./Versions/{NEW_VERSION}" | ||
if not os.path.exists(dir): os.mkdir(dir) | ||
|
||
#create realease-notes file and write to it | ||
notes = dir +f"/release-notes-{NEW_VERSION}.md" | ||
openMode = "x" if not os.path.exists(notes) else "w" | ||
with open(dir +f"/release-notes-{NEW_VERSION}.md",openMode) as f: | ||
# append version number and date | ||
today = date.today().strftime("%d %B %Y") | ||
data = f"# COMPASS v{NEW_VERSION} ({today})\n\n" + data | ||
f.write(data) | ||
|
||
#append them to total Changelog | ||
with open("../Changelog.md","r+") as f: | ||
content = f.read() | ||
f.seek(14) # skip "#CHANGELOG" | ||
data = data.replace("# ","## ") # make titles one smaller | ||
f.write(data + '\n' + content[13:]) | ||
|
||
#clear changes back to template | ||
if os.path.exists("release-notes-template.md"): | ||
with open("release-notes-template.md","r") as f: | ||
data = f.read() | ||
with open("changes.md","w") as f: | ||
f.write(data) | ||
|
||
|
||
def Build(): | ||
os.system(r"dotnet build ../COMPASS.sln -c Release") | ||
|
||
def Publish(): | ||
os.system(r"dotnet publish ../COMPASS.sln -p:PublishProfile=FolderProfile.pubxml") | ||
|
||
def CreateSetupFile(): | ||
os.system(r"InnoSetup\ISCC.exe install.iss") | ||
|
||
# first arg: file name, second arg: version | ||
NEW_VERSION = sys.argv[1] | ||
OLD_VERSION = getOldVersion() | ||
|
||
#switch to dev branch | ||
#os.system("git checkout dev") | ||
|
||
if NEW_VERSION != OLD_VERSION: | ||
IncrementVersions() | ||
WriteChangelog() | ||
Build() | ||
Publish() | ||
CreateSetupFile() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Import & export your collection: Satchels | ||
|
||
## Overview | ||
|
||
.satchel is a file format designed to share data between compass users. | ||
Like many other existing file formats, .satchel is not a binary file but a renamed zip archive. | ||
|
||
This means that you can inspect its content outside of COMPASS by renaming it back to .zip and opening it like any other archive. All the files inside are either .xml or .json files which are both human readable and editable. | ||
|
||
## Contents | ||
|
||
As single .satchel file corresponds to a single collection and can contain any of the following: | ||
|
||
- A `SatchelInfo.json` file that contains the version of COMPASS that was used to create the satchel file, as well as the last compatible version for each component. More about compatibility in the next section. | ||
- A `CodexInfo.xml` file containing all the items in the collections with their metadata such as their title, author, ect. | ||
- A `CollectionInfo.xml` file containing info and preferences about the collection such as which filetypes to exclude from import and folder-tag links. | ||
- A `Tags.xml` file containing all the tags for that collection. | ||
- A `CoverArt` folder containing full res versions of the cover art of the items in `CodexInfo.xml`. | ||
- A `Thumbnails` folder containing low res versions of the cover art of the items in `CodexInfo.xml`. | ||
- A `Files` folder that contains files that were referenced by the `path` field of the items. | ||
|
||
## Compatibility | ||
|
||
Satchel files will always be forward compatible with newer versions of COMPASS, meaning they can be opened in any version of COMPASS that is equal to or greater than the version that was used to create it. | ||
|
||
Backwards compatibility however poses challenges, as .satchel files created in newer versions may have changes in their data structure that older versions cannot interpret. Attempting to import these newer files anyway could result in data that has seen changes to its structure, getting lost in the import. It can also result in crashes and even possible file corruption of your existing collections. | ||
|
||
Because of these dangers, satchels always include the minimum required version of COMPASS to properly open and interpret each of its 3 xml files (`CodexInfo.xml`, `CollectionInfo.xml` and `Tags.xml`). If any of these xml files are present and marked incompatible, COMPASS will refuse to import the satchel. | ||
|
||
If you wish to import such an incompatible .satchel file, you will have to update your install to match the target version. If however you do not want to update, you can always manually modify the necessary files to match the old format by referencing the included changelog, and then change the `SatchelInfo.json` file manually to match your installed version. | ||
|
||
## Format changes | ||
|
||
### Version 1.7.0 | ||
|
||
Introduction of the format. |
Oops, something went wrong.