Skip to content

Commit 104647d

Browse files
loutskiyloutskiy
authored andcommitted
rename HelloWorld, notify, check gpg
1 parent 0120378 commit 104647d

62 files changed

Lines changed: 386 additions & 64 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Installer.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
A716D12520FCA68D001998D7 /* Loader.swift in Sources */ = {isa = PBXBuildFile; fileRef = A716D12420FCA68D001998D7 /* Loader.swift */; };
1818
A757F2B3210092F60049AE99 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A757F2B2210092F60049AE99 /* Array+Extension.swift */; };
1919
A757F2B92100B3B10049AE99 /* key.asc in Resources */ = {isa = PBXBuildFile; fileRef = A757F2B82100B3B10049AE99 /* key.asc */; };
20-
A757F2BB2100C1420049AE99 /* fileS.sig in Resources */ = {isa = PBXBuildFile; fileRef = A757F2BA2100C1420049AE99 /* fileS.sig */; };
2120
A757F2BE2100D6350049AE99 /* VerifySigning.m in Sources */ = {isa = PBXBuildFile; fileRef = A757F2BD2100D6350049AE99 /* VerifySigning.m */; };
2221
A757F2C021022D0E0049AE99 /* License.html in Resources */ = {isa = PBXBuildFile; fileRef = A757F2BF21022D0D0049AE99 /* License.html */; };
2322
A7AE17DA2105EADA0086343D /* Script.sh in Resources */ = {isa = PBXBuildFile; fileRef = A7AE17D92105EADA0086343D /* Script.sh */; };
@@ -44,7 +43,6 @@
4443
A757F2B2210092F60049AE99 /* Array+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+Extension.swift"; sourceTree = "<group>"; };
4544
A757F2B42100A4C70049AE99 /* Installer-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Installer-Bridging-Header.h"; sourceTree = "<group>"; };
4645
A757F2B82100B3B10049AE99 /* key.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = key.asc; sourceTree = "<group>"; };
47-
A757F2BA2100C1420049AE99 /* fileS.sig */ = {isa = PBXFileReference; lastKnownFileType = text; path = fileS.sig; sourceTree = "<group>"; };
4846
A757F2BC2100D6340049AE99 /* VerifySigning.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VerifySigning.h; sourceTree = "<group>"; };
4947
A757F2BD2100D6350049AE99 /* VerifySigning.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VerifySigning.m; sourceTree = "<group>"; };
5048
A757F2BF21022D0D0049AE99 /* License.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = License.html; sourceTree = "<group>"; };
@@ -121,7 +119,6 @@
121119
A757F2BF21022D0D0049AE99 /* License.html */,
122120
A716D10E20FC9E8F001998D7 /* config.json */,
123121
A757F2B82100B3B10049AE99 /* key.asc */,
124-
A757F2BA2100C1420049AE99 /* fileS.sig */,
125122
A7DE66B520F8D25400746EE0 /* Assets.xcassets */,
126123
A7DE66B720F8D25400746EE0 /* Main.storyboard */,
127124
A7DE66BA20F8D25400746EE0 /* Info.plist */,
@@ -213,7 +210,6 @@
213210
A757F2C021022D0E0049AE99 /* License.html in Resources */,
214211
A7DE66B620F8D25400746EE0 /* Assets.xcassets in Resources */,
215212
A716D10F20FC9E8F001998D7 /* config.json in Resources */,
216-
A757F2BB2100C1420049AE99 /* fileS.sig in Resources */,
217213
A7DE66B920F8D25400746EE0 /* Main.storyboard in Resources */,
218214
A757F2B92100B3B10049AE99 /* key.asc in Resources */,
219215
A7AE17DA2105EADA0086343D /* Script.sh in Resources */,

Installer/Base.lproj/Main.storyboard

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@
5353
</menuItem>
5454
</items>
5555
</menu>
56-
<connections>
57-
<binding destination="lxa-J1-8Ch" name="font" keyPath="values" id="OVL-Dg-fe5"/>
58-
</connections>
5956
</menuItem>
6057
<menuItem title="Edit" id="5QF-Oa-p0T">
6158
<modifierMask key="keyEquivalentModifierMask"/>

Installer/ProgressVC.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class ProgressVC: NSViewController {
143143
self.statusLabel.stringValue = "Проверка подписи"
144144
}
145145
let bundle = Bundle.main
146-
let path = bundle.path(forResource: "key", ofType: "asc")
146+
let path = bundle.path(forResource: Loader.shared.config.gpgKey, ofType: nil)
147147
let key = try! ObjectivePGP.readKeys(fromPath: path!)
148148
print(key)
149149

@@ -160,6 +160,8 @@ class ProgressVC: NSViewController {
160160
if (isVerify) {
161161
self.copyAppToApplication()
162162
} else {
163+
self.deleteFileAtPath(files.path)
164+
self.deleteFileAtPath(fileURL.path)
163165
self.errorReadingResults(question: "Ошибка", text: "Ошибка в проверке подписи")
164166
}
165167
case .failure(let error):
@@ -192,8 +194,10 @@ class ProgressVC: NSViewController {
192194
print(enumerator)
193195
let filePaths = enumerator?.allObjects as! [String]
194196
let appFilePaths = filePaths.filter{$0.contains(kEXTENSION)}
197+
var isContainsApps = false
195198
for appFilePath in appFilePaths{
196199
if String(appFilePath.suffix(4)) == kEXTENSION {
200+
isContainsApps = true
197201
var fullNameArr = appFilePath.components(separatedBy: "/")
198202
let appFilePathNew = fullNameArr[fullNameArr.count-1]
199203
NameStorage.shared.data.append(appFilePathNew)
@@ -218,6 +222,9 @@ class ProgressVC: NSViewController {
218222
print(destURL)
219223
}
220224
}
225+
if !isContainsApps {
226+
self.errorReadingResults(question: "Ошибка", text: "Архив не содержит приложений")
227+
}
221228
self.changeProgress(withText: "Копирование завершено", toProgress: 20)
222229

223230
}

Installer/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"description": {"en": "Array.io is the best software created by human ever"},
88
"licenseFile": {"en": "License.html"},
99
"script": "postinstall.js",
10-
"gpgKey": "./array.gpg",
10+
"gpgKey": "key.asc",
1111
"downloadLinks": ["https://github.com/arrayio/macos-installer/releases/download/v0.1/hello_world.tar.gz"]
1212
}

Installer/fileS.sig

Lines changed: 0 additions & 14 deletions
This file was deleted.
172 KB
Binary file not shown.
5.88 MB
Binary file not shown.
103 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)