-
Notifications
You must be signed in to change notification settings - Fork 35
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
31 changed files
with
732 additions
and
58 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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
build/* | ||
|
||
bin/* | ||
bin/gitsync/* | ||
tests/*.xml | ||
|
||
exec/*.log | ||
|
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
Binary file not shown.
Binary file not shown.
Empty file.
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
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
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
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
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
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
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
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
34 changes: 34 additions & 0 deletions
34
src/Классы/internal/bindata/Классы/cTool_1CD_gitsync_plugins.os
Large diffs are not rendered by default.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
src/Классы/internal/bindata/Классы/v8unpack_gitsync_plugins.os
Large diffs are not rendered by default.
Oops, something went wrong.
79 changes: 79 additions & 0 deletions
79
src/Классы/internal/bindata/Классы/ЗагрузчикЗапакованныхФайловGitsyncPlugins.os
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,79 @@ | ||
#Область ПрограммныйИнтерфейс | ||
|
||
Функция ПолучитьПутьКФайлу(Знач ИмяФайла) Экспорт | ||
|
||
МенеджерЗапакованныхФайлов = Новый МенеджерЗапакованныхФайловGitsyncPlugins; | ||
ИндексФайлов = МенеджерЗапакованныхФайлов.ПолучитьИндексФайлов(); | ||
|
||
ИмяКлассаФайла = ИндексФайлов[ИмяФайла]; | ||
|
||
Если ИмяКлассаФайла = Неопределено Тогда | ||
ВызватьИсключение СтрШаблон("Не удалось найти двоичные данные для файла <%1>", ИмяФайла); | ||
КонецЕсли; | ||
|
||
КлассФайла = Новый (ИмяКлассаФайла); | ||
|
||
ПутьКФайлу = ""; | ||
|
||
НайтиФайлИлиРаспаковать(КлассФайла, ПутьКФайлу); | ||
|
||
Возврат ПутьКФайлу; | ||
|
||
КонецФункции | ||
|
||
#КонецОбласти | ||
|
||
#Область Упакованные_файлы | ||
|
||
Процедура РаспаковатьДанные(Знач ПутьКФайлу, КлассФайла) | ||
|
||
ДвоичныеДанные = Base64Значение(КлассФайла.ДвоичныеДанные()); | ||
|
||
ОбеспечитьКаталог(ПутьКФайлу); | ||
|
||
ДвоичныеДанные.Записать(ПутьКФайлу); | ||
|
||
КонецПроцедуры | ||
|
||
Функция ВычислитьХешФайла(Знач ПутьКФайлу) | ||
|
||
ХешФайла = Новый ХешированиеДанных(ХешФункция.MD5); | ||
ХешФайла.ДобавитьФайл(ПутьКФайлу); | ||
|
||
Возврат ХешФайла.ХешСуммаСтрокой; | ||
|
||
КонецФункции | ||
|
||
Процедура НайтиФайлИлиРаспаковать(КлассФайла, ПутьКФайлу) | ||
|
||
ИмяФайла = КлассФайла.ИмяФайла(); | ||
|
||
ПутьКФайлу = ПолучитьПутьКВременномуФайлу(ИмяФайла); | ||
|
||
ВременныйФайл = Новый Файл(ПутьКФайлу); | ||
|
||
Если Не ВременныйФайл.Существует() | ||
Тогда// ИЛИ Не ВычислитьХешФайла(ПутьКФайлу) = ДанныеDll.Хеш() Тогда | ||
РаспаковатьДанные(ПутьКФайлу, КлассФайла); | ||
КонецЕсли; | ||
|
||
КонецПроцедуры | ||
|
||
Функция ПолучитьПутьКВременномуФайлу(Знач ИмяФайла) | ||
ПутьКФайлу = ОбъединитьПути(КаталогВременныхФайлов(), ".gitsync-plugins", ИмяФайла); | ||
Возврат ПутьКФайлу; | ||
КонецФункции | ||
|
||
Процедура ОбеспечитьКаталог(ПутьККаталогу) | ||
|
||
ВременныйКаталог = Новый Файл(ПутьККаталогу); | ||
|
||
Если ВременныйКаталог.Существует() Тогда | ||
Возврат; | ||
КонецЕсли; | ||
|
||
СоздатьКаталог(ВременныйКаталог.Путь); | ||
|
||
КонецПроцедуры | ||
|
||
#КонецОбласти |
9 changes: 9 additions & 0 deletions
9
src/Классы/internal/bindata/Классы/МенеджерЗапакованныхФайловGitsyncPlugins.os
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,9 @@ | ||
Функция ПолучитьИндексФайлов() Экспорт | ||
|
||
ИндексФайлов = Новый Соответствие; | ||
ИндексФайлов.Вставить("v8unpack.dll", "v8unpack_gitsync_plugins"); | ||
ИндексФайлов.Вставить("cTool_1CD.exe", "cTool_1CD_gitsync_plugins"); | ||
|
||
Возврат ИндексФайлов; | ||
|
||
КонецФункции |
Oops, something went wrong.