Skip to content

Commit

Permalink
Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Slauta committed Apr 12, 2017
1 parent 3795653 commit 5282588
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,6 @@ ModelManifest.xml

# FAKE - F# Make
.fake/

# FAKE - F# Make
.idea
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Ahmed Zain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
47 changes: 44 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,54 @@
# Crutch

Updater.exe для автобновления файлов в папкох.
Updater.exe для автообновления файлов под Windows

Технологии:
1. c#
2. Visual Studio 2015

#### Установка

1. Установите `Visual Studio 2015`
2. Склонируйте репозиторий
3. Откройте решение из папки `Crutch`
4. Соберите решение

#### Запуск

Вызов программы `updater.exe {from_file_path} {to_file_path} {after_copy_launth_exe_file_path} {timeout_miliseconds}`

---

## Пример использования

#### Обновления app.asar Electron приложений

Идея была взята на основе [electron-basic-updater](https://github.com/TamkeenLMS/electron-basic-updater)
Но существет проблема при обновлении под Windows. Эти файлы заняты процессом, и их нельзя заменить.
Для такого и был придуман Crutch (electron windows basic updater).

Идея заключается в обновлении не всей программы на electron, а только asar файлов,
в которых собственно и заложена вся логика приложения. таким образом можно
сократить размер обновление с 50-100мб до 5-10мб.

### Пример использования для обновления app.asar electron приложений

const electron = require('electron');
const app = electron.app;
const os = require('os').platform();
const spawn = require('child_process').spawn;
if (os == 'win32') {
const updateProcess = spawn('update.exe', ['upadate\app.asar', 'resources\app.asar', 'electron.exe', 5000]);
app.quit();
}
#### nodejs

const spawn = require('child_process').spawn;

const updateProcess = spawn('update.exe', ['upadate\app.asar', 'resources\app.asar']);
---
update.exe upadate\app.asar resources\app.asar electron.exe 5000
The MIT License (MIT) - Copyright (c) 2017 nok3250 [email protected]

0 comments on commit 5282588

Please sign in to comment.