Mercurial > dwindows
annotate mobile.txt @ 2739:02c53dd5e21d
iOS: I used to save the user data on the DWView subview of a DWWindow...
Not sure what my thinking on that was, but sometimes it isn't possible to
get the DWView from the subviews... so make it so DWWindow can store
userdata as well in those cases. May want to just remove the code to save
the data on the DWView altogether, but will have to evaluate why I did that
in the first place.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 18 Dec 2021 19:31:57 +0000 |
parents | dd0b29320a3d |
children | d15517b49638 |
rev | line source |
---|---|
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1 How to create a Dynamic Windows project for iOS in Xcode and Android in Android Studio. |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
2 |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
3 |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
4 Xcode |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
5 |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
6 === Dynamic Windows Project Creation === |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
7 1. File -> New -> Project... |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
8 2. Select "iOS" then "App" then click "Next" |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
9 3. Fill in the following: |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
10 "Product Name" with "Dynamic Windows iOS" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
11 "Team" select the appropriate team for this project. |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
12 "Organization Identifier" with "org.dbsoft" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
13 "Interface" select "Storyboard" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
14 "Language" select "Objective-C" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
15 Uncheck "Include Tests" and click "Next" |
2673
a39e2ea6fa14
iOS: Only add the "Back" button to the Navigation Bar if the window has the
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2672
diff
changeset
|
16 4. Choose a location for the project, "Don't add to any project or workspace" |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
17 5. Rename the "Dynamic Windows iOS" target to "dwtest" and remove the following files: |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
18 *.m, *.h, *.storyboard and Assets.xcassets |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
19 6. Select "dwtest" folder and File -> Add Files to "Dynamic Windows iOS"... |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
20 Select "dwtest.c" from the file dialog with "Copy items if needed" unchecked. |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
21 "Add to targets" should have "dwtest" checked. |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
22 7. Highlight the project "Dynamic Windows iOS" in the top left then select the target "dwtest" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
23 Edit "Bundle Identifier" to be "org.dbsoft.dwindows.dwtest" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
24 8. Click the target dropdown and click "Add Target" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
25 Select "Framework" and click "Next" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
26 "Product name" with "dwindows" uncheck "Include Tests" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
27 9. Delete the created "dwindows.h" and "Move to Trash" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
28 10. Select "dwindows" folder and File -> Add Files to "Dynamic Windows iOS"... |
2674
dd0b29320a3d
iOS: Use the claimed default value for the navigation bar of 44 points.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2673
diff
changeset
|
29 Add "dw.h" and "ios/dw.m" with "Copy items if needed" unchecked. |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
30 11. Repeat steps 8 through 10 with "dwcompat" adding the dwcompat.c and dwcompat.h files. |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
31 12. Highlight the project "Dynamic Windows iOS" in the top left then select the main project. |
2674
dd0b29320a3d
iOS: Use the claimed default value for the navigation bar of 44 points.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2673
diff
changeset
|
32 Click "Build Settings" for the entire project and find "Apple Clang - Preprocessing" |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
33 Double click "Preprocessor Macros" and add "__IOS__" to the list for release and debug. |
2674
dd0b29320a3d
iOS: Use the claimed default value for the navigation bar of 44 points.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2673
diff
changeset
|
34 13. Set "Objective-C Automatic Reference Counting" to "No" in "Language - Objective-C" |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
35 14. Edit the "Info.plist" in "dwtest" and remove all the settings below "Bundle version" |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
36 This is required because Dynamic Windows does not use storyboards. |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
37 If necessary edit the "dwtest" "Build Settings" and correct the path to "dwtest/Info.plist" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
38 15. Highlight the project "Dynamic Windows iOS" in the top left then File -> New -> Group |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
39 Name the new group "Resources" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
40 Copy "mac/file.png" "mac/folder.png" and "image/test.png" into "Resources" |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
41 |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
42 === Project Creation === |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
43 1. File -> New -> Project... |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
44 2. Select "iOS" then "App" then click "Next" |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
45 3. Fill in the following: |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
46 "Product Name" with your application name. |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
47 "Team" select the appropriate team for this project. |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
48 "Organization Identifier" with your identifier |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
49 "Interface" select "Storyboard" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
50 "Language" select "Objective-C" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
51 Uncheck "Include Tests" and click "Next" |
2673
a39e2ea6fa14
iOS: Only add the "Back" button to the Navigation Bar if the window has the
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2672
diff
changeset
|
52 4. Choose a location for the project, "Don't add to any project or workspace" |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
53 5. Make sure you close the "Dynamic Windows iOS" main project before step 6. |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
54 6. Select the project in the top left and File -> Add Files to "Project Name"... |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
55 Find the "Dynamic Windows iOS" project and add it to the application project. |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
56 7. Select the Project folder and File -> Add Files to "Project Name"... |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
57 Add your source files with "Copy items if needed" unchecked. |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
58 8. Edit the "Info.plist" in the Project and remove all the settings below "Bundle version" |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
59 This is required because Dynamic Windows does not use storyboards. |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
60 9. Highlight the Project Name in the top left then File -> New -> Group |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
61 Name the new group "Resources" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
62 10. Place any application resource images in the form "#.png" where # is the resource ID. |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
63 Any other application files placed here will be accessible via dw_app_dir() at runtime. |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
64 11. Open Assets.xcassets and drag the appropriate icons into the bottom sections. |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
65 12. Select the project in the top left and select the application target from the drop down list. |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
66 Under "General" find "Frameworks, Libraries and Embedded Content" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
67 Add "dwindows.framework" from the "Dynamic Windows iOS" project. |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
68 If necessary add "dwcompat.framework" from the Dynamic Windows iOS" project. |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
69 13. Highlight the project name in the top left then select the main project. |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
70 Click "Info" and set the "iOS Deployment Target" to "13.0" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
71 14. Click "Build Settings" for the entire project and find "Search Paths" and add the path to |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
72 dw.h in "Header Search Paths" for Release and Debug (Any Architecture | Any SDK) |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
73 15. Also under "Build Settings" find "Apple Clang – Preprocessing" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
74 Double click "Preprocessor Macros" and add "__IOS__" to the list for release and debug. |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
75 |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
76 |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
77 Android Studio |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
78 |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
79 === Project Creation === |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
80 1. File -> New -> New Project |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
81 2. Select "Phone and Tablet" then "Native C++" and click "Next" |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
82 3. Fill in the following: |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
83 "Name" with your own application name |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
84 "Package name" with "org.dbsoft.dwindows" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
85 "Save location" can be the default |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
86 "Language" select "Kotlin" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
87 "Minimum SDK" select "API 23: Android 6.0 (Marshmallow)" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
88 click "Next" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
89 4. Select "Toolchain Default" and click "Finish" |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
90 |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
91 === Source File Installation === |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
92 5. Install "android/DWindows.kt" into "app/src/main/java/org/dbsoft/dwindows" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
93 Remove "MainActivity.kt" from app/src/main/java/org/dbsoft/dwindows" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
94 6. Install "dw.h" and "android/dw.cpp" into "app/src/main/cpp" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
95 Remove "native-lib.cpp" from "app/src/main/cpp" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
96 7. Optionally install "dwcompat.h" and "dwcompat.c" into "app/src/main/cpp" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
97 8. Install your source files (or our example "dwtest.c") into "app/src/main/cpp" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
98 9. Right click "app" in your project and click New -> Folder -> Assets Folder |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
99 "Target Source Set" select "main" and click "Finish" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
100 10. Place any application resource images in the form "#.png" where # is the resource ID. |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
101 Any other application files placed here will be accessible via dw_app_dir() at runtime. |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
102 |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
103 === Project Configuration === |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
104 11. Open "app/manifests/AndroidManifest.xml" and in the "activity" section |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
105 change "android:name" from ".MainActivity" to ".DWindows" |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
106 12. Recommend adding the following (but depends on the app usage): |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
107 android:configChanges="orientation|screenSize|screenLayout|keyboardHidden" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
108 android:screenOrientation="fullSensor" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
109 android:persistent="true" |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
110 android:usesCleartextTraffic="true" |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
111 13: Open "app/src/main/cpp/CMakeLists.txt" and in the add_library() section: |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
112 Remove "native-lib.cpp" and add "dw.cpp" optionally "dwcompat.c" and your applications C |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
113 or C++ source files that you had installed in step 8. |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
114 Also change "project()" to be your project name. |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
115 14. Open "build.gradle (Module)" in "Gradle Scripts" and change "applicationId" to your App ID. |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
116 |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
117 === Application Assets === |
2672
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
118 15. Remove all the files under "app/res/mipmap/ic_launcher" and app/res/mipmap/ic_launcher_round" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
119 16. Right click "app" and click New -> Image Asset |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
120 "Icon Type" select "Launcher Icons (Legacy Only)" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
121 "Name" enter "ic_launcher" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
122 "Asset Type" check "Image" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
123 "Path" click the folder icon and select the largest launcher image you have. |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
124 "Shape" select "Square" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
125 Click "Next" and then "Finish" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
126 17. Right click "app" and click New -> Image Asset |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
127 "Icon Type" select "Launcher Icons (Legacy Only)" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
128 "Name" enter "ic_launcher_round" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
129 "Asset Type" check "Image" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
130 "Path" click the folder icon and select the largest launcher image you have. |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
131 "Shape" select "Circle" |
d2c3b17a4ddf
Remove the unicode characters that LibreOffice put into the text.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
2671
diff
changeset
|
132 Click "Next" and then "Finish" |
2671
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
133 |
0ed61ddb9957
Add a mobile platform text file with instructions on how to create projects.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
134 |