-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
68 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -240,3 +240,6 @@ ModelManifest.xml | |
|
||
# FAKE - F# Make | ||
.fake/ | ||
|
||
# FAKE - F# Make | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |