Skip to content

Commit

Permalink
Merge pull request #7 from rocksdanister/dev-build
Browse files Browse the repository at this point in the history
v0.6.5.0 src
  • Loading branch information
rocksdanister authored Jan 19, 2020
2 parents 2178f4a + eea2778 commit 412fa54
Show file tree
Hide file tree
Showing 53 changed files with 1,425 additions and 1,162 deletions.
29 changes: 8 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,33 +94,20 @@ Help translate lively to other languages: <a href="https://github.com/rocksdanis
* Kill wallpaper when fullscreen apps/games run(coming soon).
* Mute audio when not on desktop (or optionally always mute).

**_I'm not officially affiliated with Unity technologies, youtube, godot, bizhawk, shadertoy;_**
**_I'm not officially affiliated with Unity technologies, godot, shadertoy;_**
## Download
##### Latest version: v0.6.0.0 (Windows 10, 8.1)
- [`lively_full_x86.zip`][direct-full-win32]
_122MB, Web wallpaper support & some sample wallpapers included._

- [`lively_x86.zip`][direct-just-win32]
_82MB, Web wallpaper support._

- [`lively_lite_x86.zip`][direct-lite-win32]
_11MB, No web wallpaper support._

[direct-full-win32]: https://github.com/rocksdanister/lively/releases/download/v0.6.0.0/lively_full_x86.zip

[direct-just-win32]: https://github.com/rocksdanister/lively/releases/download/v0.6.0.0/lively_x86.zip

[direct-lite-win32]: https://github.com/rocksdanister/lively/releases/download/v0.6.0.0/lively_lite_x86.zip
##### Latest version: v0.6.5.0 (Windows 10, 8.1)[What's new?](https://github.com/rocksdanister/lively/releases/tag/v0.6.5.0)
- [`setup.exe`][direct-full-win32]
_98MB, Web wallpaper support & some sample wallpapers included._

Unzip the file, select livelywpf.exe to get started, first run will be slow due to windows defender scanning.

To update from old version, download `lively_x86.zip`, delete everything(backup mpv & youtube-dl folder if you have it installed) except `SaveData` & `wallpapers` folder from your existing lively folder & just unzip the new version over it.
**From v0.6.5 onwards lively will be in installer form, new userdata & plugins location is “Documents\Lively Wallpaper”.**
[direct-full-win32]: https://github.com/rocksdanister/lively/releases/download/v0.6.5.0/lively_setup_x86_full_v0650.exe

[Trouble Getting started? ](https://github.com/rocksdanister/lively/wiki/Getting-Started)

Certain antivirus software heuristics algorithm will detect lively as a virus, this is a false positive
**lively is fully opensource, you are free to inspect the code.**

**lively is fully [opensource](https://en.wikipedia.org/wiki/Free_and_open-source_software), you are free to inspect the code.**

## Issues
[TODO List](https://trello.com/b/rdFFxuMF/lively-wallpaper-system)
Expand Down
191 changes: 191 additions & 0 deletions src/lively setup/Inno.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Lively Wallpaper"
#define MyAppVersion "0.6.5.0"
#define MyAppPublisher "rocksdanister"
#define MyAppURL "https://github.com/rocksdanister/lively"
#define MyAppExeName "livelywpf.exe"

[CustomMessages]
; This is all machine translated...might be gibberish!
english.RunAtStartup=Start with Windows
chinese.RunAtStartup=从Windows开始
japanese.RunAtStartup=窓から始める
russian.RunAtStartup=начать с Windows
spanish.RunAtStartup=Iniciar Windows

english.FullInstall=Full
chinese.FullInstall=充分
japanese.FullInstall=一杯
russian.FullInstall=полный
spanish.FullInstall=llena

english.LiteInstall=Lite
chinese.LiteInstall=精简版
japanese.LiteInstall=ライト
russian.LiteInstall=облегченная
spanish.LiteInstall=lite

english.CustomInstall=Custom
chinese.CustomInstall=习俗
japanese.CustomInstall=カスタム
russian.CustomInstall=обычай
spanish.CustomInstall=personalizada

english.DeleteEverythigMsgBox=Do you want to delete userdata & wallpapers in
chinese.DeleteEverythigMsgBox=您要删除用户数据和墙纸吗
japanese.DeleteEverythigMsgBox=ユーザーデータと壁紙を削除しますか
russian.DeleteEverythigMsgBox=Вы хотите удалить пользовательские данные и обои
spanish.DeleteEverythigMsgBox=¿Desea eliminar datos de usuario y fondos de pantalla en

[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={{E3E43E1B-DEC8-44BF-84A6-243DBA3F2CB1}}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes
; Remove the following line to run in administrative install mode (install for all users.)
; lowest - AppData folder, admin - Program Files (x86)
PrivilegesRequired=lowest
; Ask user which PrivilegesRequired on startup.
PrivilegesRequiredOverridesAllowed=dialog
OutputBaseFilename=lively_installer
SetupIconFile=Icons\icons8-seed-of-life-96-normal.ico
Compression=lzma
;Compression=lzma2/ultra64
SolidCompression=yes
WizardStyle=modern
;Installer/Uninstaller will stop if application is running by checking mutex.
AppMutex=LIVELY:DESKTOPWALLPAPERSYSTEM
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"; LicenseFile: "License\License.txt";
Name: "chinese"; MessagesFile: "Setup Languages\ChineseSimplified.isl"
Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl";
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl";
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl";

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}";
;GroupDescription: "{cm:AdditionalIcons}"
Name: "windowsstartup";Description: "{cm:RunAtStartup}"

[Registry]
;current user only
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "livelywpf"; ValueData: "{app}\livelywpf.exe"; Flags: uninsdeletekey; Tasks:windowsstartup

;[UninstallDelete]

[Types]
Name: "full"; Description: "{cm:FullInstall}"
Name: "lite"; Description: "{cm:LiteInstall}"
Name: "custom"; Description: "{cm:CustomInstall}"; Flags: iscustom

[Components]
Name: "program"; Description: "Program Files"; Types: full lite custom; Flags: fixed
Name: "cef"; Description: "Web Wallpaper Support"; Types: full
Name: "wallpapers"; Description: "Sample Wallpapers"; Types: full

[Files]
Source: "Release\livelywpf.exe"; DestDir: "{app}"; Flags: ignoreversion;Components: program
Source: "Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: program
Source: "Lively Wallpaper\external\cef\*"; DestDir: "{userdocs}\Lively Wallpaper\external\cef"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: cef
Source: "Lively Wallpaper\wallpapers\*"; DestDir: "{userdocs}\Lively Wallpaper\wallpapers"; Flags: ignoreversion recursesubdirs createallsubdirs onlyifdoesntexist uninsneveruninstall; Components: wallpapers
; 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

[Code]
// event fired when the uninstall step is changed: https://stackoverflow.com/revisions/12645836/1
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
// if we reached the post uninstall step (uninstall succeeded), then...
if CurUninstallStep = usPostUninstall then
begin
// query user to confirm deletion; if user chose "Yes", then...
if SuppressibleMsgBox(ExpandConstant('{cm:DeleteEverythigMsgBox}')+' '+ ExpandConstant('{userdocs}\Lively Wallpaper') + ' ?',
mbConfirmation, MB_YESNO, IDNO) = IDYES
then
// deletion confirmed by user.
begin
// Delete the directory Documents/LivelyWallpaper and everything inside it
DelTree(ExpandConstant('{userdocs}\Lively Wallpaper'), True, True, True);
end;
end;
end;
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall
;skipifsilent

[Code]
//Uninstall previous install: https://stackoverflow.com/questions/2000296/inno-setup-how-to-automatically-uninstall-previous-installed-version
//note: Inno does not delete files, it just overwrites & keeps the old ones if they have different name..it can get accumulated/confusing when program structure change?!
function GetUninstallString(): String;
var
sUnInstPath: String;
sUnInstallString: String;
begin
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1');
sUnInstallString := '';
if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then
RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);
Result := sUnInstallString;
end;
/////////////////////////////////////////////////////////////////////
function IsUpgrade(): Boolean;
begin
Result := (GetUninstallString() <> '');
end;
/////////////////////////////////////////////////////////////////////
function UnInstallOldVersion(): Integer;
var
sUnInstallString: String;
iResultCode: Integer;
begin
// Return Values:
// 1 - uninstall string is empty
// 2 - error executing the UnInstallString
// 3 - successfully executed the UnInstallString
// default return value
Result := 0;
// get the uninstall string of the old app
sUnInstallString := GetUninstallString();
if sUnInstallString <> '' then begin
sUnInstallString := RemoveQuotes(sUnInstallString);
if Exec(sUnInstallString, '/VERYSILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
Result := 3
else
Result := 2;
end else
Result := 1;
end;
/////////////////////////////////////////////////////////////////////
procedure CurStepChanged(CurStep: TSetupStep);
begin
if (CurStep=ssInstall) then
begin
if (IsUpgrade()) then
begin
UnInstallOldVersion();
end;
end;
end;
7 changes: 4 additions & 3 deletions src/livelywpf/livelySubProcess/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public RunningProgram()
}

public static List<RunningProgram> runningPrograms = new List<RunningProgram>();
private static string pathData = Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "LivelyWallpaper");

public class RunningProgramsList
{
Expand All @@ -130,7 +131,7 @@ public class RunningProgramsList

public static void LoadRunningPrograms()
{
if (!File.Exists(AppDomain.CurrentDomain.BaseDirectory + "\\lively_running_pgms.json"))
if (!File.Exists(Path.Combine(pathData,"lively_running_pgms.json")))
{
return;
}
Expand All @@ -139,7 +140,7 @@ public static void LoadRunningPrograms()
{

// deserialize JSON directly from a file
using (StreamReader file = File.OpenText(AppDomain.CurrentDomain.BaseDirectory + "\\lively_running_pgms.json"))
using (StreamReader file = File.OpenText( Path.Combine(pathData, "lively_running_pgms.json")))
{
JsonSerializer serializer = new JsonSerializer();
RunningProgramsList tmp = (RunningProgramsList)serializer.Deserialize(file, typeof(RunningProgramsList));
Expand Down Expand Up @@ -169,7 +170,7 @@ public static void SaveRunningPrograms()
NullValueHandling = NullValueHandling.Include
};

using (StreamWriter sw = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory + "\\lively_running_pgms.json"))
using (StreamWriter sw = new StreamWriter( Path.Combine(pathData, "\\lively_running_pgms.json")))
using (JsonWriter writer = new JsonTextWriter(sw))
{
serializer.Serialize(writer, tmp);
Expand Down
6 changes: 0 additions & 6 deletions src/livelywpf/livelyUpdater/App.config

This file was deleted.

59 changes: 0 additions & 59 deletions src/livelywpf/livelyUpdater/Form1.Designer.cs

This file was deleted.

Loading

0 comments on commit 412fa54

Please sign in to comment.