Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored info plist handling, added missing license headers and usi…
…ng correct min os version for actool.
- Loading branch information
1 parent
6fa6b27
commit f2a1a97
Showing
6 changed files
with
154 additions
and
32 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
15 changes: 15 additions & 0 deletions
15
compiler/src/main/java/org/robovm/compiler/config/tools/TextureAtlas.java
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
15 changes: 15 additions & 0 deletions
15
compiler/src/main/java/org/robovm/compiler/config/tools/Tools.java
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
77 changes: 77 additions & 0 deletions
77
compiler/src/main/java/org/robovm/compiler/target/ios/InfoPList.java
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,77 @@ | ||
/* | ||
* Copyright (C) 2013-2015 Trillian Mobile AB | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.robovm.compiler.target.ios; | ||
|
||
import java.io.File; | ||
import java.util.Properties; | ||
|
||
import com.dd.plist.NSDictionary; | ||
import com.dd.plist.NSObject; | ||
|
||
public class InfoPList { | ||
private File file; | ||
private NSDictionary dictionary; | ||
|
||
public InfoPList(File file) { | ||
this.file = file; | ||
} | ||
|
||
public void parse(Properties props) { | ||
try { | ||
this.dictionary = (NSDictionary) IOSTarget.parsePropertyList(file, props); | ||
} catch (Throwable t) { | ||
throw new IllegalArgumentException("Failed to parse Info.plist XML file: " + file, t); | ||
} | ||
} | ||
|
||
public String getBundleIdentifier() { | ||
if (dictionary != null) { | ||
NSObject object = dictionary.objectForKey("CFBundleIdentifier"); | ||
if (object != null) { | ||
return object.toString(); | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
public String getBundleExecutable() { | ||
if (dictionary != null) { | ||
NSObject object = dictionary.objectForKey("CFBundleExecutable"); | ||
if (object != null) { | ||
return object.toString(); | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
public String getMinimumOSVersion() { | ||
if (dictionary != null) { | ||
NSObject object = dictionary.objectForKey("MinimumOSVersion"); | ||
if (object != null) { | ||
return object.toString(); | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
public File getFile() { | ||
return file; | ||
} | ||
|
||
public NSDictionary getDictionary() { | ||
return dictionary; | ||
} | ||
} |
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