Compare commits

..

10 Commits

Author SHA1 Message Date
Mike Nolan 45e4de330e first release 2021-12-31 03:07:15 -06:00
Mike Nolan f24ee3a07d first release 2021-12-31 03:03:37 -06:00
Mike Nolan b055c36490 ok 2021-12-31 02:23:13 -06:00
Mike Nolan 4e3baae988 Merge branch 'main' of gitlab.tesses.cf:tesses50/timelapse 2021-12-31 02:22:28 -06:00
Mike Nolan 561bec4386 ok 2021-12-31 02:21:56 -06:00
Michael Nolan 273ab376b3 Update .gitlab-ci.yml file 2021-12-30 04:16:23 +00:00
Michael Nolan 3d2045233f Update .gitlab-ci.yml file 2021-12-30 04:15:19 +00:00
Mike Nolan f7cc47cc6c Fixed some stuff 2021-12-29 22:07:55 -06:00
Mike Nolan 0cb21eb58c Fixed some stuff 2021-12-29 22:07:31 -06:00
Mike Nolan 24e220badc Fix 2021-12-28 07:47:09 -06:00
28 changed files with 409 additions and 92 deletions

1
.gitignore vendored
View File

@ -11,6 +11,7 @@
*.sln.docstates *.sln.docstates
*.deb *.deb
*.zip
# User-specific files (MonoDevelop/Xamarin Studio) # User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs *.userprefs

28
MIRRING.txt Normal file
View File

@ -0,0 +1,28 @@
https://downloads.tesses.cf/apps/timelapse_now/timelapse_1.0.0_mirrorable.zip
YOU CAN PUT THESE ON YOUR SERVER TO SERVE (FOR MIRRING) I AM GIVING YOU PERMISSION
PLEASE DO THIS (NOT REQUIRED BUT I KIND OF WANT YOU TO IF YOU POST THESE FILES TO SAY THIS)
My Email: tesses50@tesses.cf
My Name: Mike Nolan
Please share zip without extracting it or at least put MIRRING.txt on server with other files
How to install for linux amd64
sudo apt-get install ./timelapsenow_1.0.0_amd64.deb
How to install for linux armhf
sudo apt-get install ./timelapsenow_1.0.0_armhf.deb
How to install for linux arm64
sudo apt-get install ./timelapsenow_1.0.0_arm64.deb
For windows (Intel or AMD)
32 bit: timelapse_1.0.0_win32.zip
64 bit: timelapse_1.0.0_win64.zip
For Windows (WoA)
64 bit: timelapse_1.0.0_woa64.zip
Source Code
https://gitlab.tesses.cf/tesses50/timelapse.git or https://drive.google.com/drive/folders/1XxZdd6gmudcOzOeXG2oX2tf4JST-9Ufn?usp=sharing

View File

@ -2,14 +2,17 @@
Record webcam in steps Record webcam in steps
# Compile for everything # Compile for everything (Windows/Linux)
./create.sh ./createAll.sh
# Compile for Windows # Compile for Windows
electronize build /target win /p:PublishReadyToRun=false electronize build /target win /p:PublishReadyToRun=false or
buildWin.bat or ./createWin.sh
# Compile for Mac OS # Compile for Mac OS
electronize build /target osx /p:PublishReadyToRun=false electronize build /target osx /p:PublishReadyToRun=false
# Compile for Linux # Compile for Linux
electronize build /target linux /p:PublishReadyToRun=false electronize build /target linux /p:PublishReadyToRun=false or
./createLinux.sh

View File

@ -40,27 +40,41 @@ namespace Timelapse.Api
} }
public class Extensions public class Extensions
{ {
public static IReadOnlyDictionary<string,Type> Components {get {return _components;}}
internal static Dictionary<string,Type> _components = new Dictionary<string, Type>();
public static string GetId(TimelapseExtension e) public static string GetId(TimelapseExtension e)
{ {
return e.__id; return e.__id;
} }
public static async Task<IActionResult> OnGetPage(string extId,string subPage) /// <summary>
{ /// Callbacks back to TimelapseUI
foreach(var item in Attributes) /// </summary>
{ /// <value></value>
if(item.Key.Id == extId)
{
return await item.Value.OnHandleRequest(subPage);
}
}
return new NotFoundResult();
}
public static Callbacks Callbacks {get;set;} public static Callbacks Callbacks {get;set;}
public static string UserData =Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),".TimelapseNow"); /// <summary>
/// UserData
/// </summary>
/// <returns>TimelapseNow Folder for user</returns>
public static string UserData =Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),"TimelapseNow");
/// <summary>
/// UserExtensions
/// </summary>
/// <returns>Location for Extensions</returns>
public static string UserExtensions = Path.Combine(UserData,"Extensions"); public static string UserExtensions = Path.Combine(UserData,"Extensions");
/// <summary>
/// Global Data for app
/// </summary>
/// <returns>Timelapse Folder for all users</returns>
public static string GlobalData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData),"TimelapseNow"); public static string GlobalData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData),"TimelapseNow");
/// <summary>
/// GlobalExtensions
/// </summary>
/// <returns>Location for extensions for all users</returns>
public static string GlobalExtensions = Path.Combine(GlobalData,"Extensions"); public static string GlobalExtensions = Path.Combine(GlobalData,"Extensions");
/// <summary>
/// Dont call this
/// </summary>
public static void EnumerateExtensions() public static void EnumerateExtensions()
{ {
TimelapseExtensions = new List<TimelapseExtension>(); TimelapseExtensions = new List<TimelapseExtension>();
@ -89,6 +103,10 @@ namespace Timelapse.Api
} }
} }
} }
/// <summary>
/// Only call this to load extension manually
/// </summary>
/// <param name="dll">path to dll</param>
public static void LoadDll(string dll) public static void LoadDll(string dll)
{ {
Assembly asm=Assembly.LoadFrom(dll); Assembly asm=Assembly.LoadFrom(dll);
@ -97,21 +115,41 @@ namespace Timelapse.Api
ExtensionAttribute attr=type.GetCustomAttribute<ExtensionAttribute>(); ExtensionAttribute attr=type.GetCustomAttribute<ExtensionAttribute>();
if(typeof(TimelapseExtension).IsAssignableFrom(type) && attr != null) if(typeof(TimelapseExtension).IsAssignableFrom(type) && attr != null)
{ {
Console.WriteLine("Before Create Instance");
//load assembly info //load assembly info
var item=(TimelapseExtension)Activator.CreateInstance(typeof(TimelapseExtension));
var item=(TimelapseExtension)Activator.CreateInstance(type);
Console.WriteLine("Affter Create Instance");
item.__id=attr.Id; item.__id=attr.Id;
item.Name = attr.Name; item.Name = attr.Name;
TimelapseExtensions.Add(item); TimelapseExtensions.Add(item);
Attributes.Add(attr,item); Attributes.Add(attr,item);
Console.WriteLine("Before OnInit");
item.OnInit(); item.OnInit();
Console.WriteLine("After OnInit");
} }
} }
Assemblies.Add(asm,dll); Assemblies.Add(asm,dll);
} }
/// <summary>
/// Assemblies
/// </summary>
/// <value>Dictionary of assembly,string</value>
public static Dictionary<Assembly,string> Assemblies {get;set;} public static Dictionary<Assembly,string> Assemblies {get;set;}
/// <summary>
/// Stores Attributes for extension
/// </summary>
/// <value>returns timelapseExtension based on attribute</value>
public static Dictionary<ExtensionAttribute,TimelapseExtension> Attributes {get;set;} public static Dictionary<ExtensionAttribute,TimelapseExtension> Attributes {get;set;}
/// <summary>
/// List of extensions
/// </summary>
/// <value>List of extensions</value>
public static List<TimelapseExtension> TimelapseExtensions {get;set;} public static List<TimelapseExtension> TimelapseExtensions {get;set;}
/// <summary>
/// Dont call this (this gets called from The UI)
/// </summary>
public static async Task OnNewFrame(Image<Rgb24> image) public static async Task OnNewFrame(Image<Rgb24> image)
{ {
foreach(var extension in TimelapseExtensions) foreach(var extension in TimelapseExtensions)
@ -119,6 +157,9 @@ namespace Timelapse.Api
await extension.OnNewFrame(image); await extension.OnNewFrame(image);
} }
} }
/// <summary>
/// Dont call this (this gets called from The UI)
/// </summary>
public static void OnLoadProject(TimelapseProject project) public static void OnLoadProject(TimelapseProject project)
{ {
foreach(var extension in TimelapseExtensions) foreach(var extension in TimelapseExtensions)
@ -126,6 +167,9 @@ namespace Timelapse.Api
extension.OnLoadProject(project); extension.OnLoadProject(project);
} }
} }
/// <summary>
/// Dont call this (this gets called from The UI)
/// </summary>
public static void OnStopRecording() public static void OnStopRecording()
{ {
foreach(var extension in TimelapseExtensions) foreach(var extension in TimelapseExtensions)
@ -133,6 +177,9 @@ namespace Timelapse.Api
extension.OnStopRecording(); extension.OnStopRecording();
} }
} }
/// <summary>
/// Dont call this (this gets called from The UI)
/// </summary>
public static void OnStartRecording() public static void OnStartRecording()
{ {
foreach(var extension in TimelapseExtensions) foreach(var extension in TimelapseExtensions)
@ -140,6 +187,9 @@ namespace Timelapse.Api
extension.OnStartRecording(); extension.OnStartRecording();
} }
} }
/// <summary>
/// Dont call this (this gets called from The UI)
/// </summary>
public static void OnEnableOneX() public static void OnEnableOneX()
{ {
foreach(var extension in TimelapseExtensions) foreach(var extension in TimelapseExtensions)
@ -148,6 +198,9 @@ namespace Timelapse.Api
extension.OnEnableOneX(); extension.OnEnableOneX();
} }
} }
/// <summary>
/// Dont call this (this gets called from The UI)
/// </summary>
public static void OnDisableOneX() public static void OnDisableOneX()
{ {
foreach(var extension in TimelapseExtensions) foreach(var extension in TimelapseExtensions)

View File

@ -9,41 +9,158 @@ using System.Net;
namespace Timelapse.Api namespace Timelapse.Api
{ {
public class ProjectUnloadedException : Exception
{
public ProjectUnloadedException() : base("Project not Loaded")
{
}
}
public abstract class TimelapseExtension public abstract class TimelapseExtension
{ {
internal string __id; internal string __id;
internal bool _recording; internal bool _recording;
internal bool _onex; internal bool _onex;
/// <summary>
/// Recording bit
/// </summary>
/// <returns>Whether project is recording</returns>
protected bool Recording {get {return _recording;}set{if(value){StartRecording();} else{StopRecording();}}} protected bool Recording {get {return _recording;}set{if(value){StartRecording();} else{StopRecording();}}}
protected bool OneX {get {return _onex;}set{if(value) {EnableOneX();} else {DisableOneX();} }} /// <summary>
/// OneX bit
/// </summary>
/// <returns>Whether project is recording</returns>
protected bool OneX {get {return _onex;}set{if(value) {EnableOneX();} else {DisableOneX();} }}
/// <summary>
/// Called when Extension is Loaded
/// </summary>
public abstract void OnInit(); public abstract void OnInit();
/// <summary>
/// Name of Extension (retreved from Attribute)
/// </summary>
/// <value>The Name</value>
public string Name {get;internal set;} public string Name {get;internal set;}
/// <summary>
/// When a frame is taken by webcam and is about to be saved (async)
/// </summary>
/// <param name="frame">a mutable SixLabors.ImageSharp object</param>
/// <returns>Task but no data</returns>
public virtual async Task OnNewFrame(Image<Rgb24> frame) public virtual async Task OnNewFrame(Image<Rgb24> frame)
{ {
} }
/// <summary>
/// You could manipulate the project and detect project load
/// </summary>
/// <param name="project">TimelapseProject object</param>
public virtual void OnLoadProject(TimelapseProject project) public virtual void OnLoadProject(TimelapseProject project)
{ {
} }
///<summary>
///URL for in html pages /// <summary>
/// Register Razor Component
/// </summary>
/// <param name="href">the url for the razor component</param>
/// <typeparam name="T">The type</typeparam>
public void RegisterComponentAsPage<T>(string href)
{
Type typ= typeof(T);
Extensions._components.Add(GET_URL(href),typ);
}
///<summary>
///URL for in razor pages
///</summary> ///</summary>
public string GET_URL(string href) public string GET_URL(string href)
{ {
return $"/api/Extension/GetExtensionPage?extId={WebUtility.UrlEncode(__id)}&subPage={WebUtility.UrlEncode(href)}"; return $"/ExtensionPage/{WebUtility.UrlEncode(__id)}/{WebUtility.UrlEncode(href)}";
} }
/// <summary>
/// Write Object (as json)
/// </summary>
/// <param name="key">Path to file (must use forward slash '/' and can start with '/'</param>
/// <param name="project">whether you want to get project specific path</param>
/// <param name="contents">data to be writen to file</param>
public void WriteObject(string key,object contents,bool project=false)
{
WriteAllText(key,Newtonsoft.Json.JsonConvert.SerializeObject(contents),project);
}
/// <summary>
/// Read Object (as json)
/// </summary>
/// <param name="key">Path to file (must use forward slash '/' and can start with '/'</param>
/// <param name="project">whether you want to get project specific path</param>
/// <typeparam name="T">object type</typeparam>
/// <returns>object filled with data</returns>
public T ReadObject<T>(string key,bool project)
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<T>(ReadAllText(key,project));
}
/// <summary>
/// Write all text
/// </summary>
/// <param name="key">Path to file (must use forward slash '/' and can start with '/'</param>
/// <param name="project">whether you want to get project specific path</param>
/// <param name="contents">data to be writen to file</param>
public void WriteAllText(string key,string contents,bool project=false)
{
string file=GetPath(key,project);
File.WriteAllText(file,contents);
}
/// <summary>
/// Read all text
/// </summary>
/// <param name="key">Path to file (must use forward slash '/' and can start with '/'</param>
/// <param name="project">whether you want to get project specific path</param>
/// <returns>file contents</returns>
public string ReadAllText(string key,bool project=false)
{
string file=GetPath(key,project);
return File.ReadAllText(file);
}
/// <summary>
/// Get Path to data file for extension
/// </summary>
/// <param name="key">Path to file (must use forward slash '/' and can start with '/'</param>
/// <param name="project">whether you want to get project specific path</param>
/// <returns>Path to file</returns>
public string GetPath(string key,bool project=false)
{
string v = key.TrimStart('/');
if(Path.DirectorySeparatorChar == '\\')
{
v = v.Replace('/','\\');
}
if(project)
{
return Path.Combine(GetExtensionProjectData(),v);
}else{
return Path.Combine(GetExtensionData(),v);
}
}
///<summary>
/// Get Project Specific Data for extension (Directory Path)
///</summary>
/// <returns>Path</returns>
protected string GetExtensionProjectData() protected string GetExtensionProjectData()
{ {
if(!Extensions.Callbacks.ProjectLoaded()) if(!Extensions.Callbacks.ProjectLoaded())
{ {
return null; throw new ProjectUnloadedException();
} }
string p = Path.Combine(Extensions.Callbacks.GetProjectDirectoryLocation(),"ExtensionData",__id); string p = Path.Combine(Extensions.Callbacks.GetProjectDirectoryLocation(),"ExtensionData",__id);
Directory.CreateDirectory(p); Directory.CreateDirectory(p);
return p; return p;
} }
///<summary>
/// Get Data for extension (Directory Path)
///</summary>
/// <returns>Path</returns>
protected string GetExtensionData() protected string GetExtensionData()
{ {
@ -51,45 +168,69 @@ namespace Timelapse.Api
Directory.CreateDirectory(p); Directory.CreateDirectory(p);
return p; return p;
} }
/// <summary>
/// Project Loaded
/// </summary>
/// <returns>returns true if project is loaded otherwise false</returns>
public bool IsProjectLoaded() public bool IsProjectLoaded()
{ {
return Extensions.Callbacks.ProjectLoaded(); return Extensions.Callbacks.ProjectLoaded();
} }
/// <summary>
/// Triggered when timelapse starts recording
/// </summary>
public virtual void OnStartRecording() public virtual void OnStartRecording()
{ {
} }
/// <summary>
/// Triggered when timelapse stops recording
/// </summary>
public virtual void OnStopRecording() public virtual void OnStopRecording()
{ {
} }
/// <summary>
/// Call this to start recording
/// </summary>
protected void StartRecording() protected void StartRecording()
{ {
Extensions.Callbacks.StartRecording(); Extensions.Callbacks.StartRecording();
} }
/// <summary>
/// Call this to stop recording
/// </summary>
protected void StopRecording() protected void StopRecording()
{ {
Extensions.Callbacks.StopRecording(); Extensions.Callbacks.StopRecording();
} }
/// <summary>
/// Call this to Enable OneX (interval of 1)
/// </summary>
protected void EnableOneX() protected void EnableOneX()
{ {
Extensions.Callbacks.EnableOneX(); Extensions.Callbacks.EnableOneX();
} }
/// <summary>
/// Call this to Disable OneX (no longer the interval of 1)
/// </summary>
protected void DisableOneX() protected void DisableOneX()
{ {
Extensions.Callbacks.DisableOneX(); Extensions.Callbacks.DisableOneX();
} }
/// <summary>
/// Triggered when timelapse starts onex mode
/// </summary>
public virtual void OnEnableOneX() public virtual void OnEnableOneX()
{ {
} }
/// <summary>
/// Triggered when timelapse exits onex mode
/// </summary>
public virtual void OnDisableOneX() public virtual void OnDisableOneX()
{ {
} }
public virtual async Task<IActionResult> OnHandleRequest(string path)
{
return new NotFoundResult();
}
} }
} }

View File

@ -4,18 +4,40 @@ namespace Timelapse.Api
{ {
public class TimelapseProject public class TimelapseProject
{ {
/// <summary>
/// Estimated Video Length for project
/// </summary>
/// <value>Video Length of project (guess)</value>
public TimeSpan EstimatedVideoLength {get;set;} public TimeSpan EstimatedVideoLength {get;set;}
/// <summary>
/// Estimated length of project (time till complete)
/// </summary>
/// <value>Length of project (guess)</value>
public TimeSpan EstimatedProjectLength {get;set;} public TimeSpan EstimatedProjectLength {get;set;}
/// <summary>
/// Estimated or Interval
/// </summary>
/// <value>Estimated or Raw interval</value>
public bool Estimated {get;set;} public bool Estimated {get;set;}
/// <summary> /// <summary>
/// Only if Estimated is false /// Only if Estimated is false
/// </summary> /// </summary>
public TimeSpan Interval {get;set;} public TimeSpan Interval {get;set;}
/// <summary>
/// Width, Should not be changed after creation
/// </summary>
/// <value>width</value>
public int Width {get;set;} public int Width {get;set;}
/// <summary>
/// Height, Should not be changed after creation
/// </summary>
/// <value>height</value>
public int Height {get;set;} public int Height {get;set;}
// No Camera Needed /// <summary>
/// Section of project
/// </summary>
/// <value>name of section</value>
public string CurrentSection {get;set;} public string CurrentSection {get;set;}
} }

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,40 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Timelapse.Api;
using System.Text;
using System.Net.Http.Headers;
using System.Net.Http;
using System.IO;
using System.Net;
using System.Text.RegularExpressions;
using System.Drawing;
using System.Runtime.InteropServices;
namespace Timelapse.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class ExtensionController : ControllerBase
{
[HttpGet]
public async Task<IActionResult> GetExtensionPage(string extId,string subPage)
{
return await Extensions.OnGetPage(WebUtility.UrlDecode(extId),WebUtility.UrlDecode(subPage));
}
}
}

View File

@ -0,0 +1,26 @@
@page "/ExtensionPage/{Extension}/{PageName}"
@using Timelapse.Api;
@inject NavigationManager Nav;
@dynamicComponent()
@functions{
RenderFragment dynamicComponent() => builder =>
{
builder.OpenComponent(0, FindType());
builder.CloseComponent();
};
[Parameter]
public string Extension {get;set;}
[Parameter]
public string PageName {get;set;}
Type FindType()
{
string url = $"/ExtensionPage/{Extension}/{PageName}";
if(Timelapse.Api.Extensions.Components.ContainsKey(url))
{
return Timelapse.Api.Extensions.Components[url];
}
return typeof(NoneFound);
}
}

View File

@ -15,6 +15,7 @@
@if(RecentFiles == null) @if(RecentFiles == null)
{ {
<p>Loading...</p> <p>Loading...</p>
}else{ }else{
<ul style="list-style-type:none"> <ul style="list-style-type:none">

View File

@ -44,7 +44,7 @@
[JSInvokable] [JSInvokable]
public void ProcessImage(string imageString) public void ProcessImage(string imageString)
{ {
Console.WriteLine("Taken");
byte[] imageData = Convert.FromBase64String(imageString.Split(',')[1]); byte[] imageData = Convert.FromBase64String(imageString.Split(',')[1]);
Image<Rgb24> image = Image.Load<Rgb24>(imageData); Image<Rgb24> image = Image.Load<Rgb24>(imageData);
Task.Run(async ()=>{ await EPS.SendImageAsync(image);}); Task.Run(async ()=>{ await EPS.SendImageAsync(image);});
@ -104,7 +104,7 @@
if(Recording && EPS.IsProjectLoaded) if(Recording && EPS.IsProjectLoaded)
{ {
Console.WriteLine("OK");
Task.Run(async()=>{ await TakeFrameAsync();}); Task.Run(async()=>{ await TakeFrameAsync();});
frame=0; frame=0;
} }

View File

@ -0,0 +1,3 @@
<h1>
No Blazor page Found
</h1>

View File

@ -62,6 +62,7 @@ namespace Timelapse
endpoints.MapFallbackToPage("/_Host"); endpoints.MapFallbackToPage("/_Host");
}); });
Electron.Tray.Show("/Assets/desktop.png"); Electron.Tray.Show("/Assets/desktop.png");
Electron.Menu.SetApplicationMenu(new ElectronNET.API.Entities.MenuItem[]{}); Electron.Menu.SetApplicationMenu(new ElectronNET.API.Entities.MenuItem[]{});
Task.Run(async () =>{ Task.Run(async () =>{

View File

@ -16,7 +16,7 @@
<ProjectReference Include="..\Timelapse.Api\Timelapse.Api.csproj" /> <ProjectReference Include="..\Timelapse.Api\Timelapse.Api.csproj" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<PublishReadyToRun>false</PublishReadyToRun> <!--<PublishReadyToRun>false</PublishReadyToRun>-->
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Update="Assets\Stock-Person.png"> <None Update="Assets\Stock-Person.png">

6
buildLinux.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
cd Timelapse
electronize build /target custom "linux-x64;linux" /electron-arch x64
electronize build /target custom "linux-arm;linux" /electron-arch armv7l
electronize build /target custom "linux-arm64;linux" /electron-arch arm64

5
buildSimple.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
cd Timelapse
electronize build /target win /p:PublishReadyToRun=false
electronize build /target osx /p:PublishReadyToRun=false
electronize build /target linux

11
buildWin.bat Executable file
View File

@ -0,0 +1,11 @@
@echo off
cd Timelapse
electronize build /target custom "win-x86;win" /electron-arch ia32 /p:PublishReadyToRun=false
electronize build /target custom "win-x64;win" /electron-arch x64 /p:PublishReadyToRun=false
electronize build /target custom "win10-x86;win" /electron-arch ia32 /p:PublishReadyToRun=false
electronize build /target custom "win10-x64;win" /electron-arch x64 /p:PublishReadyToRun=true
electronize build /target custom "win-arm;win" /electron-arch armv7l /p:PublishReadyToRun=false
electronize build /target custom "win10-arm;win" /electron-arch armv7l /p:PublishReadyToRun=false
electronize build /target custom "win10-arm64;win" /electron-arch arm64 /p:PublishReadyToRun=false
cd ..

30
buildWin.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
cd Timelapse
electronize build /target custom "win-x86;win" /electron-arch ia32 /p:PublishReadyToRun=false
electronize build /target custom "win-x64;win" /electron-arch x64 /p:PublishReadyToRun=false
electronize build /target custom "win10-x86;win" /electron-arch ia32 /p:PublishReadyToRun=false
electronize build /target custom "win10-x64;win" /electron-arch x64 /p:PublishReadyToRun=true
electronize build /target custom "win-arm;win" /electron-arch armv7l /p:PublishReadyToRun=false
electronize build /target custom "win10-arm;win" /electron-arch armv7l /p:PublishReadyToRun=false
electronize build /target custom "win10-arm64;win" /electron-arch arm64 /p:PublishReadyToRun=false
#Usage: msi-packager <source> <output> [options]
#source Directory containing app to package
#output write output .msi to this path
#Options:
# -n, --name
# -v, --version Specify application version
# -m, --manufacturer
# -a, --arch Specify the target architecture: x86 or x64 (optional)
# -u, --upgrade-code Specify GUID to use for upgrading from other versions
# -i, --icon Specify an icon to use on shortcuts and installer
# -e, --executable Specify file to create shortcuts for
# -l, --local Install per user (no administrator rights required)
#msi-packager "bin/Desktop/win-unpacked/" "../timelapsenow_1.0.0_setup-win64.msi" --icon ../desktop.ico --executable Timelapse.exe --version 1.0.0.0 --manufacturer Tesses --upgrade-code "{ee77af57-c962-4b61-a211-d4c1f08fe30f}" --arch x64 --name TimelapseNow
#msi-packager "bin/Desktop/win-ia32-unpacked/" "../timelapsenow_1.0.0_setup-win32.msi" --icon ../desktop.ico --executable Timelapse.exe --version 1.0.0.0 --manufacturer Tesses --upgrade-code "{ee77af57-c962-4b61-a211-d4c1f08fe30f}" --arch x86 --name TimelapseNow
#msi-packager "bin/Desktop/win10-unpacked/" "../timelapsenow_1.0.0_setup-win10-64.msi" --icon ../desktop.ico --executable Timelapse.exe --version 1.0.0.0 --manufacturer Tesses --upgrade-code "{ee77af57-c962-4b61-a211-d4c1f08fe30f}" --arch x64 --name TimelapseNow
#si-packager "bin/Desktop/win10-ia32-unpacked/" "../timelapsenow_1.0.0_setup-win10-32.msi" --icon ../desktop.ico --executable Timelapse.exe --version 1.0.0.0 --manufacturer Tesses --upgrade-code "{ee77af57-c962-4b61-a211-d4c1f08fe30f}" --arch x86 --name TimelapseNow

View File

@ -1,16 +0,0 @@
#!/bin/bash
export ARCHITECTURE=amd64
cd Timelapse
electronize build /target win /p:PublishReadyToRun=false
electronize build /target osx /p:PublishReadyToRun=false
electronize build /target linux /p:PublishReadyToRun=false
rm -rf ../deb/usr/share/TimelapseNow/bin/
cp -r bin/Desktop/linux-unpacked/ ../deb/usr/share/TimelapseNow/bin/
echo "Package: timelapsenow" > ../deb/DEBIAN/control
echo "Version: 1.0" >> ../deb/DEBIAN/control
echo "Architecture: $ARCHITECTURE" >> ../deb/DEBIAN/control
echo "Maintainer: Michael Nolan <tesses50@tesses.cf>" >> ../deb/DEBIAN/control
echo "Description: Record In Steps" >> ../deb/DEBIAN/control
dpkg-deb --build --root-owner-group ../deb
mv ../deb.deb ../timelapsenow_1.0.1_$ARCHITECTURE.deb

3
createAll.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
./createLinux.sh
./createWin.sh

3
createLinux.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
./buildLinux.sh
./packageLinux.sh

3
createWin.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
./buildWin.sh
./packageWin.sh

7
deb-arch.sh Normal file
View File

@ -0,0 +1,7 @@
echo "Package: timelapsenow" > ../deb/DEBIAN/control
echo "Version: 1.0.0" >> ../deb/DEBIAN/control
echo "Architecture: $1" >> ../deb/DEBIAN/control
echo "Maintainer: Michael Nolan <tesses50@tesses.cf>" >> ../deb/DEBIAN/control
echo "Description: Record In Steps" >> ../deb/DEBIAN/control
dpkg-deb --build --root-owner-group ../deb
mv ../deb.deb ../timelapsenow_1.0.0_$1.deb

View File

@ -1,5 +1,5 @@
Package: timelapsenow Package: timelapsenow
Version: 1.0 Version: 1.0.0
Architecture: amd64 Architecture: arm64
Maintainer: Michael Nolan <tesses50@tesses.cf> Maintainer: Michael Nolan <tesses50@tesses.cf>
Description: Record In Steps Description: Record In Steps

BIN
desktop.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

11
packageLinux.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
cd Timelapse
rm -rf ../deb/usr/share/TimelapseNow/bin/
cp -r bin/Desktop/linux-unpacked/ ../deb/usr/share/TimelapseNow/bin/
bash ../deb-arch.sh amd64
rm -rf ../deb/usr/share/TimelapseNow/bin/
cp -r bin/Desktop/linux-armv7l-unpacked/ ../deb/usr/share/TimelapseNow/bin/
bash ../deb-arch.sh armhf
rm -rf ../deb/usr/share/TimelapseNow/bin/
cp -r bin/Desktop/linux-arm64-unpacked/ ../deb/usr/share/TimelapseNow/bin/
bash ../deb-arch.sh arm64

5
packageWin.sh Executable file
View File

@ -0,0 +1,5 @@
cd Timelapse/bin/Desktop/
zip -r ../../../timelapse_1.0.0_woa64.zip win-arm64-unpacked
zip -r ../../../timelapse_1.0.0_win32.zip win-ia32-unpacked
zip -r ../../../timelapse_1.0.0_win64.zip win-unpacked
cd ../../..

10
push_to_server.sh Normal file
View File

@ -0,0 +1,10 @@
scp timelapsenow_1.0.0_amd64.deb root@192.168.0.147:/var/www/deb/pool/main/
scp timelapsenow_1.0.0_arm64.deb root@192.168.0.147:/var/www/deb/pool/main/
scp timelapsenow_1.0.0_armhf.deb root@192.168.0.147:/var/www/deb/pool/main/
scp timelapse_1.0.0_win32.zip root@192.168.0.147:/var/www/downloads_page/apps/timelapse_now/
scp timelapse_1.0.0_win64.zip root@192.168.0.147:/var/www/downloads_page/apps/timelapse_now/
scp timelapse_1.0.0_woa64.zip root@192.168.0.147:/var/www/downloads_page/apps/timelapse_now/
zip timelapse_1.0.0_mirrorable.zip MIRRING.txt timelapsenow_1.0.0_amd64.deb timelapsenow_1.0.0_arm64.deb timelapsenow_1.0.0_armhf.deb timelapse_1.0.0_win32.zip timelapse_1.0.0_win64.zip timelapse_1.0.0_woa64.zip
scp timelapse_1.0.0_mirrorable.zip root@192.168.0.147:/var/www/downloads_page/apps/timelapse_now/
ssh root@192.168.0.147 deb-update