Skip to content

Commit

Permalink
Organise Erlang source files into sub-folders
Browse files Browse the repository at this point in the history
These sub-folders are only 1 level deep, as per the recommendations in the Erlang docs.
  • Loading branch information
SunderB authored and samaaron committed Jun 12, 2020
1 parent 41f5f5b commit 8a330e6
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion app/gui/qt/unix-prebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ ruby "${SCRIPT_DIR}/../../server/ruby/bin/compile-extensions.rb"

echo "Compiling erlang files..."
cd "${SCRIPT_DIR}/../../server/erlang"
erlc src/*.erl -o ebin/
erlc src/osc/*.erl -o ebin/
erlc src/pi_server/*.erl -o ebin/
erlc src/sp_midi/*.erl -o ebin/
cp src/sonic_pi_server.app.src ebin/sonic_pi_server.app
cd "${SCRIPT_DIR}"

Expand Down
4 changes: 3 additions & 1 deletion app/gui/qt/win-prebuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ forfiles /p lang /s /m *.ts /c "cmd /c %QT_INSTALL_LOCATION%\bin\lrelease.exe @f
@echo Compiling Erlang BEAM files...
cd %~dp0
cd ..\..\server\erlang
forfiles /m src\*.erl /c "cmd /c ..\native\erlang\bin\erl.exe -compile @fname -o ebin\"
forfiles /m src\osc\*.erl /c "cmd /c ..\native\erlang\bin\erl.exe -compile @fname -o ebin\"
forfiles /m src\pi_server\*.erl /c "cmd /c ..\native\erlang\bin\erl.exe -compile @fname -o ebin\"
forfiles /m src\sp_midi\*.erl /c "cmd /c ..\native\erlang\bin\erl.exe -compile @fname -o ebin\"
xcopy /Y /I /R /E src\sonic_pi_server.app.src ebin\sonic_pi_server.app
cd %~dp0
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
set_this_pid/1, set_log_level/1, schedule_callback/3, get_current_time_microseconds/0]).
-on_load(init/0).

-define(APPNAME, sonic_pi_server).
-define(APPLICATION, sonic_pi_server).
-define(LIBNAME, "libsp_midi").

init() ->
SoName = case code:priv_dir(?APPNAME) of
SoName = case code:priv_dir(?APPLICATION) of
{error, bad_name} ->
case filelib:is_dir(filename:join(["..", priv])) of
true ->
Expand Down

0 comments on commit 8a330e6

Please sign in to comment.