Skip to content

Commit

Permalink
Updated Installer files, and versioning in server settings
Browse files Browse the repository at this point in the history
  • Loading branch information
confused-Techie committed Dec 26, 2021
1 parent 36e8141 commit 764b8e0
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ reporting/
*.exe
# ignore original list.json
list.json
# ignore the binaries built for windows
binaries/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ list.json
DEV-docs
# Ignore any build left by go build .
*.exe
# Ignore binaries built for windows
binaries
2 changes: 1 addition & 1 deletion GoPage.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func main() {
// now to allow static file serving for css and js assets
fs := http.FileServer(http.Dir(viper.GetString("directories.staticAssets")))
http.Handle("/assets/", http.StripPrefix("/assets/", fs))

// allow static file serving from the plugins folder
plugin := http.FileServer(http.Dir(viper.GetString("directories.plugin")))
http.Handle("/plugins/", http.StripPrefix("/plugins/", plugin))
Expand Down
64 changes: 42 additions & 22 deletions installer/GoPage.iss
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{4322BAAB-9BD4-47F4-8F3C-471B1951D1F8}
AppName=GoPage
AppVersion=0.1
;AppVerName=GoPage 0.1
AppVersion=0.3
AppPublisher=LHBasics
AppPublisherURL=https://www.lhbasics.com/
AppSupportURL=https://www.lhbasics.com/
AppUpdatesURL=https://www.lhbasics.com/
AppSupportURL=https://github.com/confused-Techie/GoPage
AppUpdatesURL=https://github.com/confused-Techie/GoPage
DefaultDirName={localappdata}\.gopage
DisableDirPage=yes
DisableProgramGroupPage=yes
Expand All @@ -30,35 +29,56 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\Users\antho\go\bin\GoPage.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\binaries\GoPage-v0.3.exe"; DestDir: "{app}"; DestName: "GoPage.exe"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: "D:\Personal Documents\Github Repositories\GoPage\templates\editPage.html"; DestDir: "{app}\templates"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\templates\error.html"; DestDir: "{app}\templates"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\templates\homePage.html"; DestDir: "{app}\templates"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\templates\newItem.html"; DestDir: "{app}\templates"; Flags: ignoreversion
; Below we will instead specify directories instead of individual files
Source: "D:\Personal Documents\Github Repositories\GoPage\templates\*"; DestDir: "{app}\templates"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\plugins\*"; DestDir: "{app}\plugins"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\cleanFiles\*"; DestDir: "{app}\cleanFiles"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\settings\*"; DestDir: "{app}\settings"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\assets\css\*"; DestDir: "{app}\assets\css"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\assets\images\*"; DestDir: "{app}\assets\images"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\assets\js\*"; DestDir: "{app}\assets\js"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\assets\lang\*"; DestDir: "{app}\assets\lang"; Flags: ignoreversion
; The different asset dirs are specified seperately to ensure moving userImages as a directory leaves it empty
; Then the next to lines transfer configuration data to the app dir
Source: "D:\Personal Documents\Github Repositories\GoPage\cleanFiles\config.yml"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\cleanFiles\list.json"; DestDir: "{app}"; Flags: ignoreversion
; Finally we transfer the windows init script properly to edit the configuration file
Source: "D:\Personal Documents\Github Repositories\GoPage\scripts\windowsInit.ps1"; DestDir: "{app}"; Flags: ignoreversion

;Source: "D:\Personal Documents\Github Repositories\GoPage\templates\editPage.html"; DestDir: "{app}\templates"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\templates\error.html"; DestDir: "{app}\templates"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\templates\homePage.html"; DestDir: "{app}\templates"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\templates\newItem.html"; DestDir: "{app}\templates"; Flags: ignoreversion
; The above is for all template items
Source: "D:\Personal Documents\Github Repositories\GoPage\assets\css\form.css"; DestDir: "{app}\assets\css"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\assets\css\home.css"; DestDir: "{app}\assets\css"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\assets\css\form.css"; DestDir: "{app}\assets\css"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\assets\css\home.css"; DestDir: "{app}\assets\css"; Flags: ignoreversion
; The above is for CSS items
Source: "D:\Personal Documents\Github Repositories\GoPage\assets\js\form.js"; DestDir: "{app}\assets\js"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\assets\js\home.js"; DestDir: "{app}\assets\js"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\assets\js\form.js"; DestDir: "{app}\assets\js"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\assets\js\home.js"; DestDir: "{app}\assets\js"; Flags: ignoreversion
; The above is for JS items
Source: "D:\Personal Documents\Github Repositories\GoPage\assets\images\edit.svg"; DestDir: "{app}\assets\images"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\assets\images\git-branch-white.svg"; DestDir: "{app}\assets\images"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\assets\images\github.svg"; DestDir: "{app}\assets\images"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\assets\images\github-white.svg"; DestDir: "{app}\assets\images"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\assets\images\trash-2.svg"; DestDir: "{app}\assets\images"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\assets\images\edit.svg"; DestDir: "{app}\assets\images"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\assets\images\git-branch-white.svg"; DestDir: "{app}\assets\images"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\assets\images\github.svg"; DestDir: "{app}\assets\images"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\assets\images\github-white.svg"; DestDir: "{app}\assets\images"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\assets\images\trash-2.svg"; DestDir: "{app}\assets\images"; Flags: ignoreversion
; The above is for image items
Source: "D:\Personal Documents\Github Repositories\GoPage\cleanFiles\config.yml"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\Personal Documents\Github Repositories\GoPage\cleanFiles\list.json"; DestDir: "{app}"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\cleanFiles\config.yml"; DestDir: "{app}"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\cleanFiles\list.json"; DestDir: "{app}"; Flags: ignoreversion
; The above is for config file && data file
Source: "D:\Personal Documents\Github Repositories\GoPage\scripts\windowsInit.ps1"; DestDir: "{app}"; Flags: ignoreversion
;Source: "D:\Personal Documents\Github Repositories\GoPage\scripts\windowsInit.ps1"; DestDir: "{app}"; Flags: ignoreversion


[Dirs]
; To create the empty userImages Dir
Name: "{app}\assets\userImages"

[Icons]
Name: "{autoprograms}\GoPage"; Filename: "{app}\GoPage.exe"
Name: "{autodesktop}\GoPage"; Filename: "{app}\GoPage.exe"; Tasks: desktopicon

[Run]
Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -File ""{app}\windowsInit.ps1"""; StatusMsg: "Config Setup"; WorkingDir: {app}; Flags: runhidden;
;Filename: "{app}\windowsInit.ps1"; Parameters: "-ExecutionPolicy Bypass"; Description: "Config Setup"; StatusMsg: "Config Setup"; WorkingDir: {app}; Flags: runhidden

Filename: "{app}\GoPage.exe"; Description: "{cm:LaunchProgram,GoPage}"; Flags: nowait postinstall skipifsilent
3 changes: 3 additions & 0 deletions scripts/windowsInit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ $curDir = pwd;
Add-Content .\config.yml "`n staticAssets: '$pwd\assets\'";
Add-Content .\config.yml " templates: '$pwd\templates\'";
Add-Content .\config.yml " data: '$pwd\list.json'";
Add-Content .\config.yml " plugin: '$pwd\plugins\'";
Add-Content .\config.yml " setting: '$pwd\settings\'";
Add-Content .\config.yml " script: '$pwd\scripts\'";
2 changes: 1 addition & 1 deletion settings/serverSettings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "GoPage",
"version": "0.2",
"version": "0.3",
"author": "confused-Techie",
"lang": "en"
}

0 comments on commit 764b8e0

Please sign in to comment.