Skip to content

Commit 0120378

Browse files
authored
Merge pull request #1 from arrayio/installer
Installer
2 parents 1cdbabb + 25f3070 commit 0120378

295 files changed

Lines changed: 23494 additions & 0 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.

.DS_Store

6 KB
Binary file not shown.

.gitignore

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Xcode
2+
#
3+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4+
5+
## Build generated
6+
build/
7+
DerivedData/
8+
9+
## Various settings
10+
*.pbxuser
11+
!default.pbxuser
12+
*.mode1v3
13+
!default.mode1v3
14+
*.mode2v3
15+
!default.mode2v3
16+
*.perspectivev3
17+
!default.perspectivev3
18+
xcuserdata/
19+
20+
## Other
21+
*.moved-aside
22+
*.xccheckout
23+
*.xcscmblueprint
24+
25+
## Obj-C/Swift specific
26+
*.hmap
27+
*.ipa
28+
*.dSYM.zip
29+
*.dSYM
30+
31+
## Playgrounds
32+
timeline.xctimeline
33+
playground.xcworkspace
34+
35+
# Swift Package Manager
36+
#
37+
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
38+
# Packages/
39+
# Package.pins
40+
# Package.resolved
41+
.build/
42+
43+
# CocoaPods
44+
#
45+
# We recommend against adding the Pods directory to your .gitignore. However
46+
# you should judge for yourself, the pros and cons are mentioned at:
47+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
48+
#
49+
Pods/
50+
#
51+
# Add this line if you want to avoid checking in source code from the Xcode workspace
52+
*.xcworkspace
53+
54+
# Carthage
55+
#
56+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
57+
# Carthage/Checkouts
58+
59+
Carthage/Build
60+
61+
# fastlane
62+
#
63+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
64+
# screenshots whenever they are needed.
65+
# For more information about the recommended setup visit:
66+
# https://docs.fastlane.tools/best-practices/source-control/#source-control
67+
68+
fastlane/report.xml
69+
fastlane/Preview.html
70+
fastlane/screenshots/**/*.png
71+
fastlane/test_output

Installer.xcodeproj/project.pbxproj

Lines changed: 492 additions & 0 deletions
Large diffs are not rendered by default.

Installer.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Installer.xcworkspace/contents.xcworkspacedata

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Installer/AppDelegate.swift

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//
2+
// AppDelegate.swift
3+
// Installer
4+
//
5+
// Created by Mikhail Lutskiy on 13.07.2018.
6+
// Copyright © 2018 Mikhail Lutskii. All rights reserved.
7+
//
8+
9+
import Cocoa
10+
11+
let loader = Loader.shared
12+
13+
@NSApplicationMain
14+
class AppDelegate: NSObject, NSApplicationDelegate {
15+
16+
func applicationDidFinishLaunching(_ aNotification: Notification) {
17+
loader.loadConfig()
18+
let langStr = Locale.current.languageCode
19+
print(langStr)
20+
let langAnother = Locale.preferredLanguages[0]
21+
print(langAnother)
22+
}
23+
24+
func applicationWillTerminate(_ aNotification: Notification) {
25+
// Insert code here to tear down your application
26+
}
27+
28+
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
29+
NSApplication.shared.terminate(self)
30+
return true
31+
}
32+
33+
34+
}
35+

Installer/Array+Extension.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// Array+Extension.swift
3+
// Installer
4+
//
5+
// Created by Mikhail Lutskiy on 19.07.2018.
6+
// Copyright © 2018 Mikhail Lutskii. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
extension Array {
12+
func randomItem() -> Element? {
13+
if isEmpty { return nil }
14+
let index = Int(arc4random_uniform(UInt32(self.count)))
15+
return self[index]
16+
}
17+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "mac",
5+
"size" : "16x16",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "mac",
10+
"size" : "16x16",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "mac",
15+
"size" : "32x32",
16+
"scale" : "1x"
17+
},
18+
{
19+
"idiom" : "mac",
20+
"size" : "32x32",
21+
"scale" : "2x"
22+
},
23+
{
24+
"idiom" : "mac",
25+
"size" : "128x128",
26+
"scale" : "1x"
27+
},
28+
{
29+
"idiom" : "mac",
30+
"size" : "128x128",
31+
"scale" : "2x"
32+
},
33+
{
34+
"idiom" : "mac",
35+
"size" : "256x256",
36+
"scale" : "1x"
37+
},
38+
{
39+
"idiom" : "mac",
40+
"size" : "256x256",
41+
"scale" : "2x"
42+
},
43+
{
44+
"idiom" : "mac",
45+
"size" : "512x512",
46+
"scale" : "1x"
47+
},
48+
{
49+
"idiom" : "mac",
50+
"size" : "512x512",
51+
"scale" : "2x"
52+
}
53+
],
54+
"info" : {
55+
"version" : 1,
56+
"author" : "xcode"
57+
}
58+
}

0 commit comments

Comments
 (0)