Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final changes for v1.1.0 #16

Merged
merged 8 commits into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@

github.com
.idea/codeStyles/codeStyleConfig.xml

# Local dirs for development
build/
13 changes: 11 additions & 2 deletions api/general/General.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,22 @@ func HexTo2Places(h string) string {
// about Lux

// BuildName is the name of the build
const BuildName = "v1.0.0"
const BuildName = "v1.1.0"
// BuildNo is the build number
const BuildNo = 0
const BuildNo = 1
// GHRepo is the repo url
const GHRepo = "https://github.com/bandev/lux"
// License is the license
const License = "GPL-3.0"
// Description is the description
const Description = "Lux is a cli for controlling and monitoring Govee lighting strips"

// GetBits returns x64 or x86 depending on the
// installed version
func GetBits() string {
if uint64(^uintptr(0)) == ^uint64(0) {
return "x64"
}
return "x86"
}

6 changes: 3 additions & 3 deletions commands/help/Entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
// the devices module.
func Entry() {

// Get latest commands from server
// Get the latest commands from server
var c Commands
c.Fill()

Expand All @@ -43,8 +43,8 @@ func Entry() {
general.PrintHeading("ABOUT LUX", color.FgWhite)
general.PrintBoolParagraph("logged in", color.FgWhite, keymanager.LuxHasAPIKey())
general.PrintStringParagraph("description", general.Description, color.FgWhite)
general.PrintStringParagraph("build", general.BuildName, color.FgWhite)
general.PrintStringParagraph("build", general.BuildName + " (" + general.GetBits() + ")", color.FgWhite)
general.PrintStringParagraph("license", general.License, color.FgWhite)
general.PrintStringParagraph("repository", general.GHRepo, color.FgWhite)
general.PrintBoolParagraph("up to date", color.FgWhite, general.BuildNo == c.BuildNo)
general.PrintBoolParagraph("up to date", color.FgWhite, general.BuildNo >= c.BuildNo)
}
57 changes: 57 additions & 0 deletions installer/script-x64.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#define AppName "Lux"
#define Version "1.1.0"
#define Publisher "BanDev"
#define URL "https://bandev.uk/lux"
#define ExeName "lux.exe"

[Setup]
AppId={{E17378AA-71AA-4EFC-8B09-B9A18F395B2F}
AppName={#Name}
AppVersion={#Version}
AppPublisher={#Publisher}
SetupIconFile=src/lux.ico
UninstallIconFile=src/lux.ico
UninstallDisplayName={#AppName} (x64)
AppPublisherURL={#URL}
DefaultDirName={autopf}\{#AppName}
DisableDirPage=yes
DefaultGroupName={#AppName}
DisableProgramGroupPage=yes
LicenseFile=src/LICENSE.txt
PrivilegesRequired=lowest
OutputDir=/
OutputBaseFilename=setup-x64
Compression=lzma
SolidCompression=yes
WizardStyle=modern
ChangesEnvironment=yes
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64

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

[Files]
Source: "src\x64\{#ExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "src\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion

[Registry]
Root: HKCU; Subkey: "Environment"; \
ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; \
Check: NeedsAddPath(ExpandConstant('{app}'))

[Code]
function NeedsAddPath(Param: string): boolean;
var
OrigPath: string;
begin
if not RegQueryStringValue(HKEY_CURRENT_USER,
'\Environment',
'Path', OrigPath)
then begin
Result := True;
exit;
end;
Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;
end;

56 changes: 56 additions & 0 deletions installer/script-x86.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#define AppName "Lux"
#define Version "1.1.0"
#define Publisher "BanDev"
#define URL "https://bandev.uk/lux"
#define ExeName "lux.exe"

[Setup]
AppId={{E17378AA-71AA-4EFC-8B09-B9A18F395B2F}
AppName={#AppName}
AppVersion={#Version}
AppPublisher={#Publisher}
SetupIconFile=src/lux.ico
UninstallIconFile=src/lux.ico
UninstallDisplayName={#AppName} (x86)
AppPublisherURL={#URL}
DefaultDirName={autopf}\{#AppName}
DisableDirPage=yes
DefaultGroupName={#AppName}
DisableProgramGroupPage=yes
LicenseFile=src/LICENSE.txt
PrivilegesRequired=lowest
OutputDir=/
OutputBaseFilename=setup-x86
Compression=lzma
SolidCompression=yes
WizardStyle=modern
ChangesEnvironment=yes
ArchitecturesAllowed=x86 x64

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

[Files]
Source: "src\x86\{#ExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "src\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion

[Registry]
Root: HKCU; Subkey: "Environment"; \
ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; \
Check: NeedsAddPath(ExpandConstant('{app}'))

[Code]
function NeedsAddPath(Param: string): boolean;
var
OrigPath: string;
begin
if not RegQueryStringValue(HKEY_CURRENT_USER,
'\Environment',
'Path', OrigPath)
then begin
Result := True;
exit;
end;
Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;
end;

Loading