Skip to content

Commit

Permalink
iOS stuff that might help with #28
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyettinger committed Sep 22, 2020
1 parent 1c6af5c commit de454da
Show file tree
Hide file tree
Showing 79 changed files with 271 additions and 58 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
}
}

version = "1.9.11.2"
version = "1.9.11.3-SNAPSHOT"
mainClassName = 'com.github.czyzby.setup.MainKt'

jar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ abstract class GradleFile private constructor(override val path: String) : Proje
else dependencies.joinToString(prefix = "$tab$type ", separator = "\n$tab$type ", postfix = "\n")

/**
* @param dependency will be added as "compile" dependency, quoted.
* @param dependency will be added as an "implementation" or "api" dependency, quoted.
*/
fun addDependency(dependency: String) = dependencies.add("\"$dependency\"")

Expand Down
39 changes: 38 additions & 1 deletion src/main/kotlin/com/github/czyzby/setup/data/platforms/iOS.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class iOS : Platform {
// Including RoboVM config files:
project.files.add(CopiedFile(projectName = ID, path = "Info.plist.xml",
original = path("generator", "ios", "Info.plist.xml")))
project.files.add(SourceFile(projectName = ID, fileName = "robovm.properties", content = """app.version=${project.advanced.version}
project.files.add(SourceFile(projectName = ID, fileName = "robovm.properties", content = """app.version=${project.advanced.version.replace("[^0-9\\.]", "")}
app.id=${project.basic.rootPackage}
app.mainclass=${project.basic.rootPackage}.ios.IOSLauncher
app.executable=IOSLauncher
Expand Down Expand Up @@ -89,6 +89,43 @@ app.name=${project.basic.name}"""))
project.files.add(CopiedFile(projectName = ID, path = path("data", it),
original = path("generator", "ios", "data", it)))
}
project.files.add(CopiedFile(projectName = ID, path = path("data", "Media.xcassets", "Contents.json"),
original = path("generator", "ios", "data", "Media.xcassets")))
arrayOf(
"app-store-icon-1024@1x.png",
"Contents.json",
"ipad-app-icon-76@1x.png",
"ipad-app-icon-76@2x.png",
"ipad-notifications-icon-20@1x.png",
"ipad-notifications-icon-20@2x.png",
"ipad-pro-app-icon-83.5@2x.png",
"ipad-settings-icon-29@1x.png",
"ipad-settings-icon-29@2x.png",
"ipad-spotlight-icon-40@1x.png",
"ipad-spotlight-icon-40@2x.png",
"iphone-app-icon-60@2x.png",
"iphone-app-icon-60@3x.png",
"iphone-notification-icon-20@2x.png",
"iphone-notification-icon-20@3x.png",
"iphone-spotlight-icon-40@2x.png",
"iphone-spotlight-icon-40@3x.png",
"iphone-spotlight-settings-icon-29@2x.png",
"iphone-spotlight-settings-icon-29@3x.png"
).forEach {
project.files.add(CopiedFile(projectName = ID, path = path("data", "Media.xcassets", "AppIcon.appiconset", it),
original = path("generator", "ios", "data", "Media.xcassets", "AppIcon.appiconset", it)))
}
arrayOf(
"Contents.json",
"libgdx@1x.png",
"libgdx@2x.png",
"libgdx@3x.png"
).forEach {
project.files.add(CopiedFile(projectName = ID, path = path("data", "Media.xcassets", "Logo.imageset", it),
original = path("generator", "ios", "data", "Media.xcassets", "Logo.imageset", it)))
}
project.files.add(CopiedFile(projectName = ID, path = path("data", "Base.lproj", "LaunchScreen.storyboard"),
original = path("generator", "ios", "data", "Base.lproj")))

// Including reflected classes:
if (project.reflectedClasses.isNotEmpty() || project.reflectedPackages.isNotEmpty()) {
Expand Down
105 changes: 50 additions & 55 deletions src/main/resources/generator/ios/Info.plist.xml
Original file line number Diff line number Diff line change
@@ -1,59 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${app.name}</string>
<key>CFBundleExecutable</key>
<string>${app.executable}</string>
<key>CFBundleIdentifier</key>
<string>${app.id}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${app.name}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${app.version}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${app.build}</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarHidden</key>
<true/>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
<string>opengles-2</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon</string>
<string>Icon-72</string>
</array>
</dict>
</dict>
</dict>
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${app.name}</string>
<key>CFBundleExecutable</key>
<string>${app.executable}</string>
<key>CFBundleIdentifier</key>
<string>${app.id}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${app.name}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${app.version}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${app.build}</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarHidden</key>
<true/>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>opengles-2</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleIconName</key>
<string>AppIcon</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="Logo" translatesAutoresizingMaskIntoConstraints="NO" id="hN2-E0-Tu8">
<rect key="frame" x="120" y="402" width="172" height="93"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="52.173913043478265" y="375"/>
</scene>
</scenes>
<resources>
<image name="Logo" width="243" height="41"/>
</resources>
</document>
Binary file modified src/main/resources/generator/ios/data/Icon-72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/generator/ios/data/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/generator/ios/data/Icon@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "iphone-notification-icon-20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "iphone-notification-icon-20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "iphone-spotlight-settings-icon-29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "iphone-spotlight-settings-icon-29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "iphone-spotlight-icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "iphone-spotlight-icon-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "iphone-app-icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "iphone-app-icon-60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "ipad-notifications-icon-20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "ipad-notifications-icon-20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "ipad-settings-icon-29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "ipad-settings-icon-29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "ipad-spotlight-icon-40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "ipad-spotlight-icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "ipad-app-icon-76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "ipad-app-icon-76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "ipad-pro-app-icon-83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "app-store-icon-1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "libgdx@1x.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "libgdx@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "libgdx@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/generator/raw/ui/button-normal-over.9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/generator/raw/ui/button-normal-over.png
Binary file modified src/main/resources/generator/raw/ui/button-normal-pressed.9.png
Binary file modified src/main/resources/generator/raw/ui/button-normal-pressed.png
Binary file modified src/main/resources/generator/raw/ui/button-normal.9.png
Binary file modified src/main/resources/generator/raw/ui/checkbox-over.png
Binary file modified src/main/resources/generator/raw/ui/dot.png
Binary file modified src/main/resources/generator/raw/ui/font-list.png
Binary file modified src/main/resources/generator/raw/ui/font-subtitle.png
Binary file modified src/main/resources/generator/raw/ui/font-window.png
Binary file modified src/main/resources/generator/raw/ui/font.png
Binary file modified src/main/resources/generator/raw/ui/knob-h.png
Binary file modified src/main/resources/generator/raw/ui/line-h.png
Binary file modified src/main/resources/generator/raw/ui/progress-bar-square.9.png
Binary file modified src/main/resources/generator/raw/ui/progress-bar-square.png
Binary file modified src/main/resources/generator/raw/ui/radio-over.png
Binary file modified src/main/resources/generator/raw/ui/radio-selected.png
Binary file modified src/main/resources/generator/raw/ui/radio.png
Binary file modified src/main/resources/generator/raw/ui/select-box-open.9.png
Binary file modified src/main/resources/generator/raw/ui/select-box-open.png
Binary file modified src/main/resources/generator/raw/ui/select-box.9.png
Binary file modified src/main/resources/generator/raw/ui/select-box.png
Binary file modified src/main/resources/generator/raw/ui/selection.9.png
Binary file modified src/main/resources/generator/raw/ui/slider-knob-over.png
Binary file modified src/main/resources/generator/raw/ui/slider.png
Binary file modified src/main/resources/generator/raw/ui/spinner-down-over.png
Binary file modified src/main/resources/generator/raw/ui/spinner-down-pressed.png
Binary file modified src/main/resources/generator/raw/ui/spinner-down.png
Binary file modified src/main/resources/generator/raw/ui/spinner-textfield.9.png
Binary file modified src/main/resources/generator/raw/ui/spinner-textfield.png
Binary file modified src/main/resources/generator/raw/ui/spinner-up-over.png
Binary file modified src/main/resources/generator/raw/ui/spinner-up-pressed.png
Binary file modified src/main/resources/generator/raw/ui/spinner-up.png
Binary file modified src/main/resources/generator/raw/ui/square.png
Binary file modified src/main/resources/generator/raw/ui/textfield-selected.9.png
Binary file modified src/main/resources/generator/raw/ui/textfield-selected.png
Binary file modified src/main/resources/generator/raw/ui/textfield.9.png
Binary file modified src/main/resources/generator/raw/ui/textfield.png
Binary file modified src/main/resources/generator/raw/ui/white.png
Binary file modified src/main/resources/generator/raw/ui/window.9.png
Binary file modified src/main/resources/generator/raw/ui/window.png
Binary file modified src/main/resources/icons/libgdx128.png
Binary file modified src/main/resources/icons/libgdx64.png
Binary file modified src/main/resources/skin/tinted.png

0 comments on commit de454da

Please sign in to comment.