Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile time apps modularity, version 2 #227

Merged
merged 2 commits into from
Dec 7, 2017

Conversation

boricj
Copy link
Contributor

@boricj boricj commented Oct 25, 2017

Second version of #73, along with an updated "Hello, World!" sample at https://github.com/boricj/numworks-hello-world.

The main issue now is that there are lots of translations inside apps that are used in shared files, which is taken care of in [apps] Extract shared translations from apps.

@boricj boricj force-pushed the compile_time_apps_modularity_2 branch 2 times, most recently from 08472c0 to e1ce417 Compare October 28, 2017 12:51
@boricj
Copy link
Contributor Author

boricj commented Oct 28, 2017

I made another sample app (https://github.com/boricj/numworks-tic-tac-toe) to further demonstrate.

@adriweb
Copy link
Contributor

adriweb commented Oct 28, 2017

Nice!
Considering the two manual commits are quite simple and that the 3rd is on auto-generated, I hope this gets merged :)

@debrouxl
Copy link
Contributor

I hope that modularity remains a goal for Numworks, and as such, that this PR is merged ASAP :)

@Ecco
Copy link
Contributor

Ecco commented Dec 5, 2017

Hi @boricj . Thank you very much for this PR, which we definitely will merge.

I'd like to apologize for not merging it before: it was conflicting with the upcoming Python app and we were on a tight schedule.

The biggest conflict is most likely the one from 3bca25c , but maybe simply removing this commit might work. As you can see, we (hopefully) fixed the mp_hal_stdout_tx_strn_cooked situation once and for all.

This commit can be regenerated with the following shell snippet:

```
for i in UndefinedValue ForbiddenValue Goto ValueNotReachedByFunction Initialization Trigonometric RoundAbscissa Orthonormal DefaultSetting Axis Zoom GraphTab IntervalSet XStart XEnd Step Plot DisplayValues ActivateDesactivate NoFunctionToDelete Language FunctionOptions ClearColumn ColumnOptions DataTab CopyColumnInList FunctionColumn Move Or ValuesTab Goto ToZoom HardwareTestLaunch1 HardwareTestLaunch2 HardwareTestLaunch3 HardwareTestLaunch4 ActiveExamModeMessage1 ActiveExamModeMessage2 ActiveExamModeMessage3 ExitExamMode1 ExitExamMode2 Sci Rad Deg
do
  move=$(grep "^$i = " -r *)

  if [ -n "$move" ]
  then
    echo "$move" | while read -r item
    do
      file=$(echo "$item" | cut -f1 -d:)
      lang=$(echo "$file" | cut -f2 -d.)
      translation=$(echo "$item" | sed -e 's/^[^:]*://')
      label=$(echo "$translation" | sed -e 's/=.*//')
      sed -i "/^$label/d" "$file"
      echo "$translation" >> "apps/shared.$lang.i18n"
    done
  fi
done

for i in apps/shared.*.i18n
do
  sort $i -o $i
done
```
@boricj boricj force-pushed the compile_time_apps_modularity_2 branch from e1ce417 to 57a864a Compare December 6, 2017 16:58
@boricj
Copy link
Contributor Author

boricj commented Dec 6, 2017

This pull request has been rebased.

@Ecco
Copy link
Contributor

Ecco commented Dec 7, 2017

Thank you very much @boricj, that is a very good PR! And thank you for rebasing!

@Ecco Ecco merged commit 59e5750 into numworks:master Dec 7, 2017
@dani-corie
Copy link

Nice! And you know what else this is good for? Allowing users to add separately distributed GPL licensed apps to their local build. ;) Especially once the Epsilon license is fixed ( #38 )...

RedGl0w pushed a commit to RedGl0w/epsilon that referenced this pull request Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants