s/nimrod/nim/g; s/babel/nimble/g
This commit is contained in:
parent
f2e717da2d
commit
8b807adc08
13 changed files with 41 additions and 41 deletions
|
|
@ -1,20 +1,20 @@
|
|||
In this directory you will find the Android platform cross-calculator sample.
|
||||
|
||||
Due to the nature of Android being java and nimrod generating C code, the build
|
||||
Due to the nature of Android being java and Nim generating C code, the build
|
||||
process is slightly more complex because jni code has to be written to bridge
|
||||
both languages. In a distant future it may be possible for nimrod to generate
|
||||
both languages. In a distant future it may be possible for Nim to generate
|
||||
the whole jni bridge, but for the moment this is manual work.
|
||||
|
||||
For the jni bridge to work first the java code is compiled with the nimrod code
|
||||
For the jni bridge to work first the java code is compiled with the Nim code
|
||||
just declared as a native method which will be resolved at runtime. The scripts
|
||||
nimbuild.sh and jnibuild.sh are in charge of building the nimrod code and
|
||||
nimbuild.sh and jnibuild.sh are in charge of building the Nim code and
|
||||
generating the jni bridge from the java code respectively. Finally, the
|
||||
ndk-build command from the android ndk tools has to be run to build the binary
|
||||
libary which will be installed along the final apk.
|
||||
|
||||
All these steps are wrapped in the ant build script through the customization
|
||||
of the -post-compile rule. If you have the android ndk tools installed and you
|
||||
modify scripts/nimbuild.sh to point to the directory where you have nimrod
|
||||
modify scripts/nimbuild.sh to point to the directory where you have Nim
|
||||
installed on your system, you can simply run "ant debug" to build everything.
|
||||
|
||||
Once the apk is built you can install it on your device or emulator with the
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
In this directory you will find the iOS platform cross-calculator sample.
|
||||
|
||||
The iOS version of the code builds a view controller in charge of displaying
|
||||
the interface to the user. The nimrod backend code is compiled into C code and
|
||||
the interface to the user. The Nim backend code is compiled into C code and
|
||||
put into build/nimrod as a pre-build phase of the project.
|
||||
|
||||
When the calculate button is used the view controller calls the nimrod code to
|
||||
When the calculate button is used the view controller calls the Nim code to
|
||||
delegate the logic of the operation and puts the result in a label for display.
|
||||
All interface error checks are implemented in the view controller.
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
// Dismiss all keyboards.
|
||||
[self backgroundTouched];
|
||||
|
||||
// Call nimrod code, store the result and display it.
|
||||
// Call Nim code, store the result and display it.
|
||||
const int a = [self.aText.text intValue];
|
||||
const int b = [self.bText.text intValue];
|
||||
const int c = myAdd(a, b);
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
* was used on the xib file and slightly modified to fit the original property
|
||||
* names. Which means here is a lot of garbage you would never write in real
|
||||
* life. Please ignore the following "wall of code" for the purposes of
|
||||
* learning Nimrod, this is all just because Apple can't be bothered to
|
||||
* learning Nim, this is all just because Apple can't be bothered to
|
||||
* maintain backwards compatibility properly.
|
||||
*/
|
||||
- (void)loadView
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
label4.contentStretch = CGRectFromString(@"{{0, 0}, {1, 1}}");
|
||||
label4.frame = CGRectMake(0.0, 0.0, 320.0, 34.0);
|
||||
label4.tag = 2;
|
||||
label4.text = @"Nimrod Crossplatform Calculator";
|
||||
label4.text = @"Nim Crossplatform Calculator";
|
||||
label4.textAlignment = UITextAlignmentCenter;
|
||||
|
||||
UIButton *background_button = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
This example demonstrates how to use Nimrod with Lazarus. The GUI is generated
|
||||
with Lazarus, while the "backend" is written in Nimrod. To compile the example,
|
||||
This example demonstrates how to use Nim with Lazarus. The GUI is generated
|
||||
with Lazarus, while the "backend" is written in Nim. To compile the example,
|
||||
use this command:
|
||||
|
||||
nimrod c --app:gui --no_main --no_linking backend.nim
|
||||
nim c --app:gui --no_main --no_linking backend.nim
|
||||
|
||||
Open the ``nimlaz.lpi`` file in Lazarus and run the program.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue