From: Fred Hamster Date: Thu, 5 Oct 2023 22:37:35 +0000 (-0400) Subject: Merge branch 'release-2.140.136' X-Git-Tag: 2.140.136^0 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=de0da7f2f7958d4ba652ff2ef5c79991700141ac;hp=a4c99c6006b3aa20b5f65f02c2d30db7e790083a;p=feisty_meow.git Merge branch 'release-2.140.136' --- diff --git a/documentation/clam_manual/clam_docs.html b/documentation/clam_manual/clam_docs.html index b5380512..f0bb385f 100644 --- a/documentation/clam_manual/clam_docs.html +++ b/documentation/clam_manual/clam_docs.html @@ -1104,7 +1104,7 @@ issued and just show the output of running those commands. -

OP_SYSTEM

+

OPERATING_SYSTEM

     This is a flag that defines the operating system @@ -1463,12 +1463,8 @@ needed for the compiler.  Not all operating system choices above are suitable - with the COMPILER choices, but generally it is fairly obvious which are - supported.  The current possibilities include BORLAND_DOS, - BORLAND_OS2, - UNIX (default cc), GNU_OS2, GNU_LINUX, OBJECT_CENTER (Saber compiler), - SUN_UNIX, - VISUAL_CPP, and DIAB3. + with the COMPILER choice.  The current possibilities include + GNU_LINUX, GNU_WINDOWS, and GNU_DARWIN.

COMPILER_FLAGS

     This is the list of flags passed to diff --git a/infobase/configuration/cron/aa_cron_defaults.crontab b/infobase/configuration/cron/aa_cron_defaults.crontab index a6ba6849..a33b2fc3 100644 --- a/infobase/configuration/cron/aa_cron_defaults.crontab +++ b/infobase/configuration/cron/aa_cron_defaults.crontab @@ -1,5 +1,5 @@ -#[aa cron defaults] +#[aa_cron_defaults] # # cron default bits to add at top of crontab... # by fred t. hamster, GNU GPL v3 license. diff --git a/infobase/configuration/cron/add_swap_mount.crontab b/infobase/configuration/cron/add_swap_mount.crontab new file mode 100644 index 00000000..378ad370 --- /dev/null +++ b/infobase/configuration/cron/add_swap_mount.crontab @@ -0,0 +1,9 @@ + +############## + +#[hamstertronic_swap_enable] +# turns on some swap space to allow the machine to temporarily go over memory limits. +@reboot bash $FEISTY_MEOW_APEX/scripts/system/add_swap_mount.sh + +############## + diff --git a/infobase/configuration/cron/backup_git_account.crontab b/infobase/configuration/cron/backup_git_account.crontab index ae28d562..fde4348e 100644 --- a/infobase/configuration/cron/backup_git_account.crontab +++ b/infobase/configuration/cron/backup_git_account.crontab @@ -1,7 +1,7 @@ ############## -#[backup git account] +#[backup_git_account] # archives the whole ~git folder with all account databases into a compressed tar file. 34 20 * * 5 tar -czf /z/stuffing/archives/git_archive_$(date +"\%Y_\%m_\%d_\%H\%M_\%S" | tr -d '/\n/').tar.gz /home/git &>>/tmp/${CRONUSER}-cron-backup_git_account.log diff --git a/infobase/configuration/cron/backup_maildir.crontab b/infobase/configuration/cron/backup_maildir.crontab index a8af8d69..2cbde083 100644 --- a/infobase/configuration/cron/backup_maildir.crontab +++ b/infobase/configuration/cron/backup_maildir.crontab @@ -1,7 +1,7 @@ ############## -#[backup maildir] +#[backup_maildir] # backs up the maildir folder for fred bi-monthly. 8 4 3,14 * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; tar -czf /z/stuffing/archives/maildir_backup_$(date_stringer).tar.gz $HOME/Maildir) &>/tmp/${CRONUSER}-cron-backup_maildir.log diff --git a/infobase/configuration/cron/backup_mysql_databases.crontab b/infobase/configuration/cron/backup_mysql_databases.crontab index be5ffcf9..c80f91ac 100644 --- a/infobase/configuration/cron/backup_mysql_databases.crontab +++ b/infobase/configuration/cron/backup_mysql_databases.crontab @@ -1,9 +1,9 @@ ############## -#[backup mysql databases] -# backs up all of our mysql databases on a weekly basis. -28 4 * * 2 (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; mysqldump -u root '-pPASSWORD' --all-databases | gzip > /z/stuffing/archives/database_backup_$(hostname)_$(date_stringer).sql.gz) &>>/tmp/${CRONUSER}-cron-backup_mysql_databases.log +#[backup_all_mysql_databases] +# backs up all of our mysql databases twice a week (as currently configured). +28 4 * * */3 (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; mysqldump -u root '-pPASSWORD' --all-databases | gzip > /z/stuffing/archives/database_backup_$(hostname)_$(date_stringer).sql.gz) &>>/tmp/${CRONUSER}-cron-backup_mysql_databases.log ############## diff --git a/infobase/configuration/cron/backup_photo_albums.crontab b/infobase/configuration/cron/backup_photo_albums.crontab index b93e56ff..b295bb0f 100644 --- a/infobase/configuration/cron/backup_photo_albums.crontab +++ b/infobase/configuration/cron/backup_photo_albums.crontab @@ -1,7 +1,7 @@ ############## -#[backup photo albums] +#[backup_photo_albums] # back up the pictures in coppermine gallery every month. 34 6 4 * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; tar -czf /z/stuffing/archives/photo_albums_backup_$(date_stringer).tar.gz /home/albums ; refred) &>>/tmp/${CRONUSER}-cron-backup_photo_albums.log diff --git a/infobase/configuration/cron/backup_serene_system.crontab b/infobase/configuration/cron/backup_serene_system.crontab index e6ae20ed..1f04d2cc 100644 --- a/infobase/configuration/cron/backup_serene_system.crontab +++ b/infobase/configuration/cron/backup_serene_system.crontab @@ -1,7 +1,7 @@ ############## -#[backup serene system] +#[backup_serene_system] # backs up config files and important parts of home directories to off-machine storage. 14 2 * * */7 (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/archival/serene_backer_upper.sh) &>>/tmp/${CRONUSER}-cron-backup_serene_system.log diff --git a/infobase/configuration/cron/backup_trac.crontab b/infobase/configuration/cron/backup_trac.crontab index 2d4f5def..dc9bd6a2 100644 --- a/infobase/configuration/cron/backup_trac.crontab +++ b/infobase/configuration/cron/backup_trac.crontab @@ -1,7 +1,7 @@ ############## -#[backup trac] +#[backup_trac] # backs up trac every week. 28 7 * * 2 bash $FEISTY_MEOW_APEX/scripts/archival/backup_trac.sh /home/trac /z/stuffing/archives &>>/tmp/${CRONUSER}-cron-backup_trac.log diff --git a/infobase/configuration/cron/bookmarks_builder.crontab b/infobase/configuration/cron/bookmarks_builder.crontab index 9f54bb87..604c5c92 100644 --- a/infobase/configuration/cron/bookmarks_builder.crontab +++ b/infobase/configuration/cron/bookmarks_builder.crontab @@ -1,7 +1,7 @@ ############## -#[bookmarks builder] +#[bookmarks_builder] # regenerate the bookmarks pages. 24 10 * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/bookmarks/create_marks.sh ) &>>/tmp/${CRONUSER}-cron-bookmarks_builder.log diff --git a/infobase/configuration/cron/emit_crontab.crontab b/infobase/configuration/cron/emit_crontab.crontab index 99c15e3e..095b9ae4 100644 --- a/infobase/configuration/cron/emit_crontab.crontab +++ b/infobase/configuration/cron/emit_crontab.crontab @@ -1,7 +1,7 @@ ############## -#[emit crontab] +#[emit_crontab] # meta-operation to backup the crontab file using cron itself. 28 */8 * * * crontab -l >$HOME/$(hostname).$CRONUSER.crontab diff --git a/infobase/configuration/cron/exim_key_updater.crontab b/infobase/configuration/cron/exim_key_updater.crontab new file mode 100644 index 00000000..87476cb1 --- /dev/null +++ b/infobase/configuration/cron/exim_key_updater.crontab @@ -0,0 +1,10 @@ + +############## + +#[service_key_updater] +# updates the exim4 certificate and key file once a week, which is faster +# than needed to stay up to date with the automated certificate renewals. +34 19 * * 1 (cd /etc/exim4 ; bash key_copier.sh; cd /etc/courier ; bash key_maker.sh ) &>> /tmp/${CRONUSER}-cron-service_key_updater.txt + +############## + diff --git a/infobase/configuration/cron/letsencrypt_renewal.crontab b/infobase/configuration/cron/letsencrypt_renewal.crontab index 90df89b5..0848a58c 100644 --- a/infobase/configuration/cron/letsencrypt_renewal.crontab +++ b/infobase/configuration/cron/letsencrypt_renewal.crontab @@ -1,7 +1,7 @@ ############## -#[letsencrypt renewal] +#[letsencrypt_renewal] # run the letsencrypt certificate renewal process every 4 hours. # fixing issues in renewal by setting PATH. PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin diff --git a/infobase/configuration/cron/mailman_attribute_fix.crontab b/infobase/configuration/cron/mailman_attribute_fix.crontab index b0048a66..7532f464 100644 --- a/infobase/configuration/cron/mailman_attribute_fix.crontab +++ b/infobase/configuration/cron/mailman_attribute_fix.crontab @@ -1,7 +1,7 @@ ############## -#[mailman attribute fix] +#[mailman_attribute_fix] # fix the mailman log files so that an obnoxious bug doesn't happen on the mailman web site. 23 5 * * * chmod -R 02775 /var/lib/mailman/logs &>/dev/null diff --git a/infobase/configuration/cron/nechung_fortune.crontab b/infobase/configuration/cron/nechung_fortune.crontab index c8601f16..9ea138d6 100644 --- a/infobase/configuration/cron/nechung_fortune.crontab +++ b/infobase/configuration/cron/nechung_fortune.crontab @@ -1,7 +1,7 @@ ############## -#[nechung fortune] +#[nechung_fortune] # runs every minute and recreates a fortune for thunderbird signature. # a lot of the detail below is to get the feisty meow environment loaded for # the new_sig command. diff --git a/infobase/configuration/cron/opensim_restart.crontab b/infobase/configuration/cron/opensim_restart.crontab index d6f56391..0c53dd73 100644 --- a/infobase/configuration/cron/opensim_restart.crontab +++ b/infobase/configuration/cron/opensim_restart.crontab @@ -1,7 +1,7 @@ ############## -#[opensim restart] +#[opensim_restart] # ensure opensim is started if we can't detect it as running. */5 * * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/opensim/maybe_restart_opensim.sh) &>>/tmp/${CRONUSER}-cron-opensim_restart.log diff --git a/infobase/configuration/cron/pack_feisty_for_web.crontab b/infobase/configuration/cron/pack_feisty_for_web.crontab index 1913bd24..ac66fa2e 100644 --- a/infobase/configuration/cron/pack_feisty_for_web.crontab +++ b/infobase/configuration/cron/pack_feisty_for_web.crontab @@ -1,7 +1,7 @@ ############## -#[pack feisty for web] +#[pack_feisty_for_web] # this packs up our source code distributions every 8 days. 16 22 */8 * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/archival/pack_feisty_meow.sh) &>>/tmp/${CRONUSER}-cron-pack_feisty_for_web.log diff --git a/infobase/configuration/cron/periodic_reboot.crontab b/infobase/configuration/cron/periodic_reboot.crontab index a8d15079..27f6d880 100644 --- a/infobase/configuration/cron/periodic_reboot.crontab +++ b/infobase/configuration/cron/periodic_reboot.crontab @@ -1,7 +1,7 @@ ############## -# [periodic reboot] +# [periodic_reboot] # invigorates a shaky machine that cannot run longer than a certain time period. # version below reboots every two days, somewhat. 20 4 * * 0,2,4,6 (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; sep; echo periodic reboot running at $(date) ; sep; sync; sleep 2; /sbin/reboot) &>>$HOME/${CRONUSER}-cron-periodic_reboot.log diff --git a/infobase/configuration/cron/process_check.crontab b/infobase/configuration/cron/process_check.crontab index 3fde27b6..f1ab51d3 100644 --- a/infobase/configuration/cron/process_check.crontab +++ b/infobase/configuration/cron/process_check.crontab @@ -1,7 +1,7 @@ ############## -#[process check] +#[process_check] # a crontab for periodically dumping the process state. * * * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/processes/show_hot_ones.sh) &>>/tmp/${CRONUSER}-cron-active_processes.log diff --git a/infobase/configuration/cron/random_sound.crontab b/infobase/configuration/cron/random_sound.crontab index a61613b9..5e8df1d6 100644 --- a/infobase/configuration/cron/random_sound.crontab +++ b/infobase/configuration/cron/random_sound.crontab @@ -1,7 +1,7 @@ ############## -#[random sound] +#[random_sound] * * * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/multimedia/randomly_play.sh) &>>/tmp/${CRONUSER}-cron-random_sound.log ############## diff --git a/infobase/configuration/cron/save_serene_root_crons.crontab b/infobase/configuration/cron/save_serene_root_crons.crontab new file mode 100644 index 00000000..6f613ee0 --- /dev/null +++ b/infobase/configuration/cron/save_serene_root_crons.crontab @@ -0,0 +1,9 @@ + +############## + +#[serene_root_crontab] +# update the stored crontab for the root user, using a cron job! +14 */8 * * * (crontab -l >/home/www-data/web/root.crontab ; chown www-data:www-data /home/www-data/web/root.crontab) + +############## + diff --git a/infobase/configuration/cron/snarf_linux_configuration.crontab b/infobase/configuration/cron/snarf_linux_configuration.crontab index 7b61de29..d9adf167 100644 --- a/infobase/configuration/cron/snarf_linux_configuration.crontab +++ b/infobase/configuration/cron/snarf_linux_configuration.crontab @@ -1,7 +1,7 @@ ############## -#[snarf linux configuration] +#[snarf_linux_configuration] # do a backup of the linux configuration files once a week. 28 7 * * 4 (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; cd /z/stuffing/archives; perl $FEISTY_MEOW_SCRIPTS/archival/snarf_linux_config.pl) &>>/tmp/${CRONUSER}-cron-snarf_linux_configuration.log diff --git a/infobase/configuration/cron/synch_and_swim_downstream.crontab b/infobase/configuration/cron/synch_and_swim_downstream.crontab index 5b43e790..724e85dc 100644 --- a/infobase/configuration/cron/synch_and_swim_downstream.crontab +++ b/infobase/configuration/cron/synch_and_swim_downstream.crontab @@ -1,7 +1,7 @@ ############## -#[synch and swim downstream] +#[synch_and_swim_downstream] # updates local code repositories from main versions before uploading any changes to downstream # repositories, such as sourceforge or github. the uploading process (which we think of as sending # those updated items swimming downstream to their dependent repositories) is done automatically in diff --git a/infobase/configuration/cron/tell_zooty_our_ip.crontab b/infobase/configuration/cron/tell_zooty_our_ip.crontab index 931023a1..9e109057 100644 --- a/infobase/configuration/cron/tell_zooty_our_ip.crontab +++ b/infobase/configuration/cron/tell_zooty_our_ip.crontab @@ -1,7 +1,7 @@ ############## -#[tell zooty our ip] +#[tell_zooty_our_ip] # firewall host only--inform serene/zooty of our home IP address to enable back-connections. 0,14,28,42,56 * * * * (bash $FEISTY_MEOW_APEX/scripts/security/tell_zooty_our_ip.sh serene.feistymeow.org fred $CRONUSER ) &>>/tmp/${CRONUSER}-cron-tell_zooty_our_ip.log diff --git a/infobase/configuration/cron/time_synch.crontab b/infobase/configuration/cron/time_synch.crontab index 7b5fd6fe..6b064f5c 100644 --- a/infobase/configuration/cron/time_synch.crontab +++ b/infobase/configuration/cron/time_synch.crontab @@ -1,18 +1,32 @@ ############## -#[time synch] +#[time_synch_suite] LOCAL_TIME_SERVER=greendragon +############## + +# note: uncomment only one of the below (local client, local server, or remote client). + +############## + +#[update_system_time_local_client] # standard version synchs to a local machine. can be used on a network # to get time from central host. -*/4 * * * * /usr/sbin/ntpdate $LOCAL_TIME_SERVER &>>/tmp/${CRONUSER}-cron-time_synch.log +#*/4 * * * * /usr/sbin/ntpdate $LOCAL_TIME_SERVER &>>/tmp/${CRONUSER}-cron-time_synch.log ############## +#[update_system_time_local_server] # the central host machine uses this version, to synch time externally. -0 0,4,8,12,16,20 * * * /usr/bin/rdate -s time.nist.gov &>>/tmp/${CRONUSER}-cron-time_synch.log +#0 0,4,8,12,16,20 * * * /usr/bin/rdate -s time.nist.gov &>>/tmp/${CRONUSER}-cron-time_synch.log + +############## + +#[update_system_time_remote_client] +# synchronize the time with a real ntp server. +#42 0,4,8,12,16,20 * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_APEX/scripts/system/update_system_time.sh ) &>/tmp/${CRONUSER}-cron-update_system_time.log ############## diff --git a/infobase/configuration/cron/update_apt_based_linux.crontab b/infobase/configuration/cron/update_apt_based_linux.crontab index 2e2ae02e..b9dea269 100644 --- a/infobase/configuration/cron/update_apt_based_linux.crontab +++ b/infobase/configuration/cron/update_apt_based_linux.crontab @@ -1,7 +1,7 @@ ############## -#[update apt based linux crontab] +#[update_apt_based_linux_crontab] # does a daily update of an apt-based linux box at pi o'clock. 14 3 * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/system/naive_system_updater.sh) &>>/tmp/${CRONUSER}-cron-update_aptbased_linux.log diff --git a/infobase/configuration/cron/update_system_time.crontab b/infobase/configuration/cron/update_system_time.crontab deleted file mode 100644 index 78c646b1..00000000 --- a/infobase/configuration/cron/update_system_time.crontab +++ /dev/null @@ -1,10 +0,0 @@ - -############## - -#[update_system_time] -# synchronize the time with a real ntp server. -42 0,4,8,12,16,20 * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_APEX/scripts/system/update_system_time.sh ) &>/tmp/${CRONUSER}-cron-update_system_time.log - -############## - - diff --git a/infobase/configuration/cron/uptime_report.crontab b/infobase/configuration/cron/uptime_report.crontab index 3605e648..2d92c892 100644 --- a/infobase/configuration/cron/uptime_report.crontab +++ b/infobase/configuration/cron/uptime_report.crontab @@ -1,7 +1,7 @@ ############## -#[uptime report] +#[uptime_report] # the script writes the current time and current uptime to the log file. 0 * * * * (source $FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh; bash $FEISTY_MEOW_SCRIPTS/system/write_uptime_report.sh) &>>/tmp/${CRONUSER}-cron-uptime_report.log diff --git a/infobase/configuration/cron/web_group_perm_fix.crontab b/infobase/configuration/cron/web_group_perm_fix.crontab index c3453d2f..643af13a 100644 --- a/infobase/configuration/cron/web_group_perm_fix.crontab +++ b/infobase/configuration/cron/web_group_perm_fix.crontab @@ -1,7 +1,7 @@ ############## -#[web group perm fix] +#[web_group_perm_fix] # fix the web directories for group access. 0 * * * * chmod -R g+w /var/www &>/dev/null diff --git a/infobase/configuration/git/dot.gitconfig b/infobase/configuration/git/dot.gitconfig new file mode 100644 index 00000000..41aefa80 --- /dev/null +++ b/infobase/configuration/git/dot.gitconfig @@ -0,0 +1,16 @@ + + +[user] + email = me@mymail.com + name = Programmatic Coder + +[pack] + windowMemory = 100m + SizeLimit = 100m + threads = 1 + +[alias] + # show a beautiful view of the history of this git repository. + hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short + + diff --git a/infobase/configuration/git/git_config_aliases.txt b/infobase/configuration/git/git_config_aliases.txt deleted file mode 100644 index 92107f3e..00000000 --- a/infobase/configuration/git/git_config_aliases.txt +++ /dev/null @@ -1,9 +0,0 @@ - - -# this command should go into ~/.gitconfig to enable the hist alias: - -[alias] - hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short - - -### (add more awesome aliases here as we find them) diff --git a/infobase/document_templates/agile_dev/user_story_template.txt b/infobase/document_templates/agile_dev/user_story_template.txt new file mode 100644 index 00000000..d5b8eaf7 --- /dev/null +++ b/infobase/document_templates/agile_dev/user_story_template.txt @@ -0,0 +1,6 @@ + +A typical "user story" in Scrum goes like this... + +As user/role X, I want feature/item Y, because of business purpose Z. + + diff --git a/infobase/document_templates/banking/check_register.odt b/infobase/document_templates/banking/check_register.odt new file mode 100644 index 00000000..150c6a5f Binary files /dev/null and b/infobase/document_templates/banking/check_register.odt differ diff --git a/infobase/document_templates/check_register.odt b/infobase/document_templates/check_register.odt deleted file mode 100644 index 150c6a5f..00000000 Binary files a/infobase/document_templates/check_register.odt and /dev/null differ diff --git a/infobase/document_templates/dry_trash_sign.odp b/infobase/document_templates/dry_trash_sign.odp deleted file mode 100644 index a8129b0f..00000000 Binary files a/infobase/document_templates/dry_trash_sign.odp and /dev/null differ diff --git a/infobase/document_templates/fallout76_vendor_record-pre_bank_merge.odt b/infobase/document_templates/fallout76_vendor_record-pre_bank_merge.odt deleted file mode 100644 index c95e7bc6..00000000 Binary files a/infobase/document_templates/fallout76_vendor_record-pre_bank_merge.odt and /dev/null differ diff --git a/infobase/document_templates/fallout76_vendor_record.odt b/infobase/document_templates/fallout76_vendor_record.odt deleted file mode 100644 index fc747d4d..00000000 Binary files a/infobase/document_templates/fallout76_vendor_record.odt and /dev/null differ diff --git a/infobase/document_templates/games/fallout76_vendor_record-pre_bank_merge.odt b/infobase/document_templates/games/fallout76_vendor_record-pre_bank_merge.odt new file mode 100644 index 00000000..c95e7bc6 Binary files /dev/null and b/infobase/document_templates/games/fallout76_vendor_record-pre_bank_merge.odt differ diff --git a/infobase/document_templates/games/fallout76_vendor_record.odt b/infobase/document_templates/games/fallout76_vendor_record.odt new file mode 100644 index 00000000..fc747d4d Binary files /dev/null and b/infobase/document_templates/games/fallout76_vendor_record.odt differ diff --git a/infobase/document_templates/recycling_and_trash/dry_trash_sign.odp b/infobase/document_templates/recycling_and_trash/dry_trash_sign.odp new file mode 100644 index 00000000..1e155aa5 Binary files /dev/null and b/infobase/document_templates/recycling_and_trash/dry_trash_sign.odp differ diff --git a/infobase/document_templates/recycling_and_trash/recycling_bin_sign.odp b/infobase/document_templates/recycling_and_trash/recycling_bin_sign.odp new file mode 100644 index 00000000..710b19c4 Binary files /dev/null and b/infobase/document_templates/recycling_and_trash/recycling_bin_sign.odp differ diff --git a/infobase/document_templates/recycling_and_trash/wet_trash_sign.odp b/infobase/document_templates/recycling_and_trash/wet_trash_sign.odp new file mode 100644 index 00000000..ff536718 Binary files /dev/null and b/infobase/document_templates/recycling_and_trash/wet_trash_sign.odp differ diff --git a/infobase/document_templates/recycling_bin_sign.odp b/infobase/document_templates/recycling_bin_sign.odp deleted file mode 100644 index ffd2c39f..00000000 Binary files a/infobase/document_templates/recycling_bin_sign.odp and /dev/null differ diff --git a/infobase/document_templates/user_story_template.txt b/infobase/document_templates/user_story_template.txt deleted file mode 100644 index d5b8eaf7..00000000 --- a/infobase/document_templates/user_story_template.txt +++ /dev/null @@ -1,6 +0,0 @@ - -A typical "user story" in Scrum goes like this... - -As user/role X, I want feature/item Y, because of business purpose Z. - - diff --git a/infobase/document_templates/wet_trash_sign.odp b/infobase/document_templates/wet_trash_sign.odp deleted file mode 100644 index 804e1047..00000000 Binary files a/infobase/document_templates/wet_trash_sign.odp and /dev/null differ diff --git a/infobase/examples/cpp_grammar_code/CxxParsing.hxx b/infobase/examples/cpp_grammar_code/CxxParsing.hxx index d5dc0316..a122f2a7 100644 --- a/infobase/examples/cpp_grammar_code/CxxParsing.hxx +++ b/infobase/examples/cpp_grammar_code/CxxParsing.hxx @@ -1,11 +1,11 @@ #include #include -#ifndef _MSC_VER +//#ifndef _MSC_VER #include -#else -#include +//#else +//#include //#define alloca _alloca -#endif +//#endif void advance_search(); void end_search(CxxToken *aToken); YACC_MARK_TYPE mark(); diff --git a/infobase/feisty_inits/dot.bashrc-normal-user b/infobase/feisty_inits/dot.bashrc-normal-user index 9c15d011..0f185f79 100644 --- a/infobase/feisty_inits/dot.bashrc-normal-user +++ b/infobase/feisty_inits/dot.bashrc-normal-user @@ -1,7 +1,9 @@ ############## -# initializes the feisty meow environment for "normal" users (not intended for the root user). +# initialize the feisty meow environment for "normal" users. +# this is not intended for the root user, because having a bunch of extra +# scripts automatically loaded into root's environment is not a good idea. ############## @@ -16,9 +18,7 @@ fi ############## -# set the history sizes to be much larger, and do this whether we load the -# feisty meow environment or not. - +# set the history sizes to be much larger; important to have good history. export HISTSIZE=1000000 export HISTFILESIZE=8000000 diff --git a/infobase/feisty_inits/dot.bashrc-root b/infobase/feisty_inits/dot.bashrc-root index 944ed1ad..fd9bc37e 100644 --- a/infobase/feisty_inits/dot.bashrc-root +++ b/infobase/feisty_inits/dot.bashrc-root @@ -1,7 +1,11 @@ ############## -# provides a macro to initialize the feisty meow environment for the "root" user. +# sets an alias to initialize the feisty meow environment for the "root" user. +# this is safe for root to use, since nothing drastic is modified in the +# environment. one additional alias should not cripple anything. plus we are +# updating the history size to ensure long histories to enable consulting old +# commands. ############## @@ -16,9 +20,7 @@ fi ############## -# set the history sizes to be much larger, and do this whether we load the -# feisty meow environment or not. - +# set the history sizes to be much larger; important to have good history. export HISTSIZE=1000000 export HISTFILESIZE=8000000 @@ -27,10 +29,9 @@ export HISTFILESIZE=8000000 # system-wide install (will be fixed by connect_feisty_meow script): export FEISTY_MEOW_APEX="/opt/feistymeow.org/feisty_meow" -# the "fredme" macro enables the feisty_meow environment. -alias fredme='source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"' -# synonym for fredme which makes more sense to most people. -alias feistyme='source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"' +# the "gofeisty" macro enables the feisty_meow environment. this can be used +# after logging in, and avoids loading the feisty meow environment automatically. +alias gofeisty='source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"' # if not commented out, then feisty meow will run all the unit tests during builds. #export RUN_ALL_TESTS=true diff --git a/infobase/fortunes.dat b/infobase/fortunes.dat index 8b9b5c95..b1280de8 100644 --- a/infobase/fortunes.dat +++ b/infobase/fortunes.dat @@ -18228,8 +18228,6 @@ Opportunity is missed by most people because it is dressed in overalls and looks like work. -- Thomas Alva Edison ~ -Three may keep a secret, if two of them are dead. -- Benjamin Franklin -~ When the politicians complain that TV turns the proceedings into a circus, it should be made clear that the circus was already there, and that TV has merely demonstrated that not all the performers are well trained. @@ -28989,8 +28987,6 @@ failure of human wisdom. ~ Perfect nonviolence is the highest bravery. -- Mahatma Gandhi ~ -There never was a good war or a bad peace. -- Benjamin Franklin -~ There's no honorable way to kill, no gentle way to destroy. There is nothing good in war. Except its ending. -- Abraham Lincoln @@ -44119,5 +44115,90 @@ all fabrications will shatter and ooze away, that the manifest truths may shine free. -- fred t. hamster ~ - +Anybody can become angry--that is easy; but to be angry with the right person, +and to the right degree, and at the right time, and for the right purpose, and +in the right way--that is not within everybody's power; that is not easy. + -- Aristotle +~ +Mindfulness can evolve into an experience of attending to the world with the +world, not only infusing the body with more aliveness but also transforming +the entire world into a field of aliveness. Yes, biological aliveness has +always already been there, but every time I bring breath attention to it, I +augment and refine it. It's like the difference between watering a +houseplant and attending to it with a "green thumb." It's not quite +clear what a green thumb is. Some people have it, some people don't. Maybe +we can describe it as a mixture of extra nourishment and something intangible +like attention, love, and care. For the houseplant, the green thumb is the +difference between surviving and thriving. Mindfulness practice can have that +effect on your life. + -- Christian Dillo, from "The Path of Aliveness: A Contemporary Zen Approach + to Awakening Body and Mind", published by Shambhala Publications +~ +There never was a good war nor a bad peace. + -- Benjamin Franklin +~ +Those who in quarrels interpose, must often wipe a bloody nose. + -- Benjamin Franklin +~ +He that speaks much, is much mistaken. + -- Benjamin Franklin +~ +To find out a girl's faults, praise her to her girl friends. + -- Benjamin Franklin +~ +The cat in gloves catches no mice. + -- Benjamin Franklin +~ +Does thou love life? +Then do not squander time; +for that's the stuff life is made of. + -- Benjamin Franklin +~ +There can't be good living where there is not good drinking. + -- Benjamin Franklin +~ +To lengthen thy life, lessen thy meals. + -- Benjamin Franklin +~ +Three may keep a secret, if two of them are dead. + -- Benjamin Franklin +~ +I wish the bald eagle had not been chosen as the representative of our +country; he is a bird of bad moral character; like those among men who live by +sharping and robbing, he is generally poor, and often very lousy. The turkey +is a much more respectable bird, and withal a true original native of America. + -- Benjamin Franklin +~ +Energy and persistence conquer all things. + -- Benjamin Franklin +~ +Benjamin Franklin's Thirteen Virtues + +Temperance + + moderation in food and drink +Silence + + mentioning only important matters +Order + + proper organization of time and space +Resolution + + accomplishing one's responsibilities +Frugality + + purchasing only worthwhile items and wasting nothing +Industry + + making the most of one's time and energy +Sincerity + + being honest and forthright +Justice + + practicing impartiality and refusing to wrong others +Moderation + + avoiding extremes +Cleanliness + + using good hygiene under sanitary conditions +Tranquility + + remaining calm and composed despite life's obstacles +Chastity + + refusing to allow sex to interfere with one's life +Humility + + avoiding excess pride and haughtiness +~ diff --git a/nucleus/applications/bookmark_tools/marks_checker.cpp b/nucleus/applications/bookmark_tools/marks_checker.cpp index 0c84ac8c..12b3bb29 100644 --- a/nucleus/applications/bookmark_tools/marks_checker.cpp +++ b/nucleus/applications/bookmark_tools/marks_checker.cpp @@ -19,8 +19,10 @@ #include "bookmark_tree.h" -#include +#include #include +#include +#include #include #include #include @@ -39,7 +41,6 @@ #include #include #include -#include "../../library/algorithms/sorts.h" using namespace algorithms; using namespace application; diff --git a/nucleus/applications/bundler/bundle_creator.cpp b/nucleus/applications/bundler/bundle_creator.cpp index 04c5b173..9313883f 100644 --- a/nucleus/applications/bundler/bundle_creator.cpp +++ b/nucleus/applications/bundler/bundle_creator.cpp @@ -45,9 +45,9 @@ #include #include #include -#ifdef __WIN32__ - #include -#endif +//#ifdef __WIN32__ + //#include +//#endif using namespace application; using namespace basis; @@ -192,6 +192,9 @@ int bundle_creator::execute() BASE_LOG(astring("starting file bundling at ") + time_stamp::notarize(false)); command_line cmds(_global_argc, _global_argv); + +//BASE_LOG(astring("before starting, cmds has: ") + parser_bits::platform_eol_to_chars() + cmds.text_form()); + astring temp; if (cmds.get_value('?', temp)) return print_instructions(); if (cmds.get_value("?", temp)) return print_instructions(); diff --git a/nucleus/applications/bundler/makefile b/nucleus/applications/bundler/makefile index 7f317de8..64638c93 100644 --- a/nucleus/applications/bundler/makefile +++ b/nucleus/applications/bundler/makefile @@ -12,6 +12,7 @@ include variables.def # hopefully this approach of having a neutral outer # maker will get rid of that broken behavior. +PROJECT = bundler_app LAST_TARGETS = maker OTHER_CLEANS = breaker diff --git a/nucleus/applications/bundler/makefile.bundle_creator b/nucleus/applications/bundler/makefile.bundle_creator index 57ac4333..78cff28e 100644 --- a/nucleus/applications/bundler/makefile.bundle_creator +++ b/nucleus/applications/bundler/makefile.bundle_creator @@ -11,14 +11,7 @@ endif DEFINITIONS += __BUILD_STATIC_APPLICATION__=t TARGETS = bundle_creator.exe -#hmmm: these should be done with a USE_ZLIB macro. -ifeq "$(COMPILER)" "VISUAL_CPP" - LOCAL_HEADERS += $(THIRD_PARTY_DIR)/zlib/include - LOCAL_LIBRARIES += $(THIRD_PARTY_DIR)/zlib/lib - LIBS_USED += zlib.lib -else - LIBS_USED += z -endif +LIBS_USED += z include cpp/rules.def diff --git a/nucleus/applications/bundler/makefile.unpacker_stub b/nucleus/applications/bundler/makefile.unpacker_stub index ad646b9a..804177e4 100644 --- a/nucleus/applications/bundler/makefile.unpacker_stub +++ b/nucleus/applications/bundler/makefile.unpacker_stub @@ -14,17 +14,7 @@ TARGETS = unpacker_stub.exe LAST_TARGETS = show_makefilename OTHER_CLEANS = mocko -#hmmm: why on earth is this gunk not already available -# in some specialized vcpp variable? yuck! -ifeq "$(COMPILER)" "VISUAL_CPP" - LIBS_USED += libcmt.lib shlwapi.lib zlib.lib - LOAD_FLAG_PREFIX += -nodefaultlib:msvcrt.lib - COMPILER_FLAGS += -MT - LOCAL_HEADERS += $(THIRD_PARTY_DIR)/zlib/include - LOCAL_LIBRARIES += $(THIRD_PARTY_DIR)/zlib/lib -else - LIBS_USED += z -endif +LIBS_USED += z include cpp/rules.def diff --git a/nucleus/applications/bundler/unpacker_stub.cpp b/nucleus/applications/bundler/unpacker_stub.cpp index 87c6a766..a9de74af 100644 --- a/nucleus/applications/bundler/unpacker_stub.cpp +++ b/nucleus/applications/bundler/unpacker_stub.cpp @@ -40,15 +40,17 @@ #include #include #include -#ifdef __UNIX__ +//#ifdef __UNIX__ #include -#endif +//#endif +/* #ifdef _MSC_VER #include #include #include #include #endif +*/ using namespace application; using namespace basis; diff --git a/nucleus/library/algorithms/sorts.h b/nucleus/library/algorithms/sorts.h index c6e21abe..0b7cfc4b 100644 --- a/nucleus/library/algorithms/sorts.h +++ b/nucleus/library/algorithms/sorts.h @@ -18,6 +18,8 @@ #include +#include + namespace algorithms { /* diff --git a/nucleus/library/application/command_line.cpp b/nucleus/library/application/command_line.cpp index f132867f..2bc6dbfa 100644 --- a/nucleus/library/application/command_line.cpp +++ b/nucleus/library/application/command_line.cpp @@ -25,9 +25,6 @@ #include #include -#include -//temp - #undef LOG #define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s) @@ -70,17 +67,9 @@ command_parameter &command_parameter::operator = ////////////// // option_prefixes: the list of valid prefixes for options on a command line. -// these are the characters that precede command line arguments. For Unix, -// the default is a dash (-), while for DOS most programs use forward-slash -// (/). Adding more characters is trivial; just add a character to the list -// before the sentinel of '\0'. -#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__WIN32__) - static char option_prefixes[] = { '-', '/', '\0' }; -#elif defined(__UNIX__) - static char option_prefixes[] = { '-', '\0' }; -#else - #error "I don't know what kind of operating system this is." -#endif +// these are the characters that precede command line arguments. we have +// dropped any but the linux default of dash ('-'). +static char option_prefixes[] = { '-', '\0' }; bool it_is_a_prefix_char(char to_test) { @@ -121,10 +110,11 @@ command_line::command_line(const astring &full_line) astring accumulator; string_array string_list; bool in_quote = false; -//hmmm: this is not quote right yet. +//hmmm: this is not quite right yet. // use the separate command line method, but get it to run iteratively // so we can keep pulling them apart? maybe it already does! // separate is better because it handles escaped quotes. +//hmmm: does above complaint parse? what's not right yet? for (int i = 0; i < full_line.length(); i++) { char to_examine = full_line.get(i); if (to_examine == '"') { @@ -257,6 +247,7 @@ string_array command_line::get_command_line() // we don't need a long string to be parsed; the list is ready. return listo_cmds; } +/* #elif defined(_MSC_VER) // we have easy access to the original list of commands. for (int i = 0; i < _global_argc; i++) { @@ -264,6 +255,7 @@ string_array command_line::get_command_line() listo_cmds += _global_argv[i]; } return listo_cmds; +*/ #else COMPLAIN_CMDS("this OS doesn't support getting the command line."); return listo_cmds; diff --git a/nucleus/library/application/hoople_main.h b/nucleus/library/application/hoople_main.h index 3e670235..b920341c 100644 --- a/nucleus/library/application/hoople_main.h +++ b/nucleus/library/application/hoople_main.h @@ -69,6 +69,8 @@ namespace application { ////////////// +/* + * deprecated. #elif defined(_MSC_VER) // for win32 we need to support four different environments--console mode, // borland compilation, MFC programs and regular windows programs. @@ -102,6 +104,7 @@ namespace application { return to_run_obj.execute_application(); \ } #endif +*/ ////////////// diff --git a/nucleus/library/application/hoople_service.cpp b/nucleus/library/application/hoople_service.cpp index 1a7ea8d9..d8fa224e 100644 --- a/nucleus/library/application/hoople_service.cpp +++ b/nucleus/library/application/hoople_service.cpp @@ -112,13 +112,13 @@ bool hoople_service::close_application(const astring &app_name) // zap all of them using our signal. for (int i = 0; i < pids.length(); i++) { -//would linux be better served with sigterm also? -#ifndef _MSC_VER +//hmmm: would linux be better served with sigterm instead, like we used to do for windoze? +//#ifndef _MSC_VER kill(pids[i], SIGHUP); -#else -//lame--goes to whole program. - raise(SIGTERM); -#endif +//#else +////lame--goes to whole program. +// raise(SIGTERM); +//#endif //hmmm: check results... } @@ -150,15 +150,15 @@ bool hoople_service::setup(const astring &app_name, int timer_period) // setup signal handler for HUP signal. this is the one used to tell us // to leave. -#ifndef _MSC_VER +//#ifndef _MSC_VER signal(SIGHUP, handle_OS_signal); -#endif +//#endif // setup a handler for interrupt (e.g. ctrl-C) also. signal(SIGINT, handle_OS_signal); -#ifdef _MSC_VER - signal(SIGBREAK, handle_OS_signal); -#endif +//#ifdef _MSC_VER +// signal(SIGBREAK, handle_OS_signal); +//#endif return true; } diff --git a/nucleus/library/application/registry_config.cpp b/nucleus/library/application/registry_config.cpp index 9542f9e2..8d0b9cb1 100644 --- a/nucleus/library/application/registry_config.cpp +++ b/nucleus/library/application/registry_config.cpp @@ -12,6 +12,7 @@ #include "registry_config.h" +#include #include #include #include @@ -23,7 +24,7 @@ using namespace basis; using namespace filesystem; using namespace structures; -#ifdef _MSC_VER +#ifdef __WIN32__ // this implementation only works on windows currently. //hmmm: i suppose we could fake it with an ini file. @@ -50,8 +51,6 @@ const int MAXIMUM_NAME_SIZE = 16384; // the longest that value names can be in the registry. // a default we hope never to see in the registry. -//SAFE_STATIC_CONST(astring, registry_configurator::reg_str_fake_default, - // ("bogus_never_should_see")); const astring ®istry_configurator::reg_str_fake_default() { static astring _hidden = "bogus_never_should_see"; @@ -106,7 +105,7 @@ bool registry_configurator::put(const astring §ion_in, const astring &entry, if (!to_store.length()) return delete_entry(section, entry); else if (!section.length()) return false; -#ifdef _MSC_VER +#ifdef __WIN32__ HKEY key; long ret = RegOpenKeyEx((HKEY)translate_hive(_hive), to_unicode_temp(section), 0, KEY_WRITE, &key); @@ -145,7 +144,7 @@ bool registry_configurator::get(const astring §ion_in, const astring &entry, if (!section_in) return false; if (!entry) {} // not a problem. astring section = fix_section(section_in); -#ifdef _MSC_VER +#ifdef __WIN32__ HKEY key; long ret = RegOpenKeyEx((HKEY)translate_hive(_hive), to_unicode_temp(section), 0, KEY_QUERY_VALUE, &key); @@ -190,7 +189,7 @@ bool registry_configurator::get_section(const astring §ion_in, info.reset(); if (!section_in.length()) return false; astring section = fix_section(section_in); -#ifdef _MSC_VER +#ifdef __WIN32__ HKEY key; long ret = RegOpenKeyEx((HKEY)translate_hive(_hive), to_unicode_temp(section), 0, KEY_QUERY_VALUE, &key); @@ -233,7 +232,7 @@ bool registry_configurator::section_exists(const astring §ion_in) FUNCDEF("section_exists"); if (!section_in.length()) return false; astring section = fix_section(section_in); -#ifdef _MSC_VER +#ifdef __WIN32__ HKEY key; long ret = RegOpenKeyEx((HKEY)translate_hive(_hive), to_unicode_temp(section), 0, KEY_QUERY_VALUE, &key); @@ -254,7 +253,7 @@ bool registry_configurator::delete_section(const astring §ion_in) if (!section_in.length()) return false; astring section = fix_section(section_in); //if the key doesn't exist, should that be a failure? -#ifdef _MSC_VER +#ifdef __WIN32__ long ret = SHDeleteKey((HKEY)translate_hive(_hive), to_unicode_temp(section)); if (ret != ERROR_SUCCESS) { @@ -275,7 +274,7 @@ bool registry_configurator::delete_entry(const astring §ion_in, astring section = fix_section(section_in); if (!entry) {} // no problem. -#ifdef _MSC_VER +#ifdef __WIN32__ HKEY key; long ret = RegOpenKeyEx((HKEY)translate_hive(_hive), to_unicode_temp(section), 0, KEY_SET_VALUE, &key); diff --git a/nucleus/library/application/windoze_helper.h b/nucleus/library/application/windoze_helper.h index 071e0fcd..9a149a41 100644 --- a/nucleus/library/application/windoze_helper.h +++ b/nucleus/library/application/windoze_helper.h @@ -23,12 +23,12 @@ // gnarly headers that are needed for certain types of compilation... //unix headers not needed in here for new purpose of file. -#ifndef _MSC_VER +//#ifndef _MSC_VER #include #ifdef __GNU_WINDOWS__ #include #endif -#endif +//#endif #ifndef NO_XWINDOWS #ifdef __XWINDOWS__ #include @@ -45,9 +45,10 @@ // #undef FD_SETSIZE // #define FD_SETSIZE 1000 // if you don't set this, you can only select on a default of 64 sockets. - #include +// #include + // windows headers... - #define _WINSOCKAPI_ // make windows.h happy about winsock. +//noooo #define _WINSOCKAPI_ // make windows.h happy about winsock. #ifndef _AFXDLL // include ms-windows headers only if we're not doing mfc; mfc has its own // special way of including the headers. diff --git a/nucleus/library/basis/astring.cpp b/nucleus/library/basis/astring.cpp index b9ae54d0..3fdf4437 100644 --- a/nucleus/library/basis/astring.cpp +++ b/nucleus/library/basis/astring.cpp @@ -19,12 +19,14 @@ #include #include +/* #ifdef _MSC_VER #undef strcasecmp #undef strncasecmp #define strcasecmp strcmpi #define strncasecmp strnicmp #endif +*/ //#define DEBUG_STRING // uncomment for debugging version. diff --git a/nucleus/library/basis/definitions.h b/nucleus/library/basis/definitions.h index 8d022ab0..734fec00 100644 --- a/nucleus/library/basis/definitions.h +++ b/nucleus/library/basis/definitions.h @@ -64,6 +64,10 @@ typedef unsigned int un_int; typedef unsigned short un_short; //! Abbreviated name for unsigned long integers. typedef unsigned long un_long; +//! Abbreviated name for signed long integers. +typedef long int signed_long; +//! Abbreviated name for signed long long integers. +typedef long long signed_long_long; // some maximum and minimum values that are helpful. #ifndef MAXINT32 @@ -152,6 +156,7 @@ public: // compiler specific dumping ground for global settings... +/* #ifdef _MSC_VER // turns off annoying complaints from visual c++. #pragma warning(disable : 4251 4275 4003 4800 4355 4786 4290 4996 4407) @@ -176,6 +181,7 @@ public: // typedef long long __int64; //#define __SIZE_TYPE__ long unsigned int #endif // ms visual c++. +*/ ////////////// diff --git a/nucleus/library/basis/environment.cpp b/nucleus/library/basis/environment.cpp index 50d7042f..8549ab7a 100644 --- a/nucleus/library/basis/environment.cpp +++ b/nucleus/library/basis/environment.cpp @@ -17,10 +17,11 @@ #include #include -#ifndef _MSC_VER +//#ifndef _MSC_VER #include #include -#endif +//#endif +/* #ifdef _MSC_VER #define _WINSOCKAPI_ // make windows.h happy about winsock. // winsock support... @@ -31,6 +32,7 @@ #include #include #endif +*/ namespace basis { @@ -54,13 +56,13 @@ astring environment::TMP() astring environment::get(const astring &variable_name) { -#ifdef _MSC_VER - char *value = getenv(variable_name.upper().observe()); - // dos & os/2 require upper case for the name, so we just do it that way. -#else +//#ifdef _MSC_VER +// char *value = getenv(variable_name.upper().observe()); +// // dos & os/2 require upper case for the name, so we just do it that way. +//#else char *value = getenv(variable_name.observe()); // reasonable OSes support mixed-case environment variables. -#endif +//#endif astring to_return; if (value) to_return = astring(value); @@ -70,20 +72,20 @@ astring environment::get(const astring &variable_name) bool environment::set(const astring &variable_name, const astring &value) { int ret = 0; -#ifdef _MSC_VER - astring assignment = variable_name + "=" + value; - ret = _putenv(assignment.s()); -#else +//#ifdef _MSC_VER +// astring assignment = variable_name + "=" + value; +// ret = _putenv(assignment.s()); +//#else ret = setenv(variable_name.s(), value.s(), true); -#endif +//#endif return !ret; } basis::un_int environment::system_uptime() { -#ifdef _MSC_VER - return timeGetTime(); -#else +//#ifdef _MSC_VER +// return timeGetTime(); +//#else static clock_t __ctps = sysconf(_SC_CLK_TCK); // clock ticks per second. static const double __multiplier = 1000.0 / double(__ctps); // the multiplier gives us our full range for the tick counter. @@ -103,7 +105,7 @@ basis::un_int environment::system_uptime() // emulation) and thus it becomes a bug around 49 days and 17 hours into // OS uptime because the value gets stuck at 2^32-1 and never rolls over. return basis::un_int(ticks_up); -#endif +//#endif } } //namespace. diff --git a/nucleus/library/basis/mutex.cpp b/nucleus/library/basis/mutex.cpp index 3f19f7a5..fce0bed9 100644 --- a/nucleus/library/basis/mutex.cpp +++ b/nucleus/library/basis/mutex.cpp @@ -25,6 +25,8 @@ #include #endif #ifdef __WIN32__ + #include +/* #define _WINSOCKAPI_ // make windows.h happy about winsock. // winsock support... // #undef FD_SETSIZE @@ -32,6 +34,7 @@ // if you don't set this, you can only select on a default of 64 sockets. #include #include + */ #endif namespace basis { diff --git a/nucleus/library/basis/utf_conversion.h b/nucleus/library/basis/utf_conversion.h index 6b1185e0..084ae496 100644 --- a/nucleus/library/basis/utf_conversion.h +++ b/nucleus/library/basis/utf_conversion.h @@ -217,10 +217,10 @@ Booleano isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd); #define from_unicode_persist(name, s) null_transcoder name(s, true) #endif -#ifdef _MSC_VER - //! sends UTF-8 information to the diagnostic view in the IDE. - #define TRACE_PRINT(s) TRACE(_T("%s"), to_unicode_temp(s)) -#endif +//#ifdef _MSC_VER +// //! sends UTF-8 information to the diagnostic view in the IDE. +// #define TRACE_PRINT(s) TRACE(_T("%s"), to_unicode_temp(s)) +//#endif ////////////// @@ -316,6 +316,9 @@ public: operator char * () { return (char *)_converted; } operator const char * () const { return (const char *)_converted; } + operator astring() const { return astring((const char *)_converted); } + //!< converts the char pointer into an astring object. + private: bool _make_own_copy; const UTF8 *_converted; diff --git a/nucleus/library/configuration/application_configuration.cpp b/nucleus/library/configuration/application_configuration.cpp index d5ca0802..89670bce 100644 --- a/nucleus/library/configuration/application_configuration.cpp +++ b/nucleus/library/configuration/application_configuration.cpp @@ -24,19 +24,20 @@ #include #include #include +#include #ifdef __APPLE__ #include #include #endif -#ifdef _MSC_VER - #include - #include -#else +//#ifdef _MSC_VER +// #include +// #include +//#else #include #include #include -#endif +//#endif #include #include #include @@ -205,12 +206,14 @@ astring application_configuration::application_name() to_return = (char *)buffer; #elif defined(__UNIX__) || defined(__GNU_WINDOWS__) to_return = get_cmdline_from_proc(); +/* #elif defined(_MSC_VER) flexichar low_buff[MAX_ABS_PATH + 1]; GetModuleFileName(NULL_POINTER, low_buff, MAX_ABS_PATH - 1); astring buff = from_unicode_temp(low_buff); buff.to_lower(); // we lower-case the name since windows seems to UC it. to_return = buff; +*/ #else #pragma error("hmmm: no means of finding app name is implemented.") SET_BOGUS_NAME("not_implemented_for_this_OS"); @@ -218,7 +221,8 @@ astring application_configuration::application_name() return to_return; } -#if defined(__UNIX__) || defined(_MSC_VER) || defined(__GNU_WINDOWS__) +#if defined(__UNIX__) || defined(__GNU_WINDOWS__) +//defined(_MSC_VER) || basis::un_int application_configuration::process_id() { return getpid(); } #else #pragma error("hmmm: need process id implementation for this OS!") @@ -232,10 +236,10 @@ astring application_configuration::current_directory() char buff[MAX_ABS_PATH]; getcwd(buff, MAX_ABS_PATH - 1); to_return = buff; -#elif defined(_MSC_VER) - flexichar low_buff[MAX_ABS_PATH + 1]; - GetCurrentDirectory(MAX_ABS_PATH, low_buff); - to_return = from_unicode_temp(low_buff); +//#elif defined(_MSC_VER) +// flexichar low_buff[MAX_ABS_PATH + 1]; +// GetCurrentDirectory(MAX_ABS_PATH, low_buff); +// to_return = from_unicode_temp(low_buff); #else #pragma error("hmmm: need support for current directory on this OS.") to_return = "."; @@ -263,13 +267,13 @@ structures::version application_configuration::get_OS_version() utsname kernel_parms; uname(&kernel_parms); to_return = version(kernel_parms.release); -#elif defined(_MSC_VER) - OSVERSIONINFO info; - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - ::GetVersionEx(&info); - to_return = version(a_sprintf("%u.%u.%u.%u", basis::un_short(info.dwMajorVersion), - basis::un_short(info.dwMinorVersion), basis::un_short(info.dwPlatformId), - basis::un_short(info.dwBuildNumber))); +//#elif defined(_MSC_VER) +// OSVERSIONINFO info; +// info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); +// ::GetVersionEx(&info); +// to_return = version(a_sprintf("%u.%u.%u.%u", basis::un_short(info.dwMajorVersion), +// basis::un_short(info.dwMinorVersion), basis::un_short(info.dwPlatformId), +// basis::un_short(info.dwBuildNumber))); #else #pragma error("hmmm: need version info for this OS!") #endif @@ -290,6 +294,47 @@ const astring &application_configuration::GLOBAL_SECTION_NAME() { STATIC_STRING( const astring &application_configuration::LOGGING_FOLDER_NAME() { STATIC_STRING("LogPath"); } +//const astring &application_configuration::WINDOZE_VIRTUAL_ROOT_NAME() +//{ STATIC_STRING("VirtualUnixRoot"); } + +const astring &application_configuration::DEFAULT_VIRTUAL_UNIX_ROOT() +{ STATIC_STRING("c:/cygwin"); } + +////////////// + +// static storage for virtual unix root, if it's used. +// we don't expect it to change during runtime, right? that would be fubar. +// so we cache it once we retrieve it. +SAFE_STATIC(astring, static_root_holder, ) + +const astring &application_configuration::virtual_unix_root() +{ + // see if we already cached the root. it shouldn't change during runtime. + if (static_root_holder().length()) { + return static_root_holder(); + } +#ifdef __UNIX__ + // simple implementation for unix/linux; just tell the truth about the real root. + static_root_holder() = astring("/"); + return static_root_holder(); +#endif +#ifdef __WIN32__ + /* + use the path in our system helpers header, which should have been set during the + build process if this is really windows. + */ + astring virtual_root = FEISTY_MEOW_VIRTUAL_UNIX_ROOT; + if (!virtual_root) { + // if it has no length, we didn't get our setting! we'll limp along with a guess. + return DEFAULT_VIRTUAL_UNIX_ROOT(); + } else { + static_root_holder() = virtual_root; + return static_root_holder(); + } + +#endif +} + ////////////// ////const int MAX_LOG_PATH = 512; diff --git a/nucleus/library/configuration/application_configuration.h b/nucleus/library/configuration/application_configuration.h index bb829304..293f0fdb 100644 --- a/nucleus/library/configuration/application_configuration.h +++ b/nucleus/library/configuration/application_configuration.h @@ -74,9 +74,20 @@ public: //!< retrieves the core binary directory location from paths.ini. static basis::astring get_logging_directory(); - //!< returns the directory where log files will be stored. + //!< returns the folder where the log files for the feisty meow system are stored. + /*!< any log files should be written to this folder by the rest of the codebase, + unless there are special purposes for those log files. but logs from general + operation of feisty meow should be written in this directory. */ + + static const basis::astring &virtual_unix_root(); + //!< returns the path to the unix root, which may be simulated. + /*!< on unix, this will just return '/'. on win32 with cygwin installed, + this will return the cygwin path for '/' that was detected at build time. + this is often "c:/cygwin", which we use as a default if the path isn't + detected properly. */ // the following are key names within the main configuration file. + // not generally for external use. static const basis::astring &GLOBAL_SECTION_NAME(); //!< the root section name for our configuration items in the main ini file. @@ -86,15 +97,18 @@ public: to particular programs or subsystems should be contained in their own section. */ -/// static const basis::astring &LOCAL_FOLDER_NAME(); - //!< entry name in the config file that points at the installation root. - /*!< this is where all files for this product are stored on "this" machine. */ - static const basis::astring &LOGGING_FOLDER_NAME(); - //!< the location where the log files for the system are stored. - /*!< this is always considered to be a directory under the local folder. - the make_logfile_name() function (see below) can be used to create a - properly formed filename for logging. */ + //!< the tag used for finding our logging path in the paths config file. + + static const basis::astring &DEFAULT_VIRTUAL_UNIX_ROOT(); + //!< default value if we don't find our setting for virtual root. + /*!< this is bound to fail on many occasions if it's actually used on + windoze for the default, but if we don't have good information ready, + we can't just intuit the virtual unix root; we are not kreskin. the + virtual unix environment could be MSYS, Cygwin, or others. Currently, + if Cygwin is used during the build process, then the default should + never be needed. support for other systems will be added as time + permits and users clamor for them. */ // helper methods. diff --git a/nucleus/library/configuration/ini_configurator.cpp b/nucleus/library/configuration/ini_configurator.cpp index c5b2edf6..ece059ad 100644 --- a/nucleus/library/configuration/ini_configurator.cpp +++ b/nucleus/library/configuration/ini_configurator.cpp @@ -30,6 +30,8 @@ #include #include +#include + #undef LOG #define LOG(to_print) printf("%s::%s: %s\n", static_class_name(), func, astring(to_print).s()) @@ -57,7 +59,9 @@ ini_configurator::ini_configurator(const astring &ini_filename, _where(where), _add_spaces(false) { + FUNCDEF("constructor"); name(ini_filename); // set name properly. +//LOG(astring("calculated ini name as: '") + _ini_name->raw() + "'"); } ini_configurator::~ini_configurator() @@ -88,9 +92,9 @@ void ini_configurator::name(const astring &name) // that don't include a directory name. if (_where == OS_DIRECTORY) use_appdir = false; if (_where == ALL_USERS_DIRECTORY) use_appdir = false; -#ifdef _MSC_VER - use_appdir = true; -#endif +//#ifdef _MSC_VER +// use_appdir = true; +//#endif // we must create the filename if they specified no directory at all. if (!_ini_name->had_directory()) { if (use_appdir) { @@ -139,13 +143,13 @@ void ini_configurator::sections(string_array &list) //hmmm: refactor section_exists to use the sections call, if it's faser? bool ini_configurator::section_exists(const astring §ion) { -#ifdef _MSC_VER - string_table infos; - // heavy-weight call here... - return get_section(section, infos); -#else +//#ifdef _MSC_VER +// string_table infos; +// // heavy-weight call here... +// return get_section(section, infos); +//#else return _parser->section_exists(section); -#endif +//#endif } #if defined(__UNIX__) || defined(__GNU_WINDOWS__) @@ -200,28 +204,28 @@ void ini_configurator::write_ini_file() bool ini_configurator::delete_section(const astring §ion) { -#ifdef _MSC_VER - return put_profile_string(section, "", ""); -#else +//#ifdef _MSC_VER +// return put_profile_string(section, "", ""); +//#else // zap the section. bool to_return = _parser->delete_section(section); // schedule the file to write. write_ini_file(); return to_return; -#endif +//#endif } bool ini_configurator::delete_entry(const astring §ion, const astring &ent) { -#ifdef _MSC_VER - return put_profile_string(section, ent, ""); -#else +//#ifdef _MSC_VER +// return put_profile_string(section, ent, ""); +//#else // zap the entry. bool to_return = _parser->delete_entry(section, ent); // schedule the file to write. write_ini_file(); return to_return; -#endif +//#endif } bool ini_configurator::put(const astring §ion, const astring &entry, @@ -231,15 +235,15 @@ bool ini_configurator::put(const astring §ion, const astring &entry, if (!to_store.length()) return delete_entry(section, entry); else if (!entry.length()) return delete_section(section); else if (!section.length()) return false; -#ifdef _MSC_VER - return put_profile_string(section, entry, to_store); -#else +//#ifdef _MSC_VER +// return put_profile_string(section, entry, to_store); +//#else // write the entry. bool to_return = _parser->put(section, entry, to_store); // schedule file write. write_ini_file(); return to_return; -#endif +//#endif } bool ini_configurator::get(const astring §ion, const astring &entry, @@ -302,6 +306,7 @@ bool ini_configurator::get_section(const astring §ion, string_table &info) bool ini_configurator::put_section(const astring §ion, const string_table &info) { +/* #ifdef _MSC_VER variable_tokenizer parser("\1", "="); parser.table() = info; @@ -322,14 +327,16 @@ bool ini_configurator::put_section(const astring §ion, return WritePrivateProfileSection(to_unicode_temp(section), to_unicode_temp(flat), to_unicode_temp(name())); #else +*/ // write the section. bool to_return = _parser->put_section(section, info); // schedule file write. write_ini_file(); return to_return; -#endif +//#endif } +/* #ifdef _MSC_VER bool ini_configurator::put_profile_string(const astring §ion, const astring &entry, const astring &to_store) @@ -351,6 +358,7 @@ void ini_configurator::get_profile_string(const astring §ion, return_buffer, buffer_size, to_unicode_temp(name())); } #endif +*/ } //namespace. diff --git a/nucleus/library/configuration/ini_configurator.h b/nucleus/library/configuration/ini_configurator.h index cb58ccdb..076c2fe7 100644 --- a/nucleus/library/configuration/ini_configurator.h +++ b/nucleus/library/configuration/ini_configurator.h @@ -116,6 +116,7 @@ private: file_location_default _where; //!< where to find and store the file. bool _add_spaces; //!< tracks whether we're adding spaces around equals. +/* #ifdef _MSC_VER bool put_profile_string(const basis::astring §ion, const basis::astring &entry, const basis::astring &to_store); @@ -125,11 +126,12 @@ private: int buffer_size); //!< encapsulates windows' ini retrieval method. #else +*/ void read_ini_file(); //!< reads the INI file's contents into memory. void write_ini_file(); //!< store the current contents into the INI file. -#endif +//#endif // not to be called. ini_configurator(const ini_configurator &); diff --git a/nucleus/library/filesystem/directory.cpp b/nucleus/library/filesystem/directory.cpp index f1341e68..4f6dfc22 100644 --- a/nucleus/library/filesystem/directory.cpp +++ b/nucleus/library/filesystem/directory.cpp @@ -34,9 +34,9 @@ #include #include #endif -#ifdef _MSC_VER - #include -#endif +//#ifdef _MSC_VER +// #include +//#endif /* #ifdef __WIN32__ @@ -102,26 +102,26 @@ astring directory::absolute_path(const astring &rel_path) { char abs_path[MAX_ABS_PATH + 1]; abs_path[0] = '\0'; -#ifdef _MSC_VER - if (!_fullpath(abs_path, rel_path.s(), MAX_ABS_PATH)) return ""; - return abs_path; -#else +//#ifdef _MSC_VER +// if (!_fullpath(abs_path, rel_path.s(), MAX_ABS_PATH)) return ""; +// return abs_path; +//#else if (!realpath(rel_path.s(), abs_path)) return ""; return abs_path; -#endif +//#endif } astring directory::current() { astring to_return("."); // failure result. -#ifdef _MSC_VER - flexichar buffer[MAX_ABS_PATH + 1] = { '\0' }; - GetCurrentDirectory(MAX_ABS_PATH, buffer); - to_return = from_unicode_temp(buffer); -#else +//#ifdef _MSC_VER +// flexichar buffer[MAX_ABS_PATH + 1] = { '\0' }; +// GetCurrentDirectory(MAX_ABS_PATH, buffer); +// to_return = from_unicode_temp(buffer); +//#else char buffer[MAX_ABS_PATH + 1] = { '\0' }; if (realpath(".", buffer)) to_return = buffer; -#endif +//#endif return to_return; } @@ -152,6 +152,7 @@ bool directory::rescan() _folders->reset(); astring cur_dir = "."; astring par_dir = ".."; +/* #ifdef _MSC_VER // start reading the directory. WIN32_FIND_DATA wfd; @@ -196,6 +197,7 @@ bool directory::rescan() } while (FindNextFile(search_handle, &wfd)); FindClose(search_handle); #else +*/ DIR *dir = opendir(_path->s()); //hmmm: could check errno to determine what caused the problem. if (!dir) return false; @@ -224,7 +226,7 @@ bool directory::rescan() entry = readdir(dir); } closedir(dir); -#endif +//#endif shell_sort(_files->access(), _files->length()); shell_sort(_folders->access(), _folders->length()); diff --git a/nucleus/library/filesystem/filename.cpp b/nucleus/library/filesystem/filename.cpp index ed7b914a..843b286c 100644 --- a/nucleus/library/filesystem/filename.cpp +++ b/nucleus/library/filesystem/filename.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -42,13 +43,13 @@ class status_info : public stat namespace filesystem { -#if defined(__WIN32__) || defined(__VMS__) - const char DEFAULT_SEPARATOR = '\\'; -#elif defined(__UNIX__) +//#if defined(__WIN32__) || defined(__VMS__) +// const char DEFAULT_SEPARATOR = '\\'; +//#elif defined(__UNIX__) const char DEFAULT_SEPARATOR = '/'; -#else - #error "We have no idea what the default path separator is." -#endif +//#else +// #error "We have no idea what the default path separator is." +//#endif const char *NO_PARENT_DEFAULT = "."; // used when no directory name can be popped off. @@ -207,6 +208,7 @@ void filename::canonicalize() } else { //LOG(astring("path didn't match so left as: ") + *this); } + // now we convert msys... if ( (length() >= 2) && (get(0) == DEFAULT_SEPARATOR) && textual::parser_bits::is_alpha(get(1)) ) { @@ -227,6 +229,40 @@ void filename::canonicalize() //LOG(astring("turned msys string into: ") + *this); } } + + // if we still have a unix style path here on windows, then there will be + // trouble when we pass that to the OS. we are not using any cygwin or + // other virtualization libraries directly, so we can't rely on those to + // fix the path. but if we built under something like cygwin, we should + // have stored the real dos-style location of the virtual unix root. we + // will use that to replace the root '/' and this should fix most of that + // style of path. + bool inject_root = false; // assume we don't need to do anything. + +//LOG(astring("before root injection: ") + raw()); + + // condition here just checks if the path is only the root. + if ( (length() == 1) && separator(get(0)) ) { inject_root = true; } + +//if (inject_root) LOG("decided to inject root since path is '/'."); + + // condition is looking for first character being a slash, and second char as alphanumeric or dash or underscore. + // we will currently fail detecting freaky paths that don't start off with alphanumeric or one of that small set of special chars. + if ( (length() >= 2) + && separator(get(0)) + && ( textual::parser_bits::is_alphanumeric(get(1)) || ('-' == get(1)) || ('_' == get(1)) ) ) { + inject_root = true; +//if (inject_root) LOG(astring("decided to inject root since path is compatible: ") + *this); + } + +//LOG(astring("after second phase root injection: ") + raw()); + + if (inject_root) { + // inject the actual path to the unix root in front, if we know it. + // if we don't know it, then a default path that's unlikely to work is idiotically plugged in. + insert(0, FEISTY_MEOW_VIRTUAL_UNIX_ROOT); +//LOG(astring("turned cygdrive path string into: ") + raw()); + } #endif // we don't crop the last separator if the name's too small. for msdos diff --git a/nucleus/library/filesystem/filename.h b/nucleus/library/filesystem/filename.h index 06f7c254..c4820ed7 100644 --- a/nucleus/library/filesystem/filename.h +++ b/nucleus/library/filesystem/filename.h @@ -26,6 +26,17 @@ class status_info; //hmmm: this doesn't really belong here, does it... // define useful constant for filesystem path length. #ifndef MAX_ABS_PATH + #ifdef __WIN32__ + #define MAX_ABS_PATH MAX_PATH + #else + #ifdef __APPLE__ + #include + #else + #include + #endif + #define MAX_ABS_PATH PATH_MAX + #endif +/* #ifdef __WIN32__ // winsock support... // #undef FD_SETSIZE @@ -42,9 +53,9 @@ class status_info; #endif #define MAX_ABS_PATH PATH_MAX #endif +*/ #endif - namespace filesystem { //! Provides operations commonly needed on file names. diff --git a/nucleus/library/filesystem/huge_file.cpp b/nucleus/library/filesystem/huge_file.cpp index ae838295..5d8e7dc0 100644 --- a/nucleus/library/filesystem/huge_file.cpp +++ b/nucleus/library/filesystem/huge_file.cpp @@ -18,13 +18,14 @@ #include #include #include +#include #include -#ifndef __WIN32__ - #include -#else - #include -#endif +//#ifndef __WIN32__ +#include +//#else +// #include +//#endif #undef LOG #define LOG(to_print) printf("%s::%s: %s\n", static_class_name(), func, astring(to_print).s()) diff --git a/nucleus/library/loggers/critical_events.cpp b/nucleus/library/loggers/critical_events.cpp index a3002d13..ce955274 100644 --- a/nucleus/library/loggers/critical_events.cpp +++ b/nucleus/library/loggers/critical_events.cpp @@ -26,9 +26,7 @@ #include #include -#ifndef _MSC_VER - #include -#endif +#include using namespace basis; using namespace structures; @@ -56,8 +54,8 @@ basis::un_int critical_events::system_error() { #if defined(__UNIX__) || defined(__GNU_WINDOWS__) return errno; -#elif defined(_MSC_VER) - return GetLastError(); +//#elif defined(_MSC_VER) +// return GetLastError(); #else #pragma error("hmmm: no code for error number for this operating system") return 0; @@ -68,6 +66,7 @@ astring critical_events::system_error_text(basis::un_int to_name) { #if defined(__UNIX__) || defined(__GNU_WINDOWS__) return strerror(to_name); +/* #elif defined(_MSC_VER) char error_text[1000]; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL_POINTER, to_name, @@ -79,6 +78,7 @@ astring critical_events::system_error_text(basis::un_int to_name) || (to_return[to_return.end()] == '\n') ) to_return.zap(to_return.end(), to_return.end()); return to_return; +*/ #else #pragma error("hmmm: no code for error text for this operating system") return ""; diff --git a/nucleus/library/loggers/critical_events.h b/nucleus/library/loggers/critical_events.h index 86352c20..fd392ae5 100644 --- a/nucleus/library/loggers/critical_events.h +++ b/nucleus/library/loggers/critical_events.h @@ -20,9 +20,10 @@ namespace loggers { //! This macro wraps the notion of stopping in the debugger. -#ifndef _MSC_VER +//#ifndef _MSC_VER #define CAUSE_BREAKPOINT -//hmmm: need a unix equivalent for this. supporting gcc might be enough. +//hmmm: need a unix equivalent for this, see old below for doze? +/* #else #ifdef __MINGW32__ extern "C" { @@ -35,6 +36,7 @@ namespace loggers { #define CAUSE_BREAKPOINT __debugbreak() #endif #endif +*/ //! Tests the value "check" to ensure that it's not zero. /*! This can be used instead of an ASSERT macro to check conditions in diff --git a/nucleus/library/processes/ethread.cpp b/nucleus/library/processes/ethread.cpp index 33f0a90b..57d851ef 100644 --- a/nucleus/library/processes/ethread.cpp +++ b/nucleus/library/processes/ethread.cpp @@ -23,13 +23,13 @@ #include #include -#ifdef _MSC_VER - #include -#elif defined(__UNIX__) || defined(__GNU_WINDOWS__) +//#ifdef _MSC_VER +// #include +//#elif defined(__UNIX__) || defined(__GNU_WINDOWS__) #include -#else - #error unknown OS for thread support. -#endif +//#else + //#error unknown OS for thread support. +//#endif using namespace basis; using namespace loggers; @@ -89,11 +89,11 @@ ethread::ethread() _thread_active(false), _stop_thread(false), _data(NULL_POINTER), -#ifdef _MSC_VER - _handle(0), -#else +//#ifdef _MSC_VER +// _handle(0), +//#else _handle(new pthread_t), -#endif +//#endif _sleep_time(0), _periodic(false), _next_activation(new time_stamp), @@ -107,11 +107,11 @@ ethread::ethread(int sleep_timer, timed_thread_types how) _thread_active(false), _stop_thread(false), _data(NULL_POINTER), -#ifdef _MSC_VER - _handle(0), -#else +//#ifdef _MSC_VER +// _handle(0), +//#else _handle(new pthread_t), -#endif +//#endif _sleep_time(sleep_timer), _periodic(true), _next_activation(new time_stamp), @@ -127,9 +127,9 @@ ethread::~ethread() { stop(); WHACK(_next_activation); -#ifndef _MSC_VER +//#ifndef _MSC_VER WHACK(_handle); -#endif +//#endif } ///void ethread::pre_thread() {} @@ -155,7 +155,7 @@ bool ethread::start(void *thread_data) int error = 0; int attempts = 0; while (attempts++ < MAXIMUM_CREATE_ATTEMPTS) { -#ifndef _MSC_VER +//#ifndef _MSC_VER pthread_attr_t attribs; // special flags for creation of thread. int aret = pthread_attr_init(&attribs); if (aret) LOG("failed to init attribs."); @@ -170,6 +170,7 @@ bool ethread::start(void *thread_data) (void *)this); if (!ret) success = true; else error = ret; +/* #else if (_periodic) _handle = _beginthread(periodic_thread_driver, 0, (void *)this); @@ -178,6 +179,7 @@ bool ethread::start(void *thread_data) if (_handle != -1) success = true; else error = critical_events::system_error(); #endif +*/ if (success) break; // got it created. LOG("failed to create thread; trying again..."); time_control::sleep_ms(SNOOZE_FOR_RETRY); @@ -197,6 +199,7 @@ void ethread::stop() cancel(); // tell thread to leave. if (!thread_started()) return; // not running. while (!thread_finished()) { +/* #ifdef _MSC_VER int result = 0; if (!GetExitCodeThread((HANDLE)_handle, (LPDWORD)&result) @@ -205,6 +208,7 @@ void ethread::stop() break; } #endif +*/ time_control::sleep_ms(10); // wait for thread to leave. } } @@ -213,26 +217,26 @@ void ethread::exempt_stop() { _thread_active = false; _thread_ready = false; -#ifdef _MSC_VER - _handle = 0; -#endif +//#ifdef _MSC_VER +// _handle = 0; +//#endif } -#if defined(__UNIX__) || defined(__GNU_WINDOWS__) +//#if defined(__UNIX__) || defined(__GNU_WINDOWS__) void *ethread::one_shot_thread_driver(void *hidden_pointer) -#elif defined(_MSC_VER) -void ethread::one_shot_thread_driver(void *hidden_pointer) -#else -#error unknown thread signature. -#endif +//#elif defined(_MSC_VER) +//void ethread::one_shot_thread_driver(void *hidden_pointer) +//#else +//#error unknown thread signature. +//#endif { FUNCDEF("one_shot_thread_driver"); ethread *manager = (ethread *)hidden_pointer; -#ifndef _MSC_VER +//#ifndef _MSC_VER if (!manager) return NULL_POINTER; -#else - if (!manager) return; -#endif +//#else + //if (!manager) return; +//#endif #ifdef COUNT_THREADS _current_threads().increment(); #endif @@ -244,29 +248,29 @@ void ethread::one_shot_thread_driver(void *hidden_pointer) #ifdef COUNT_THREADS _current_threads().decrement(); #endif -#ifndef _MSC_VER +//#ifndef _MSC_VER pthread_exit(NULL_POINTER); return NULL_POINTER; -#else - _endthread(); -#endif +//#else + //_endthread(); +//#endif } -#if defined(__UNIX__) || defined(__GNU_WINDOWS__) +//#if defined(__UNIX__) || defined(__GNU_WINDOWS__) void *ethread::periodic_thread_driver(void *hidden_pointer) -#elif defined(_MSC_VER) -void ethread::periodic_thread_driver(void *hidden_pointer) -#else -#error unknown thread signature. -#endif +//#elif defined(_MSC_VER) +//void ethread::periodic_thread_driver(void *hidden_pointer) +//#else +//#error unknown thread signature. +//#endif { FUNCDEF("periodic_thread_driver"); ethread *manager = (ethread *)hidden_pointer; -#if defined(__UNIX__) || defined(__GNU_WINDOWS__) +//#if defined(__UNIX__) || defined(__GNU_WINDOWS__) if (!manager) return NULL_POINTER; -#elif defined(_MSC_VER) - if (!manager) return; -#endif +//#elif defined(_MSC_VER) +// if (!manager) return; +//#endif #ifdef COUNT_THREADS _current_threads().increment(); #endif @@ -316,12 +320,12 @@ void ethread::periodic_thread_driver(void *hidden_pointer) #ifdef COUNT_THREADS _current_threads().decrement(); #endif -#ifndef _MSC_VER +//#ifndef _MSC_VER pthread_exit(NULL_POINTER); return NULL_POINTER; -#else - _endthread(); -#endif +//#else + //_endthread(); +//#endif } } //namespace. diff --git a/nucleus/library/processes/ethread.h b/nucleus/library/processes/ethread.h index ddc11f84..64200f3a 100644 --- a/nucleus/library/processes/ethread.h +++ b/nucleus/library/processes/ethread.h @@ -148,24 +148,24 @@ private: bool _thread_active; //!< is the thread currently performing? bool _stop_thread; //!< true if the thread should stop now. void *_data; //!< holds the thread's link back to whatever. -#ifndef _MSC_VER +//#ifndef _MSC_VER pthread_t *_handle; //!< thread structure for our thread. -#else - uintptr_t _handle; //!< thread handle for the active thread, or zero. -#endif +//#else + //uintptr_t _handle; //!< thread handle for the active thread, or zero. +//#endif int _sleep_time; //!< threads perform at roughly this interval. bool _periodic; //!< true if this thread should run repeatedly. timely::time_stamp *_next_activation; //!< the next time perform_activity is called. timed_thread_types _how; //!< how is the period evaluated? // the OS level thread functions. -#ifndef _MSC_VER +//#ifndef _MSC_VER static void *periodic_thread_driver(void *hidden_pointer); static void *one_shot_thread_driver(void *hidden_pointer); -#else - static void periodic_thread_driver(void *hidden_pointer); - static void one_shot_thread_driver(void *hidden_pointer); -#endif +//#else + //static void periodic_thread_driver(void *hidden_pointer); + //static void one_shot_thread_driver(void *hidden_pointer); +//#endif // forbidden. ethread(const ethread &); diff --git a/nucleus/library/processes/launch_process.cpp b/nucleus/library/processes/launch_process.cpp index 45880744..db5822a8 100644 --- a/nucleus/library/processes/launch_process.cpp +++ b/nucleus/library/processes/launch_process.cpp @@ -22,16 +22,18 @@ #include #include -#ifndef _MSC_VER +//#ifndef _MSC_VER #include #include #include #include -#else +/* + * #else #include #include #include #endif +*/ //#define DEBUG_LAUNCH_PROCESS // uncomment for noisier debugging info. @@ -59,6 +61,7 @@ int_set __our_kids() { return __hidden_kids; } +/* #ifdef _MSC_VER bool launch_process::event_poll(MSG &message) { @@ -73,6 +76,7 @@ bool launch_process::event_poll(MSG &message) return true; } #endif +*/ #define SUPPORT_SHELL_EXECUTE // if this is not commented out, then the ShellExecute version of launch_ @@ -86,7 +90,7 @@ bool launch_process::event_poll(MSG &message) //const int MAXIMUM_COMMAND_LINE = 32 * KILOBYTE; // maximum command line that we'll deal with here. -#ifndef _MSC_VER +//#ifndef _MSC_VER void launch_process::exiting_child_signal_handler(int sig_num) { FUNCDEF("exiting_child_signal_handler"); @@ -111,7 +115,7 @@ void launch_process::exiting_child_signal_handler(int sig_num) } } } -#endif +//#endif //hmmm: this doesn't seem to account for quoting properly at all? char_star_array launch_process::break_line(astring &app, const astring ¶meters) @@ -171,7 +175,7 @@ basis::un_int launch_process::run(const astring &app_name_in, const astring &com app_name.insert(0, "\""); if (app_name[app_name.end()] != '"') app_name += "\""; -#if defined(__UNIX__) || defined(__GNU_WINDOWS__) +//#if defined(__UNIX__) || defined(__GNU_WINDOWS__) // unix / linux implementation. if (flag & RETURN_IMMEDIATELY) { // they want to get back right away. @@ -229,6 +233,7 @@ basis::un_int launch_process::run(const astring &app_name_in, const astring &com // assume they want to wait. return system((app_name + " " + command_line).s()); } +/* #elif defined(_MSC_VER) //checking on whether we have admin rights for the launch. @@ -337,6 +342,7 @@ basis::un_int launch_process::run(const astring &app_name_in, const astring &com #else #pragma error("hmmm: launch_process: no implementation for this OS.") #endif +*/ return 0; } diff --git a/nucleus/library/processes/launch_process.h b/nucleus/library/processes/launch_process.h index c13453d4..7abbe361 100644 --- a/nucleus/library/processes/launch_process.h +++ b/nucleus/library/processes/launch_process.h @@ -81,17 +81,19 @@ public: function. */ private: -#ifndef _MSC_VER +//#ifndef _MSC_VER static void exiting_child_signal_handler(int sig_num); //!< awaits the child processes rather than leaving process handles willy nilly. +/* #else static bool event_poll(tagMSG &message); //!< tries to process one win32 event and retrieve the "message" from it. - /*!< this is a very general poll and will retrieve any message that's + / *!< this is a very general poll and will retrieve any message that's available for the current thread. the message is actually processed here also, by calling translate and dispatch. the returned structure - is mainly interesting for knowing what was done. */ + is mainly interesting for knowing what was done. * / #endif +*/ }; diff --git a/nucleus/library/processes/process_control.cpp b/nucleus/library/processes/process_control.cpp index 04d2e0e2..27680f87 100644 --- a/nucleus/library/processes/process_control.cpp +++ b/nucleus/library/processes/process_control.cpp @@ -499,7 +499,7 @@ bool process_control::get_processes_with_toolhelp(process_entry_array &to_fill) } #endif // __WIN32__ -#ifndef _MSC_VER +//#ifndef _MSC_VER #define CLOSE_TEMPORARY_FILE { \ /* continuable_error("process_control", "get_processes_with_ps", error); */ \ @@ -594,7 +594,7 @@ LOG("failed to open process list file!"); } return true; } -#endif // __UNIX__ +//#endif // __UNIX__ } //namespace. diff --git a/nucleus/library/processes/process_control.h b/nucleus/library/processes/process_control.h index 350da8c6..f7a47c26 100644 --- a/nucleus/library/processes/process_control.h +++ b/nucleus/library/processes/process_control.h @@ -74,16 +74,17 @@ public: private: process_implementation_hider *_ptrs; //!< our OS baggage. -#ifndef _MSC_VER +//#ifndef _MSC_VER mathematics::chaos *_rando; //!< used for process list. -#else - bool _use_psapi; //!< true if we should be using the PSAPI on NT and family. -#endif +//#else + //bool _use_psapi; //!< true if we should be using the PSAPI on NT and family. +//#endif bool _healthy; //!< true if construction succeeded. -#ifndef _MSC_VER +//#ifndef _MSC_VER bool get_processes_with_ps(process_entry_array &to_fill); //!< asks the ps program what processes exist. +/* #else // fill in our function pointers to access the kernel functions appropriate // for either NT (psapi) or 9x (toolhelp). @@ -95,6 +96,7 @@ private: bool get_processes_with_toolhelp(process_entry_array &to_fill); //!< uses the toolhelp support for windows 9x, ME, 2000. #endif +*/ }; } //namespace. diff --git a/nucleus/library/security/makefile b/nucleus/library/security/makefile index 6b963307..9fb6d029 100644 --- a/nucleus/library/security/makefile +++ b/nucleus/library/security/makefile @@ -4,7 +4,7 @@ include cpp/variables.def PROJECT = security TYPE = library -ifeq "$(OP_SYSTEM)" "WIN32" +ifeq "$(OPERATING_SYSTEM)" "WIN32" SOURCE = nt_security.cpp win32_security.cpp windows_firewall.cpp endif TARGETS = security.lib diff --git a/nucleus/library/security/win32_security.cpp b/nucleus/library/security/win32_security.cpp index ab8226d1..e62a65c5 100644 --- a/nucleus/library/security/win32_security.cpp +++ b/nucleus/library/security/win32_security.cpp @@ -16,7 +16,7 @@ * Please send any updates to: fred@gruntose.com * \*****************************************************************************/ -#ifdef _MSC_VER +#ifdef __WIN32__ #include "win32_security.h" diff --git a/nucleus/library/structures/object_packers.cpp b/nucleus/library/structures/object_packers.cpp index 233ee8ad..37a7c5bc 100644 --- a/nucleus/library/structures/object_packers.cpp +++ b/nucleus/library/structures/object_packers.cpp @@ -110,6 +110,12 @@ void attach(byte_array &packed_form, int to_attach) bool detach(byte_array &packed_form, int &to_detach) { return detach(packed_form, (basis::un_int &)to_detach); } +void attach(byte_array &packed_form, signed_long to_attach) +{ attach(packed_form, basis::signed_long(to_attach)); } + +bool detach(byte_array &packed_form, signed_long &to_detach) +{ return detach(packed_form, (basis::signed_long &)to_detach); } + //void attach(byte_array &packed_form, basis::un_long to_attach) //{ attach(packed_form, basis::un_int(to_attach)); } diff --git a/nucleus/library/structures/object_packers.h b/nucleus/library/structures/object_packers.h index a26503e9..91bee7a3 100644 --- a/nucleus/library/structures/object_packers.h +++ b/nucleus/library/structures/object_packers.h @@ -25,6 +25,7 @@ namespace structures { const int PACKED_SIZE_BYTE = 1; const int PACKED_SIZE_INT16 = 2; const int PACKED_SIZE_INT32 = 4; +const int PACKED_SIZE_INT64 = 8; // these functions pack and unpack popular data types. @@ -70,6 +71,14 @@ void attach(basis::byte_array &packed_form, int to_attach); bool detach(basis::byte_array &packed_form, int &to_detach); //!< Unpacks an integer "to_attach" from "packed_form". +void attach(basis::byte_array &packed_form, long int to_attach); + //!< Packs an integer "to_attach" into "packed_form". + /*!< This method and the other simple numerical storage methods use a little + endian ordering of the bytes. They are platform independent with respect to + endianness and will reassemble the number properly on any platform. */ +bool detach(basis::byte_array &packed_form, long int &to_detach); + //!< Unpacks an integer "to_attach" from "packed_form". + void obscure_attach(basis::byte_array &packed_form, basis::un_int to_attach); //!< like the normal attach but shifts in some recognizable sentinel data. /*!< this is slightly more sure than a simple integer attachment. it can diff --git a/nucleus/library/tests_basis/test_string.cpp b/nucleus/library/tests_basis/test_string.cpp index 04c7f0d2..0eddf073 100644 --- a/nucleus/library/tests_basis/test_string.cpp +++ b/nucleus/library/tests_basis/test_string.cpp @@ -33,9 +33,9 @@ #include #include -#ifdef _MSC_VER - #include -#endif +//#ifdef _MSC_VER +// #include +//#endif #include #include #include diff --git a/nucleus/library/tests_crypto/makefile b/nucleus/library/tests_crypto/makefile index d7d3f49e..89e9b552 100644 --- a/nucleus/library/tests_crypto/makefile +++ b/nucleus/library/tests_crypto/makefile @@ -2,7 +2,8 @@ include cpp/variables.def PROJECT = tests_crypto TYPE = test -TARGETS = test_blowfish_crypto.exe test_rsa_crypto.exe +TARGETS = test_rsa_crypto.exe +#temporarily off! test_blowfish_crypto.exe LOCAL_LIBS_USED = unit_test crypto application processes loggers configuration textual timely \ filesystem structures basis USE_SSL = t diff --git a/nucleus/library/tests_crypto/test_blowfish_crypto.cpp b/nucleus/library/tests_crypto/test_blowfish_crypto.cpp index 2f2e0778..4ae10ecd 100644 --- a/nucleus/library/tests_crypto/test_blowfish_crypto.cpp +++ b/nucleus/library/tests_crypto/test_blowfish_crypto.cpp @@ -43,7 +43,7 @@ using namespace unit_test; #define LOG(to_print) EMERGENCY_LOG(program_wide_logger::get(), to_print) -//#define DEBUG_BLOWFISH +#define DEBUG_BLOWFISH // uncomment for noisier run. const int TEST_RUNS_PER_KEY = 5; // encryption test cycles done on each key. diff --git a/nucleus/library/tests_filesystem/test_filename.cpp b/nucleus/library/tests_filesystem/test_filename.cpp index c91c0320..92cf1eb4 100644 --- a/nucleus/library/tests_filesystem/test_filename.cpp +++ b/nucleus/library/tests_filesystem/test_filename.cpp @@ -16,15 +16,19 @@ #include #include #include +#include #include +#include #include #include #include #include +#include #include using namespace application; using namespace basis; +using namespace configuration; using namespace mathematics; using namespace filesystem; using namespace loggers; @@ -33,6 +37,8 @@ using namespace textual; using namespace timely; using namespace unit_test; +#define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s) + class test_filename : virtual public unit_base, public virtual application_shell { public: @@ -40,11 +46,103 @@ public: DEFINE_CLASS_NAME("test_filename"); virtual int execute(); void clean_sequel(astring &sequel); + astring virtual_root(); + void dump_string_array(const astring &title, const string_array &to_dump); + bool verify_equal_string_array(const astring &group, const string_array &exemplar, const string_array &acolyte); + bool prepare_string_arrays_for_filenames(const astring &common_bit, const astring &group, + bool &exemplar_rooted, string_array &exemplar_pieces, bool &acolyte_rooted, + string_array &acolyte_pieces); }; void test_filename::clean_sequel(astring &sequel) { sequel.replace_all('\\', '/'); } +astring test_filename::virtual_root() +{ + astring virt_root = application_configuration::virtual_unix_root(); + if (!!virt_root && !filename::separator(virt_root[virt_root.length() - 1])) { + // this is not terminated with a slash, which is possible for dosdows. + // we'll make it a reliable directory component by adding a slash. + virt_root += astring("/"); + } + return virt_root; +} + +void test_filename::dump_string_array(const astring &title, const string_array &to_dump) +{ + FUNCDEF("dump_string_array"); + LOG(title); + for (int i = 0; i < to_dump.length(); i++) { + LOG(a_sprintf("%d: '", i) + to_dump[i] + "'"); + } +} + +/* + due to some difference in behavior between the platforms, we need to turn + rooted paths that work perfectly find on unix systems into a bizarre messed + up c drive version for windows (based on the virtual unix system in place, + although only cygwin is currently supported). this assumes the virtual root + is available... we accomplish our testing a platform invariant way by by + simulating the same operations filename does, but using our exemplar paths + as the starting point. +*/ + +bool test_filename::verify_equal_string_array(const astring &group, const string_array &exemplar, const string_array &acolyte) +{ + FUNCDEF("verify_equal_string_array"); + +//temp debug +dump_string_array("exemplar", exemplar); +dump_string_array("acolyte", acolyte); + + // doing some extra assertions in here, to complain about what went wrong, but then we still need to return a success value. + ASSERT_EQUAL(exemplar.length(), acolyte.length(), group + "the list was the wrong length"); + if (exemplar.length() != acolyte.length()) { return false; } + + for (int indy = 0; indy < exemplar.length(); indy++) { + bool success = acolyte[indy].equal_to(exemplar[indy]); + ASSERT_TRUE(success, group + a_sprintf("piece %d did not match: ", indy) + "'" + + acolyte[indy] + "' vs expected '" + exemplar[indy] + "'"); + if (!success) { return false; } // fail fast. + } + return true; +} + +/* + helper method constructs string arrays for the filename with common_bit as + the portion after the root ('/'). the exemplar array is generated + independently from the acolyte string array to ensure that it is correctly + constructed (with a virtual root and then a non-rooted chunk). +*/ +bool test_filename::prepare_string_arrays_for_filenames(const astring &common_bit, const astring &group, + bool &exemplar_rooted, string_array &exemplar_pieces, + bool &acolyte_rooted, string_array &acolyte_pieces) +{ + FUNCDEF("prepare_string_arrays_for_filenames") + bool to_return = true; // success until we learn otherwise. + + // generate the acolyte, which will be tested again, very straightforwardly. + // it is a non-rooted string, so we just slap the virtual root in front. + filename acolyte_fn(virtual_root() + common_bit); + acolyte_fn.separate(acolyte_rooted, acolyte_pieces); + + // generate the exemplar without allowing filename to operate on the whole + // string. we get the virtual root first and operate on it as a filename, + // then we slap on the unrooted portion to get the unmanipulated form. + filename(virtual_root()).separate(exemplar_rooted, exemplar_pieces); + { + string_array common_pieces; + bool common_rooted; + filename(common_bit).separate(common_rooted, common_pieces); + ASSERT_FALSE(common_rooted, group + "the common_rooted value is erreonous"); + if (common_rooted) { to_return = false; } + // conjoin the rooty pieces with the common bits, hopefully hitting both platforms' sweet spots. + exemplar_pieces += common_pieces; + } + + return to_return; +} + int test_filename::execute() { FUNCDEF("execute") @@ -54,33 +152,35 @@ int test_filename::execute() ASSERT_FALSE(gorgeola.exists(), "an empty filename should not exist"); } + { // second test group. - astring GROUP = "separate-- "; - filename turkey("/omega/ralph/turkey/buzzard.txt"); - string_array pieces; - bool rooted; - turkey.separate(rooted, pieces); - ASSERT_TRUE(rooted, GROUP + "the rooted value is erreonous."); - ASSERT_TRUE(pieces[0].equal_to("omega"), GROUP + "the first piece didn't match."); - ASSERT_TRUE(pieces[1].equal_to("ralph"), GROUP + "the second piece didn't match."); - ASSERT_TRUE(pieces[2].equal_to("turkey"), GROUP + "the third piece didn't match."); - ASSERT_TRUE(pieces[3].equal_to("buzzard.txt"), GROUP + "the fourth piece didn't match."); - ASSERT_EQUAL(pieces.length(), 4, GROUP + "the list was the wrong length"); + + astring GROUP = "testing separate() "; + astring common_bit = "omega/ralph/turkey/buzzard.txt"; + string_array turkey_pieces; + bool turkey_rooted; + string_array exemplar_pieces; + bool exemplar_rooted; + bool worked = test_filename::prepare_string_arrays_for_filenames(common_bit, GROUP, + exemplar_rooted, exemplar_pieces, turkey_rooted, turkey_pieces); + + ASSERT_EQUAL(turkey_rooted, exemplar_rooted, GROUP + "the turkey_rooted value is erreonous."); + ASSERT_TRUE(verify_equal_string_array(GROUP, exemplar_pieces, turkey_pieces), "the turkey array differs from exemplar"); } { // third test group. astring GROUP = "third: test compare_prefix "; - filename turkey("/omega/ralph/turkey/buzzard.txt"); - filename murpin1("/omega"); - filename murpin2("/omega/ralph"); - filename murpin3("/omega/ralph/turkey"); - filename murpin4("/omega/ralph/turkey/buzzard.txt"); + filename turkey(virtual_root() + "omega/ralph/turkey/buzzard.txt"); + filename murpin1(virtual_root() + "omega"); + filename murpin2(virtual_root() + "omega/ralph"); + filename murpin3(virtual_root() + "omega/ralph/turkey"); + filename murpin4(virtual_root() + "omega/ralph/turkey/buzzard.txt"); filename murpin_x1("ralph/turkey/buzzard.txt"); - filename murpin_x2("/omega/ralph/turkey/buzzard.txt2"); - filename murpin_x3("/omega/turkey/buzzard.txt"); - filename murpin_x4("/omega/ralph/turkey/b0/buzzard.txt"); + filename murpin_x2(virtual_root() + "omega/ralph/turkey/buzzard.txt2"); + filename murpin_x3(virtual_root() + "omega/turkey/buzzard.txt"); + filename murpin_x4(virtual_root() + "omega/ralph/turkey/b0/buzzard.txt"); filename murpin_x5("moomega/ralph/turkey"); astring sequel; @@ -125,12 +225,12 @@ int test_filename::execute() { // fourth test group. astring GROUP = "fourth: test compare_suffix "; - filename turkey("/omega/ralph/turkey/buzzard.txt"); + filename turkey(virtual_root() + "omega/ralph/turkey/buzzard.txt"); filename murpin1("turkey\\buzzard.txt"); filename murpin2("turkey/buzzard.txt"); filename murpin3("ralph/turkey/buzzard.txt"); filename murpin4("omega/ralph/turkey/buzzard.txt"); - filename murpin5("/omega/ralph/turkey/buzzard.txt"); + filename murpin5(virtual_root() + "omega/ralph/turkey/buzzard.txt"); ASSERT_TRUE(murpin1.compare_suffix(turkey), GROUP + "compare 1 failed"); ASSERT_TRUE(murpin2.compare_suffix(turkey), GROUP + "compare 2 failed"); @@ -187,31 +287,34 @@ int test_filename::execute() test2.push("klemper"); ASSERT_EQUAL(test2, filename("c:/flug/blumen/klemper"), GROUP + "dpush 1 failed"); // test unix paths. - filename test3("/flug/blumen/klemper/smooden"); + filename test3(virtual_root() + "flug/blumen/klemper/smooden"); ASSERT_EQUAL(test3.basename(), astring("smooden"), GROUP + "basename 1 failed"); - ASSERT_EQUAL(test3.dirname(), filename("/flug/blumen/klemper"), + ASSERT_EQUAL(test3.dirname(), filename(virtual_root() + "flug/blumen/klemper"), GROUP + "u-dirname 1 failed"); filename test4 = test3; popped = test4.pop(); ASSERT_EQUAL(popped, astring("smooden"), GROUP + "upop 1 return failed"); - ASSERT_EQUAL(test4, filename("/flug/blumen/klemper"), GROUP + "upop 1 failed"); + ASSERT_EQUAL(test4, filename(virtual_root() + "flug/blumen/klemper"), GROUP + "upop 1 failed"); test4.pop(); test4.pop(); - ASSERT_EQUAL(test4, filename("/flug"), GROUP + "upop 2 failed"); + ASSERT_EQUAL(test4, filename(virtual_root() + "flug"), GROUP + "upop 2 failed"); popped = test4.pop(); - ASSERT_EQUAL(popped, astring("flug"), GROUP + "upop 1 return failed"); - ASSERT_EQUAL(test4, filename("/"), GROUP + "upop 3 failed"); + ASSERT_EQUAL(popped, astring("flug"), GROUP + "upop 2 return failed"); + ASSERT_EQUAL(test4, filename(virtual_root()), GROUP + "upop 3 failed"); test4.pop(); - ASSERT_EQUAL(test4, filename("/"), GROUP + "upop 3 failed"); + filename special_popped = filename(virtual_root()); + special_popped.pop(); + ASSERT_EQUAL(test4, special_popped, GROUP + "upop 4 failed"); + test4 = filename(virtual_root()); test4.push("flug"); test4.push("blumen"); test4.push("klemper"); - ASSERT_EQUAL(test4, filename("/flug/blumen/klemper"), GROUP + "upush 1 failed"); + ASSERT_EQUAL(test4, filename(virtual_root() + "flug/blumen/klemper"), GROUP + "upush 1 failed"); } { // seventh test group. astring GROUP = "seventh: testing pack and unpack "; - filename test1("/usr/local/athabasca"); + filename test1(virtual_root() + "usr/local/athabasca"); byte_array packed; int size_guess = test1.packed_size(); test1.pack(packed); @@ -223,43 +326,50 @@ int test_filename::execute() #ifdef __WIN32__ { // eighth test group is only for windows side. -//hmmm: might be nice to get the build machine launching this on a windows vm. astring GROUP = "eighth: cygwin and msys paths "; filename test1("/cygdrive/q/marbles"); - ASSERT_EQUAL(test1, astring("q:\\marbles"), GROUP + "test 1 failed"); + ASSERT_EQUAL(test1, astring("q:/marbles"), GROUP + "test 1 failed"); filename test2("/cygdrive/r"); - ASSERT_EQUAL(test2, astring("r:\\"), GROUP + "test 2 failed"); + ASSERT_EQUAL(test2, astring("r:/"), GROUP + "test 2 failed"); filename test3("/cygdrive/r/"); - ASSERT_EQUAL(test3, astring("r:\\"), GROUP + "test 3 failed"); + ASSERT_EQUAL(test3, astring("r:/"), GROUP + "test 3 failed"); + // this is a broken pattern, which we don't expect to resolve to a drive. filename test4("/cygdrive//"); - ASSERT_EQUAL(test4, astring("\\cygdrive"), GROUP + "test 4 failed"); + ASSERT_EQUAL(test4, virtual_root() + "cygdrive", GROUP + "test 4 failed"); + // another broken pattern. filename test5("/cygdrive/"); - ASSERT_EQUAL(test5, astring("\\cygdrive"), GROUP + "test 5 failed"); + ASSERT_EQUAL(test5, virtual_root() + "cygdrive", GROUP + "test 5 failed"); + // and one more. not great tests, but whatever. filename test6("/cygdrive"); - ASSERT_EQUAL(test6, astring("\\cygdrive"), GROUP + "test 6 failed"); - filename test7("/klaunspendle"); - ASSERT_EQUAL(test7, astring("\\klaunspendle"), GROUP + "test 7 failed"); + ASSERT_EQUAL(test6, virtual_root() + "cygdrive", GROUP + "test 6 failed"); + filename test7(virtual_root() + "klaunspendle"); + ASSERT_EQUAL(test7, astring(virtual_root() + "klaunspendle"), GROUP + "test 7 failed"); filename test8("z:/klaunspendle"); - ASSERT_EQUAL(test8, astring("z:\\klaunspendle"), GROUP + "test 8 failed"); + ASSERT_EQUAL(test8, astring("z:/klaunspendle"), GROUP + "test 8 failed"); filename test10("/q/borkage"); - ASSERT_EQUAL(test10, astring("q:\\borkage"), GROUP + "test 10 failed"); + ASSERT_EQUAL(test10, astring("q:/borkage"), GROUP + "test 10 failed"); filename test11("/q/r"); - ASSERT_EQUAL(test11, astring("q:\\r"), GROUP + "test 11 failed"); + ASSERT_EQUAL(test11, astring("q:/r"), GROUP + "test 11 failed"); filename test12("/q/r/"); - ASSERT_EQUAL(test12, astring("q:\\r"), GROUP + "test 12 failed"); + ASSERT_EQUAL(test12, astring("q:/r"), GROUP + "test 12 failed"); filename test13("/q/r/x"); - ASSERT_EQUAL(test13, astring("q:\\r\\x"), GROUP + "test 13 failed"); + ASSERT_EQUAL(test13, astring("q:/r/x"), GROUP + "test 13 failed"); filename test14("/r/"); - ASSERT_EQUAL(test14, astring("r:\\"), GROUP + "test 14 failed"); + ASSERT_EQUAL(test14, astring("r:/"), GROUP + "test 14 failed"); filename test15("/r"); - ASSERT_EQUAL(test15, astring("r:\\"), GROUP + "test 15 failed"); - filename test16("/"); - ASSERT_EQUAL(test16, astring("\\"), GROUP + "test 16 failed"); + ASSERT_EQUAL(test15, astring("r:/"), GROUP + "test 15 failed"); + + bool ex_rooted, ac_rooted; + string_array exemplar, acolyte; + ASSERT_TRUE(prepare_string_arrays_for_filenames(astring(""), GROUP, + ex_rooted, exemplar, ac_rooted, acolyte), GROUP + "test 16 failed prep"); + ASSERT_TRUE(verify_equal_string_array(GROUP, exemplar, acolyte), GROUP + "test 16 failed compare"); + filename test17("r/"); - ASSERT_EQUAL(test17, astring("r\\"), GROUP + "test 17 failed"); - filename test18("/kr/soop"); - ASSERT_EQUAL(test18, astring("\\kr\\soop"), GROUP + "test 18 failed"); + ASSERT_EQUAL(test17, astring("r/"), GROUP + "test 17 failed"); + filename test18(virtual_root() + "kr/soop"); + ASSERT_EQUAL(test18, astring(virtual_root() + "kr/soop"), GROUP + "test 18 failed"); } #endif diff --git a/nucleus/library/tests_structures/test_amorph.cpp b/nucleus/library/tests_structures/test_amorph.cpp index f6f66539..17998dd8 100644 --- a/nucleus/library/tests_structures/test_amorph.cpp +++ b/nucleus/library/tests_structures/test_amorph.cpp @@ -514,6 +514,7 @@ int test_amorph_of(const contents &bogus) } } } + return 0; } int t_amorph::execute() diff --git a/nucleus/library/tests_timely/test_earth_time.cpp b/nucleus/library/tests_timely/test_earth_time.cpp index 716a14b1..75b7770f 100644 --- a/nucleus/library/tests_timely/test_earth_time.cpp +++ b/nucleus/library/tests_timely/test_earth_time.cpp @@ -59,6 +59,7 @@ public: void run_test_01(); void run_test_02(); + void run_test_03(); }; ////////////// @@ -118,6 +119,22 @@ void test_earth_time::run_test_02() // test leap years // test lotso things. +} + +void test_earth_time::run_test_03() +{ + FUNCDEF("run_test_03"); + // test out the now and greenwich_now methods. + +//hmmm: what are some ways to test this? + + time_locus curr_now = now(); +LOG(astring("now() returned locus: ") + curr_now.text_form_long(clock_time::MILITARY, day_in_year::LONG_MONTH | day_in_year::INCLUDE_DAY, time_locus::LONG_YEAR)); + + time_locus curr_green = greenwich_now(); +LOG(astring("greenwich_now() returned locus: ") + curr_green.text_form_long(clock_time::MILITARY, day_in_year::LONG_MONTH | day_in_year::INCLUDE_DAY, time_locus::LONG_YEAR)); + + } int test_earth_time::execute() @@ -126,6 +143,7 @@ int test_earth_time::execute() run_test_01(); run_test_02(); + run_test_03(); return final_report(); } diff --git a/nucleus/library/textual/string_convert.h b/nucleus/library/textual/string_convert.h index a0e8ae08..117cdb6e 100644 --- a/nucleus/library/textual/string_convert.h +++ b/nucleus/library/textual/string_convert.h @@ -18,6 +18,7 @@ #include #include +/* #ifdef __WIN32__ #ifndef _MANAGED #define _WINSOCKAPI_ // the dance of the windows headers. @@ -32,6 +33,7 @@ #endif #endif #endif +*/ // forward. class _bstr_t; // ATL (Active Template Library) string type. diff --git a/nucleus/library/timely/earth_time.cpp b/nucleus/library/timely/earth_time.cpp index ed7c4583..4aa501f5 100644 --- a/nucleus/library/timely/earth_time.cpp +++ b/nucleus/library/timely/earth_time.cpp @@ -13,31 +13,49 @@ \*****************************************************************************/ #include "earth_time.h" +#include "time_stamp.h" #include #include +#include #include +#include #if defined(__WIN32__) || defined(__UNIX__) - #include +// #include #endif +#include + +// uncomment for noisy code. +//#define DEBUG_EARTH_TIME + using namespace basis; using namespace structures; +using namespace textual; namespace timely { -const int days_in_month[12] +#undef LOG +#ifdef DEBUG_EARTH_TIME + #define LOG(tpr) printf("%s", (astring("earth_time::") + func + ": " + tpr + parser_bits::platform_eol_to_chars()).s()) +#else + #define LOG(tpr) +#endif + +////////////// + +const time_number days_in_month[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; -const int leap_days_in_month[12] +const time_number leap_days_in_month[12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; -const int julian_days_in_month[12] +const time_number julian_days_in_month[12] = { 31, 29, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30 }; //hmmm: is this right? -const int julian_leap_days_in_month[12] +const time_number julian_leap_days_in_month[12] = { 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30 }; ////////////// @@ -95,16 +113,16 @@ void clock_time::text_form(astring &to_return, int how) const { if (!how) return; // enforce use of the default. if (how & MILITARY) - to_return += a_sprintf("%02d:%02d", hour, minute); + to_return += a_sprintf("%02ld:%02ld", hour, minute); else { - int uhr = hour; + time_number uhr = hour; if (uhr > 12) uhr -= 12; - to_return += a_sprintf("%2d:%02d", uhr, minute); + to_return += a_sprintf("%2ld:%02ld", uhr, minute); } if ( (how & SECONDS) || (how & MILLISECONDS) ) - to_return += a_sprintf(":%02d", second); + to_return += a_sprintf(":%02ld", second); if (how & MILLISECONDS) - to_return += a_sprintf(":%03d", millisecond); + to_return += a_sprintf(":%03ld", millisecond); if (how & MERIDIAN) { if (hour >= 12) to_return += "PM"; else to_return += "AM"; @@ -123,9 +141,9 @@ void clock_time::text_form(astring &to_return, int how) const val -= max * rolls; \ } else { rolls = 0; } -int clock_time::normalize(clock_time &to_fix) +time_number clock_time::normalize(clock_time &to_fix) { - int rolls = 0; // rollover counter. + time_number rolls = 0; // rollover counter. limit_value(to_fix.microsecond, 1000); to_fix.millisecond += rolls; limit_value(to_fix.millisecond, 1000); @@ -192,11 +210,11 @@ void day_in_year::text_form(astring &to_stuff, int how) const monat = month_name(month); //hmmm: more formatting, like euro? to_stuff += monat; - to_stuff += a_sprintf(" %02d", day_in_month); + to_stuff += a_sprintf(" %02ld", day_in_month); } // note: this only works when adjusting across one month, not multiples. -int limit_day_of_month(int &day, int days_in_month, int days_in_prev_month) +time_number limit_day_of_month(time_number &day, time_number days_in_month, time_number days_in_prev_month) { if (day > days_in_month) { day -= days_in_month; @@ -208,17 +226,17 @@ int limit_day_of_month(int &day, int days_in_month, int days_in_prev_month) return 0; // no rolling. } -int day_in_year::normalize(day_in_year &to_fix, bool leap_year) +time_number day_in_year::normalize(day_in_year &to_fix, bool leap_year) { - int rolls = 0; // rollover counter. - int daysinm = leap_year? + time_number rolls = 0; // rollover counter. + time_number daysinm = leap_year? leap_days_in_month[to_fix.month] : days_in_month[to_fix.month]; - int prev_month = to_fix.month - 1; + time_number prev_month = to_fix.month - 1; if (prev_month < 0) prev_month = 11; - int daysinpm = leap_year? + time_number daysinpm = leap_year? leap_days_in_month[prev_month] : days_in_month[prev_month]; rolls = limit_day_of_month(to_fix.day_in_month, daysinm, daysinpm); - int monat = to_fix.month + rolls; + time_number monat = to_fix.month + rolls; limit_value(monat, 12); // months are zero based. to_fix.month = months(monat); return rolls; @@ -278,17 +296,17 @@ void time_locus::text_form_long(astring &to_stuff, int t, int d, int y) const to_stuff += " "; // add the year. if (y & SHORT_YEAR) - to_stuff += a_sprintf("%2d", year % 100); + to_stuff += a_sprintf("%2ld", year % 100); else - to_stuff += a_sprintf("%4d", year); + to_stuff += a_sprintf("%4ld", year); // add the time. to_stuff += " "; clock_time::text_form(to_stuff, t); } -int time_locus::normalize(time_locus &to_fix) +time_number time_locus::normalize(time_locus &to_fix) { - int rolls = clock_time::normalize(to_fix); + time_number rolls = clock_time::normalize(to_fix); to_fix.day_in_month += rolls; //hmmm: this little gem should be abstracted to a method. @@ -305,39 +323,64 @@ int time_locus::normalize(time_locus &to_fix) ////////////// -time_locus convert(const tm &to_convert, int ms) +time_locus convert(time_number seconds, time_number useconds, + const tm &cal_values) { + FUNCDEF("convert"); time_locus r; - // we lack the resolution for this, currently. - r.microsecond = 0; - - r.second = to_convert.tm_sec; - r.minute = to_convert.tm_min; - r.hour = to_convert.tm_hour; - r.day_in_month = to_convert.tm_mday; - r.month = months(to_convert.tm_mon); - r.year = to_convert.tm_year + 1900; - r.day_of_week = days(to_convert.tm_wday); - r.day_of_year = to_convert.tm_yday; - r.millisecond = ms; + r.millisecond = useconds / 1000; + r.microsecond = useconds % 1000; + + r.hour = cal_values.tm_hour; + r.minute = cal_values.tm_min; + r.second = cal_values.tm_sec; + r.day_in_month = cal_values.tm_mday; + r.month = months(cal_values.tm_mon); + r.year = cal_values.tm_year + 1900; + r.day_of_week = days(cal_values.tm_wday); + r.day_of_year = cal_values.tm_yday; + + LOG(a_sprintf("convert() returning: %s\n", + r.text_form_long(clock_time::MILITARY, + day_in_year::LONG_MONTH | day_in_year::INCLUDE_DAY, + time_locus::LONG_YEAR).s())); + return r; } time_locus now() { - timeb current; - ftime(¤t); - tm split_time(*localtime(¤t.time)); - return convert(split_time, current.millitm); + FUNCDEF("now") + timeval currtime; + int okay = gettimeofday(&currtime, NULL_POINTER); + if (okay != 0) { + LOG("failed to gettimeofday!?"); + } + time_t currtime_secs = currtime.tv_sec; + struct tm result; + tm *tz_ptr = localtime_r(&currtime_secs, &result); + if (tz_ptr != &result) { + LOG("failed to get time for local area with localtime_r"); + } + return convert(currtime.tv_sec, currtime.tv_usec, result); } time_locus greenwich_now() { - timeb current; - ftime(¤t); - tm split_time(*gmtime(¤t.time)); - return convert(split_time, current.millitm); + FUNCDEF("greenwich_now") + timeval currtime; + int okay = gettimeofday(&currtime, NULL_POINTER); + if (okay != 0) { + LOG("failed to gettimeofday!?"); + } + time_t currtime_secs = currtime.tv_sec; + tm result; + tm *tz_ptr = gmtime_r(&currtime_secs, &result); + if (tz_ptr != &result) { + LOG("failed to get time for local area with gmtime_r"); + } + return convert(currtime.tv_sec, currtime.tv_usec, result); } clock_time time_now() { return now(); } @@ -346,7 +389,7 @@ days day_now() { return now().day_of_week; } months month_now() { return now().month; } -int year_now() { return now().year; } +time_number year_now() { return now().year; } day_in_year date_now() { return now(); } diff --git a/nucleus/library/timely/earth_time.h b/nucleus/library/timely/earth_time.h index 3b249413..74eaec7c 100644 --- a/nucleus/library/timely/earth_time.h +++ b/nucleus/library/timely/earth_time.h @@ -1,30 +1,35 @@ #ifndef EARTH_TIME_GROUP #define EARTH_TIME_GROUP -// Name : earth_time -// Author : Chris Koeritz -/****************************************************************************** -* Copyright (c) 1999-$now By Author. This program is free software; you can * -* redistribute it and/or modify it under the terms of the GNU General Public * -* License as published by the Free Software Foundation; either version 2 of * -* the License or (at your option) any later version. This is online at: * -* http://www.fsf.org/copyleft/gpl.html * -* Please send any updates to: fred@gruntose.com * -\*****************************************************************************/ +/* + Name : earth_time + Author : Chris Koeritz + + Copyright (c) 1999-$now By Author. This program is free software; you can + redistribute it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either version 2 of + the License or (at your option) any later version. This is online at: + http://www.fsf.org/copyleft/gpl.html + Please send any updates to: fred@gruntose.com +*/ #include #include #include +//#include #include +///#include + //! A set of methods for rendering calendrical and clock times. /*! It is based on the Gregorian calendar currently in use by the USA and other countries. */ - namespace timely { + typedef basis::signed_long time_number; + enum days { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY }; //!< The names of the days of the week. @@ -44,21 +49,24 @@ namespace timely { const char *short_month_name(months to_name); //!< Returns a shorter, constant-length (3 characters) month name. - extern const int days_in_month[12]; + extern const time_number days_in_month[12]; //!< The number of days in each month in the standard year. - extern const int leap_days_in_month[12]; + extern const time_number leap_days_in_month[12]; //!< The number of days in each month in a leap year. - extern const int julian_days_in_month[12]; + extern const time_number julian_days_in_month[12]; //!< Number of days in each month based on the julian calendar. - extern const int julian_leap_days_in_month[12]; + extern const time_number julian_leap_days_in_month[12]; //!< Number of days in each month of a leap year in the julian calendar. - const int SECONDS_IN_MINUTE = 60; //!< Number of seconds in one minute. - const int MINUTES_IN_HOUR = 60; //!< Number of minutes in an hour. - const int HOURS_IN_DAY = 24; //!< Number of hours in a day. - const int DAYS_IN_YEAR = 365; //!< Number of days in a standard year. - const int LEAP_DAYS_IN_YEAR = 366; //!< Number of days in a leap year. + const time_number SECONDS_IN_MINUTE = 60; //!< Number of seconds in one minute. + const time_number MINUTES_IN_HOUR = 60; //!< Number of minutes in an hour. + const time_number SECONDS_IN_HOUR = 3600; //!< Number of seconds in an hour. + const time_number HOURS_IN_DAY = 24; //!< Number of hours in a day. + const time_number MINUTES_IN_DAY = 1440; //!< Number of minutes in a day. + const time_number SECONDS_IN_DAY = 86400; //!< Number of seconds in a day. + const time_number DAYS_IN_YEAR = 365; //!< Number of days in a standard year. + const time_number LEAP_DAYS_IN_YEAR = 366; //!< Number of days in a leap year. const double APPROX_DAYS_IN_YEAR = 365.2424; //!< A more accurate measure of the number of days in a year. /*!< This is the more accurate mean length of time in 24 hour days between @@ -76,14 +84,14 @@ namespace timely { class clock_time : public virtual basis::packable { public: - int hour; //!< The hour represented in military time: 0 through 23. - int minute; //!< The number of minutes after the hour. - int second; //!< The number of seconds after the current minute. - int millisecond; //!< The number of milliseconds elapsed in this second. - int microsecond; //!< Number of microseconds elapsed in this millisecond. + time_number hour; //!< The hour represented in military time: 0 through 23. + time_number minute; //!< The number of minutes after the hour. + time_number second; //!< The number of seconds after the current minute. + time_number millisecond; //!< The number of milliseconds elapsed in this second. + time_number microsecond; //!< Number of microseconds elapsed in this millisecond. //! Constructs a clock_time object given all the parts. - clock_time(int h = 0, int m = 0, int s = 0, int ms = 0, int us = 0) + clock_time(time_number h = 0, time_number m = 0, time_number s = 0, time_number ms = 0, time_number us = 0) : hour(h), minute(m), second(s), millisecond(ms), microsecond(us) {} ~clock_time() {} @@ -117,7 +125,7 @@ namespace timely { /*!< note that "to_stuff" will be appended to; the existing contents are retained. */ - static int normalize(clock_time &to_fix); + static time_number normalize(clock_time &to_fix); // ensures that the units in each field are in the proper range by // promoting them upwards. if the clock_time goes above the maximum hour, // then it rolls around. zero is returned for no rollover or a positive @@ -131,15 +139,15 @@ namespace timely { { public: months month; //!< The current month. - int day_in_month; //!< The day number within the month (starting at one). + time_number day_in_month; //!< The day number within the month (starting at one). days day_of_week; //!< The day of the week. - int day_of_year; //!< Numerical day, where January 1st is equal to zero. + time_number day_of_year; //!< Numerical day, where January 1st is equal to zero. - int packed_size() const { return 4 * structures::PACKED_SIZE_INT32; } + int packed_size() const { return 4 * structures::PACKED_SIZE_INT64; } //! Constructs a representation of the day specified. - day_in_year(months m = JANUARY, int dim = 1, days dow = SUNDAY, - int day_o_year = 1) : month(m), day_in_month(dim), + day_in_year(months m = JANUARY, time_number dim = 1, days dow = SUNDAY, + time_number day_o_year = 1) : month(m), day_in_month(dim), day_of_week(dow), day_of_year(day_o_year) {} virtual void pack(basis::byte_array &packed_form) const; @@ -167,7 +175,7 @@ namespace timely { void text_form(basis::astring &to_stuff, int how = SHORT_MONTH) const; //!< Prints the day according to "how" and stores it in "to_stuff". - static int normalize(day_in_year &to_fix, bool leap_year = false); + static time_number normalize(day_in_year &to_fix, bool leap_year = false); //!< normalizes the day as needed and returns the adjustment in years. /*!< note that this only adjusts the day_in_month and month members currently. the other counters are not changed. */ @@ -179,14 +187,14 @@ namespace timely { public virtual basis::hoople_standard { public: - int year; //!< The year, using the gregorian calendar. + time_number year; //!< The year, using the gregorian calendar. time_locus() : clock_time(), day_in_year(), year() {} DEFINE_CLASS_NAME("time_locus"); //! Constructs a location in time given its components. - time_locus(const clock_time &ct, const day_in_year &ytd, int year_in) + time_locus(const clock_time &ct, const day_in_year &ytd, time_number year_in) : clock_time(ct), day_in_year(ytd), year(year_in) {} int packed_size() const { return clock_time::packed_size() @@ -225,12 +233,12 @@ namespace timely { int d = day_in_year::SHORT_MONTH, int y = LONG_YEAR) const; //! Same as text_form() above, but stores into "to_stuff". - static int normalize(time_locus &to_fix); + static time_number normalize(time_locus &to_fix); //!< normalizes the time_locus for its clock time and date. //hmmm: what are rollovers measured in? }; - int year_now(); //!< what year is it? + time_number year_now(); //!< what year is it? clock_time time_now(); //!< what time is it? day_in_year date_now(); //!< what day on the calendar is it? time_locus now(); //!< returns our current locus in the time continuum. diff --git a/nucleus/library/timely/time_stamp.cpp b/nucleus/library/timely/time_stamp.cpp index c24844a4..1cfdf0fd 100644 --- a/nucleus/library/timely/time_stamp.cpp +++ b/nucleus/library/timely/time_stamp.cpp @@ -15,15 +15,16 @@ #include "earth_time.h" #include "time_stamp.h" +#include #include #include #include #include -#ifdef __WIN32__ - #define _WINSOCKAPI_ // make windows.h happy about winsock. - #include // timeval. -#endif +//#ifdef __WIN32__ +// #define _WINSOCKAPI_ // make windows.h happy about winsock. +// #include // timeval. +//#endif //#define DEBUG_TIME_STAMP diff --git a/nucleus/library/timely/timer_driver.cpp b/nucleus/library/timely/timer_driver.cpp index b675c618..8b6a5fbd 100644 --- a/nucleus/library/timely/timer_driver.cpp +++ b/nucleus/library/timely/timer_driver.cpp @@ -32,11 +32,11 @@ using namespace processes; using namespace structures; using namespace timely; -//#define DEBUG_TIMER_DRIVER +#define DEBUG_TIMER_DRIVER // uncomment for noisy code. #undef LOG -#define LOG(tpr) printf( (time_stamp::notarize() + "timer_driver::" + func + tpr).s() ) +#define LOG(tpr) printf("%s", (time_stamp::notarize() + "timer_driver::" + func + tpr).s() ) namespace timely { @@ -102,7 +102,7 @@ void __stdcall timer_driver_private_handler(window_handle hwnd, basis::un_int ms if (true) { // unknown OS. #endif #ifdef DEBUG_TIMER_DRIVER - LOG(a_sprintf("unknown signal/message %x caught.", (void *)seen)); + LOG(a_sprintf("unknown signal/message %d caught.", seen)); #endif return; } @@ -214,9 +214,9 @@ timer_driver::~timer_driver() #endif } -#ifdef _MSC_VER -basis::un_int *timer_driver::real_timer_id() { return _real_timer_id; } -#endif +//#ifdef _MSC_VER +//basis::un_int *timer_driver::real_timer_id() { return _real_timer_id; } +//#endif bool timer_driver::zap_timer(timeable *to_remove) { @@ -404,10 +404,10 @@ void timer_driver::hookup_OS_timer(int duration) #ifdef DEBUG_TIMER_DRIVER LOG(a_sprintf("hooking next OS timer in %d ms.", duration)); #endif -#if defined(__UNIX__) || defined(__GNU_WINDOWS__) +//#if defined(__UNIX__) || defined(__GNU_WINDOWS__) // just make our thread hit after the duration specified. _prompter->reschedule(duration); -#elif defined(_MSC_VER) +/*#elif defined(_MSC_VER) int max_tries_left = 100; while (max_tries_left-- >= 0) { _real_timer_id = (basis::un_int *)SetTimer(NULL_POINTER, 0, duration, @@ -421,6 +421,7 @@ void timer_driver::hookup_OS_timer(int duration) break; // success hooking timer. } #endif +*/ } void timer_driver::unhook_OS_timer() @@ -428,12 +429,12 @@ void timer_driver::unhook_OS_timer() #ifdef DEBUG_TIMER_DRIVER FUNCDEF("unhook_OS_timer"); #endif -#if defined(__UNIX__) || defined(__GNU_WINDOWS__) +//#if defined(__UNIX__) || defined(__GNU_WINDOWS__) // postpone the thread for quite a while so we can take care of business. _prompter->reschedule(LONG_TIME); -#elif defined(_MSC_VER) - if (_real_timer_id) KillTimer(NULL_POINTER, (UINT_PTR)_real_timer_id); -#endif +//#elif defined(_MSC_VER) +// if (_real_timer_id) KillTimer(NULL_POINTER, (UINT_PTR)_real_timer_id); +//#endif #ifdef DEBUG_TIMER_DRIVER LOG("unhooked OS timer."); #endif diff --git a/nucleus/library/timely/timer_driver.h b/nucleus/library/timely/timer_driver.h index 1cf2932f..26875bae 100644 --- a/nucleus/library/timely/timer_driver.h +++ b/nucleus/library/timely/timer_driver.h @@ -69,10 +69,12 @@ public: // internal methods. +/* #if defined(_MSC_VER) basis::un_int *real_timer_id(); //!< provides the timer id for comparison on windows platforms. #endif +*/ void handle_system_timer(); //!< invoked by the OS timer support and must be called by main thread. diff --git a/nucleus/library/versions/version_checker.cpp b/nucleus/library/versions/version_checker.cpp index 70a8e2c4..9effe717 100644 --- a/nucleus/library/versions/version_checker.cpp +++ b/nucleus/library/versions/version_checker.cpp @@ -40,13 +40,12 @@ using namespace structures; #define __build_FILE_VERSION "108.420.1024.10008" #endif -#ifdef _MSC_VER - #include +#ifdef __WIN32__ +// #include #include #endif -#if defined(_MSC_VER) -//#ifdef __WIN32__ +#ifdef __WIN32__ // ensures that we handle the data properly regardless of unicode settings. #ifdef UNICODE #define render_ptr(ptr) from_unicode_temp( (UTF16 *) ptr) @@ -100,7 +99,7 @@ bool version_checker::good_version() const bool version_checker::loaded(const astring &library_file_name) { //#ifdef __WIN32__ -#if defined(_MSC_VER) +#if defined(__WIN32__) return bool(get_handle(library_file_name) != 0); #else //temp code. @@ -111,7 +110,7 @@ bool version_checker::loaded(const astring &library_file_name) void *version_checker::get_handle(const astring &library_file_name) { //#ifdef __WIN32__ -#if defined(_MSC_VER) +#if defined(__WIN32__) return GetModuleHandle(to_unicode_temp(library_file_name)); #else if (library_file_name.t()) return NULL_POINTER; else return NULL_POINTER; @@ -120,10 +119,11 @@ void *version_checker::get_handle(const astring &library_file_name) astring version_checker::module_name(const void *module_handle) { -#if defined(__UNIX__) || defined(__GNU_WINDOWS__) +#if defined(__UNIX__) +//|| defined(__GNU_WINDOWS__) if (module_handle) {} return application_configuration::application_name(); -#elif defined(_MSC_VER) +#elif defined(__WIN32__) //#elif defined(__WIN32__) flexichar low_buff[MAX_ABS_PATH + 1]; GetModuleFileName((HMODULE)module_handle, low_buff, MAX_ABS_PATH - 1); @@ -146,9 +146,9 @@ bool version_checker::retrieve_version_info(const astring &filename, // determine the required size of the version info buffer. int required_size; -#if defined(_MSC_VER) +#if defined(__WIN32__) //#ifdef __WIN32__ - un_long module_handle; // filled with the dll or exe handle. + DWORD module_handle; // filled with the dll or exe handle. required_size = GetFileVersionInfoSize(to_unicode_temp(filename), &module_handle); #else required_size = 0 && filename.t(); @@ -158,7 +158,7 @@ bool version_checker::retrieve_version_info(const astring &filename, // read the version info into our buffer. bool success = false; -#if defined(_MSC_VER) +#if defined(__WIN32__) //#ifdef __WIN32__ success = GetFileVersionInfo(to_unicode_temp(filename), module_handle, required_size, to_fill.access()); @@ -173,7 +173,7 @@ bool version_checker::get_language(byte_array &version_chunk, { high = 0; low = 0; -#if defined(_MSC_VER) +#if defined(__WIN32__) //#ifdef __WIN32__ // determine the language that the version's written in. basis::un_int data_size; @@ -197,7 +197,8 @@ bool version_checker::get_language(byte_array &version_chunk, version version_checker::retrieve_version(const astring &filename) { //#ifdef UNIX -#if defined(__UNIX__) || defined(__GNU_WINDOWS__) +#if defined(__UNIX__) +// || defined(__GNU_WINDOWS__) // totally bogus stand-in; this just returns the version we were built with // rather than the version that's actually tagged on the file. @@ -222,7 +223,7 @@ version version_checker::retrieve_version(const astring &filename) astring file_version_key(root_key + astring("\\FileVersion")); astring version_string; -#ifdef _MSC_VER +#ifdef __WIN32__ abyte *file_version_pointer; basis::un_int data_size; if (!VerQueryValue(version_info_found.access(), @@ -266,7 +267,7 @@ bool version_checker::get_record(const astring &filename, // the various version pieces are retrieved... //#ifdef __WIN32__ -#ifdef _MSC_VER +#ifdef __WIN32__ basis::un_int data_size; void *data_pointer; @@ -359,9 +360,10 @@ void version_checker::complain_wrong_version(const astring &library_file_name, to_show += astring("]. "); to_show += *_version_complaint; //#ifdef __UNIX__ -#if defined(__UNIX__) || defined(__GNU_WINDOWS__) +#if defined(__UNIX__) +//|| defined(__GNU_WINDOWS__) continuable_error("version checking", "failure", to_show.s()); -#elif defined(_MSC_VER) +#elif defined(__WIN32__) MessageBox(0, to_unicode_temp(to_show), to_unicode_temp("version_checking::failure"), MB_OK); #endif diff --git a/nucleus/makefile b/nucleus/makefile index 65b0bbd0..9a2fd10b 100644 --- a/nucleus/makefile +++ b/nucleus/makefile @@ -41,12 +41,12 @@ if [ $$? -ne 0 ]; then \ echo build failure while copying paths initialization file.; \ exit 1; \ fi; \ -bash $(BUILD_SCRIPTS_PATH)/wrapdoze.sh $(CLAM_BINARIES)/value_tagger$(EXE_END) $(PRODUCTION_STORE)/codescan.ini; \ +$(CLAM_BINARIES)/value_tagger$(EXE_END) $(PRODUCTION_STORE)/codescan.ini; \ if [ $$? -ne 0 ]; then \ echo build failure during value tagging.; \ exit 1; \ fi; \ -bash $(BUILD_SCRIPTS_PATH)/wrapdoze.sh $(CLAM_BINARIES)/write_build_config$(EXE_END); \ +$(CLAM_BINARIES)/write_build_config$(EXE_END); \ if [ $$? -ne 0 ]; then \ echo build failure while writing config.; \ exit 1; \ diff --git a/nucleus/tools/dependency_tool/CMakeLists.txt b/nucleus/tools/dependency_tool/CMakeLists.txt new file mode 100644 index 00000000..667c9481 --- /dev/null +++ b/nucleus/tools/dependency_tool/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.20) +project(makedep) +add_executable(makedep makedep.cpp) diff --git a/nucleus/tools/dependency_tool/include.cpp b/nucleus/tools/dependency_tool/include.cpp index 08ade608..631027b7 100644 --- a/nucleus/tools/dependency_tool/include.cpp +++ b/nucleus/tools/dependency_tool/include.cpp @@ -34,12 +34,12 @@ in this Software without prior written authorization from the X Consortium. #include -#ifdef _MSC_VER - #undef strcasecmp - #undef strncasecmp - #define strcasecmp strcmpi - #define strncasecmp strnicmp -#endif +//#ifdef _MSC_VER +// #undef strcasecmp +// #undef strncasecmp +// #define strcasecmp strcmpi +// #define strncasecmp strnicmp +//#endif extern inclist inc_list[MAXFILES], *inclistp; extern char *includedirs[ ]; diff --git a/nucleus/tools/dependency_tool/makedep.cpp b/nucleus/tools/dependency_tool/makedep.cpp index a2475e25..f85e219a 100644 --- a/nucleus/tools/dependency_tool/makedep.cpp +++ b/nucleus/tools/dependency_tool/makedep.cpp @@ -33,11 +33,11 @@ in this Software without prior written authorization from the X Consortium. #include "def.h" -#ifdef _MSC_VER -#include -#else +//#ifdef _MSC_VER +//#include +//#else #include -#endif +//#endif #include #include diff --git a/nucleus/tools/dependency_tool/makefile b/nucleus/tools/dependency_tool/makefile index 14967053..326810f1 100644 --- a/nucleus/tools/dependency_tool/makefile +++ b/nucleus/tools/dependency_tool/makefile @@ -8,7 +8,7 @@ PROJECT = dependency_tool TYPE = application SOURCE = cppsetup.cpp ifparser.cpp include.cpp parse.cpp pr.cpp #DEFINITIONS += __BUILD_STATIC_APPLICATION__ -ifeq "$(OP_SYSTEM)" "WIN32" +ifeq "$(OPERATING_SYSTEM)" "WIN32" SOURCE += makedep_version.rc endif TARGETS = makedep.exe diff --git a/nucleus/tools/simple_utilities/create_guid.cpp b/nucleus/tools/simple_utilities/create_guid.cpp index 942925de..c473c778 100644 --- a/nucleus/tools/simple_utilities/create_guid.cpp +++ b/nucleus/tools/simple_utilities/create_guid.cpp @@ -27,7 +27,12 @@ #include #include -#ifdef _MSC_VER +#ifdef __WIN32__ +// #define DO_GUIDS +//hmmm: currently disabled due to problems compiling in cygwin using this header; complains about new.h being missing. +#endif + +#ifdef DO_GUIDS #include #endif @@ -59,8 +64,7 @@ int create_guid::execute() { FUNCDEF("execute"); SETUP_CONSOLE_LOGGER; -#if defined(__UNIX__) || defined(__GNU_WINDOWS__) - +#ifndef DO_GUIDS // this is completely bogus for the time being. it just produces a random // number rather than a guid. #define add_random \ @@ -77,7 +81,7 @@ int create_guid::execute() for (int i = 0; i < 8; i++) add_random; faux_guid += "}"; BASE_LOG(faux_guid.lower()); -#elif defined (_MSC_VER) +#elif defined (DO_GUIDS) GUID guid; CoCreateGuid(&guid); const int BUFFER_SIZE = 1024; diff --git a/nucleus/tools/simple_utilities/makefile b/nucleus/tools/simple_utilities/makefile index 5983fae5..864160ab 100644 --- a/nucleus/tools/simple_utilities/makefile +++ b/nucleus/tools/simple_utilities/makefile @@ -10,19 +10,11 @@ TARGETS = create_guid.exe playsound.exe short_path.exe sleep_ms.exe \ ifeq "$(OMIT_VERSIONS)" "" SOURCE += simple_utils_version.rc endif +ifeq "$(OPERATING_SYSTEM)" "WIN32" + LIBS_USED += winmm +endif DEFINITIONS += __BUILD_STATIC_APPLICATION__ UNDEFINITIONS += ENABLE_MEMORY_HOOK ENABLE_CALLSTACK_TRACKING -ifeq "$(COMPILER)" "VISUAL_CPP" - # static C runtime support... -#hmmm: resurrect this as a particular build type, so makefiles don't need to know this... - COMPILER_FLAGS += -MT - LIBS_USED += netapi32.lib - ifeq "$(DEBUG)" "" - LIBS_USED += libcmt.lib - else - LIBS_USED += libcmtd.lib - endif -endif include cpp/rules.def diff --git a/nucleus/tools/simple_utilities/playsound.cpp b/nucleus/tools/simple_utilities/playsound.cpp index d8fe12b1..76b4b1d4 100644 --- a/nucleus/tools/simple_utilities/playsound.cpp +++ b/nucleus/tools/simple_utilities/playsound.cpp @@ -26,7 +26,7 @@ #include #include -#ifdef _MSC_VER +#ifdef __WIN32__ #include #endif @@ -47,12 +47,17 @@ int main(int argc, char *argv[]) return 12; } for (int i = 1; i < argc; i++) { -// out.log(astring(astring::SPRINTF, "soundfile %d: %s", i, argv[i])); -#ifdef _MSC_VER - if (!PlaySound(to_unicode_temp(argv[i]), NULL_POINTER, SND_FILENAME)) - out.log(astring("failed to play ") + argv[i], ALWAYS_PRINT); + astring sound_file = argv[i]; +out.log(a_sprintf("soundfile %d: %s", i, sound_file.s()), ALWAYS_PRINT); + if (sound_file.ends(".mp3")) { + out.log(astring("skipping MP3 file ") + sound_file, ALWAYS_PRINT); + continue; + } +#ifdef __WIN32__ + if (!PlaySound(to_unicode_temp(sound_file), NULL_POINTER, SND_FILENAME)) + out.log(astring("failed to play ") + sound_file, ALWAYS_PRINT); #else - out.log(astring("this program is a NO-OP, ignoring ") + argv[i], ALWAYS_PRINT); + out.log(astring("this program is a NO-OP, ignoring ") + sound_file, ALWAYS_PRINT); #endif } return 0; diff --git a/octopi/library/sockets/raw_socket.cpp b/octopi/library/sockets/raw_socket.cpp index 6fb3d6ea..af77fd64 100644 --- a/octopi/library/sockets/raw_socket.cpp +++ b/octopi/library/sockets/raw_socket.cpp @@ -24,7 +24,7 @@ #ifdef __APPLE__ #include #endif -#ifdef __UNIX__ +//#ifdef __UNIX__ #include #include #include @@ -32,10 +32,10 @@ #include #include #define OPTYPE (void *) -#endif -#ifdef __WIN32__ - #define OPTYPE (char *) -#endif +//#endif +//#ifdef __WIN32__ +// #define OPTYPE (char *) +//#endif using namespace basis; using namespace loggers; @@ -61,8 +61,8 @@ class fd_set_wrapper : public fd_set {}; const basis::un_int NON_BLOCKING = FIONBIO; const basis::un_int IOCTL_READ = FIONREAD; -#ifdef __WIN32__ /* +#ifdef __WIN32__ // defined by winsock header but not present in the winsock dll. int PASCAL FAR __WSAFDIsSet(SOCKET fd, fd_set FAR *the_set) { @@ -72,8 +72,8 @@ int PASCAL FAR __WSAFDIsSet(SOCKET fd, fd_set FAR *the_set) return true; return false; } -*/ #endif +*/ ////////////// @@ -89,12 +89,12 @@ raw_socket::~raw_socket() int raw_socket::close(basis::un_int &socket) { int to_return = 0; -#ifdef __WIN32__ - to_return = closesocket(socket); -#endif -#ifdef __UNIX__ +//#ifdef __WIN32__ +// to_return = closesocket(socket); +//#endif +//#ifdef __UNIX__ to_return = ::close(socket); -#endif +//#endif socket = 0; return to_return; } @@ -122,8 +122,9 @@ astring raw_socket::interest_name(int interest) int raw_socket::ioctl(basis::un_int socket, int request, void *argp) const { -#ifdef __UNIX__ +//#ifdef __UNIX__ return ::ioctl(socket, request, argp); + /* #endif #ifdef __WIN32__ #ifdef _MSC_VER @@ -132,6 +133,7 @@ int raw_socket::ioctl(basis::un_int socket, int request, void *argp) const return ioctlsocket(socket, request, (un_int *)argp); #endif #endif +*/ } bool raw_socket::set_non_blocking(basis::un_int socket, bool non_blocking) @@ -224,14 +226,16 @@ int raw_socket::inner_select(basis::un_int socket, int mode, int timeout, timeval base_time_out; time_stamp::fill_timeval_ms(base_time_out, timeout); // timeval has tv_sec=seconds, tv_usec=microseconds. -#if !defined(__GNU_WINDOWS__) +//#if !defined(__GNU_WINDOWS__) timeval *time_out = &base_time_out; + /* #elif defined(__GNU_WINDOWS__) __ms_timeval win_time_out; win_time_out.tv_sec = base_time_out.tv_sec; win_time_out.tv_usec = base_time_out.tv_usec; __ms_timeval *time_out = &win_time_out; #endif +*/ // select will tell us about the socket. int ret = ::select(socket + 1, @@ -248,9 +252,9 @@ int raw_socket::inner_select(basis::un_int socket, int mode, int timeout, case SOCK_ENETDOWN: // intentional fall-through. case SOCK_EINVAL: // intentional fall-through. case SOCK_EINTR: // intentional fall-through. -#ifdef __WIN32__ +/* #ifdef __WIN32__ case SOCK_NOTINITIALISED: // intentional fall-through. -#endif +#endif */ case SOCK_ENOTSOCK: break; @@ -404,14 +408,15 @@ int raw_socket::select(int_array &read_sox, int_array &write_sox, timeval base_time_out; time_stamp::fill_timeval_ms(base_time_out, timeout); // timeval has tv_sec=seconds, tv_usec=microseconds. -#if !defined(__GNU_WINDOWS__) +//#if !defined(__GNU_WINDOWS__) timeval *time_out = &base_time_out; -#elif defined(__GNU_WINDOWS__) +/*#elif defined(__GNU_WINDOWS__) __ms_timeval win_time_out; win_time_out.tv_sec = base_time_out.tv_sec; win_time_out.tv_usec = base_time_out.tv_usec; __ms_timeval *time_out = &win_time_out; #endif +*/ // select will tell us about the socket. int ret = ::select(highest + 1, @@ -427,9 +432,9 @@ int raw_socket::select(int_array &read_sox, int_array &write_sox, case SOCK_ENETDOWN: // intentional fall-through. case SOCK_EINVAL: // intentional fall-through. case SOCK_EINTR: // intentional fall-through. -#ifdef __WIN32__ +/*#ifdef __WIN32__ case SOCK_NOTINITIALISED: // intentional fall-through. -#endif +#endif*/ case SOCK_ENOTSOCK: break; diff --git a/octopi/library/sockets/raw_socket.h b/octopi/library/sockets/raw_socket.h index 99e94898..44314eeb 100644 --- a/octopi/library/sockets/raw_socket.h +++ b/octopi/library/sockets/raw_socket.h @@ -148,6 +148,7 @@ private: ////////////// +/* wow, an ancient screw-up, leaving these in here after they were abstracted to tcpip_definitions.h; yargh. #ifdef __UNIX__ // provide some unifying definitions. #define INVALID_SOCKET -1 @@ -262,6 +263,7 @@ private: #define SOCK_TRY_AGAIN WSATRY_AGAIN #define SOCK_VERNOTSUPPORTED WSAVERNOTSUPPORTED #endif //win32. +*/ ////////////// diff --git a/octopi/library/sockets/socket_minder.cpp b/octopi/library/sockets/socket_minder.cpp index e4fc5511..8c7036bd 100644 --- a/octopi/library/sockets/socket_minder.cpp +++ b/octopi/library/sockets/socket_minder.cpp @@ -28,13 +28,14 @@ #include #include -#ifdef __WIN32__ +/*#ifdef __WIN32__ #include #endif #ifdef __UNIX__ +*/ #include #include -#endif +//#endif using namespace basis; using namespace loggers; diff --git a/octopi/library/sockets/spocket.cpp b/octopi/library/sockets/spocket.cpp index 0580b1f1..c73158aa 100644 --- a/octopi/library/sockets/spocket.cpp +++ b/octopi/library/sockets/spocket.cpp @@ -27,7 +27,8 @@ #include #include -#ifdef __UNIX__ +//hmmm: put this bag o headers into a similar thing to windoze helper. maybe just have an os_helper file that combines both? +//#ifdef __UNIX__ #include #include #include @@ -38,7 +39,7 @@ #include #include #include -#endif +//#endif using namespace basis; using namespace loggers; @@ -76,6 +77,7 @@ const int RESOLVE_INTERVAL = 300; #define CHECK_BOGUS(retval) \ if (is_bogus()) { return retval; /* this spocket is junk. */ } +/* #undef GRAB_LOCK #ifdef __WIN32__ // win32 seems to trip over selects unless we protect them. @@ -86,10 +88,13 @@ const int RESOLVE_INTERVAL = 300; #else #define GRAB_LOCK #endif +*/ + #define GRAB_LOCK -#ifdef __UNIX__ + +//#ifdef __UNIX__ SAFE_STATIC(mutex, __broken_pipe_synch, ) -#endif +//#endif spocket::spocket(const internet_address &where, sock_types type) : _type(type), diff --git a/octopi/library/sockets/tcpip_definitions.h b/octopi/library/sockets/tcpip_definitions.h index 6a149210..e6f6cca2 100644 --- a/octopi/library/sockets/tcpip_definitions.h +++ b/octopi/library/sockets/tcpip_definitions.h @@ -19,12 +19,18 @@ * Please send any updates to: fred@gruntose.com * \*****************************************************************************/ -///#include "sockets_dll.h" +#include -#ifdef __UNIX__ - // provide some unifying definitions. - #define INVALID_SOCKET -1 +#ifndef SOCKET_ERROR #define SOCKET_ERROR -1 +#endif + +#ifndef INVALID_SOCKET + #define INVALID_SOCKET -1 +#endif + +//#ifdef __UNIX__ + // provide some unifying definitions. typedef void sock_hop; // provide synonyms for errors so we don't conflict with the windows @@ -73,8 +79,9 @@ #define SOCK_ETOOMANYREFS ETOOMANYREFS #define SOCK_EWOULDBLOCK EWOULDBLOCK #define SOCK_EUSERS EUSERS -#endif +//#endif + /* #ifdef __WIN32__ #include @@ -139,6 +146,7 @@ #define SOCK_TRY_AGAIN WSATRY_AGAIN #define SOCK_VERNOTSUPPORTED WSAVERNOTSUPPORTED #endif +*/ #endif diff --git a/octopi/library/sockets/tcpip_stack.cpp b/octopi/library/sockets/tcpip_stack.cpp index 6ef9141c..37fcb2d5 100644 --- a/octopi/library/sockets/tcpip_stack.cpp +++ b/octopi/library/sockets/tcpip_stack.cpp @@ -19,7 +19,7 @@ #include #include -#ifdef __UNIX__ +//#ifdef __UNIX__ #include #include #include @@ -30,7 +30,7 @@ #include #include #include -#endif +//#endif using namespace basis; using namespace loggers; @@ -47,10 +47,12 @@ namespace sockets { ////////////// + /* #ifdef __WIN32__ const WORD WINSOCK_VERSION_REQUIRED = 0x0101; // 1.1 version is used by this version of tcp/ip transport. #endif +*/ ////////////// @@ -87,6 +89,7 @@ tcpip_stack::~tcpip_stack() bool tcpip_stack::initialize_tcpip() { + /* #ifdef __WIN32__ FUNCDEF("initialize_tcpip"); // make sure we have the right version of WinSock available. @@ -98,14 +101,15 @@ bool tcpip_stack::initialize_tcpip() return false; } #endif +*/ return true; } void tcpip_stack::deinitialize_tcpip() { -#ifdef __WIN32__ +/*#ifdef __WIN32__ WSACleanup(); -#endif +#endif*/ } astring tcpip_stack::hostname() const @@ -168,7 +172,7 @@ astring tcpip_stack::tcpip_error_name(int error_value) case SOCK_EDQUOT: return "EDQUOT"; case SOCK_ESTALE: return "ESTALE"; case SOCK_EREMOTE: return "EREMOTE"; -#ifdef __WIN32__ +/* #ifdef __WIN32__ case SOCK_EPROCLIM: return "EPROCLIM"; case SOCK_SYSNOTREADY: return "SYSNOTREADY"; case SOCK_VERNOTSUPPORTED: return "VERNOTSUPPORTED"; @@ -178,6 +182,7 @@ astring tcpip_stack::tcpip_error_name(int error_value) case SOCK_NO_DATA: return "NO_DATA"; // or NO_ADDRESS. case SOCK_NOTINITIALISED: return "NOTINITIALISED"; #endif +*/ } // return a standard OS error... diff --git a/production/assign_bases/makefile b/production/assign_bases/makefile index 98a9177b..f95b59ca 100644 --- a/production/assign_bases/makefile +++ b/production/assign_bases/makefile @@ -1,9 +1,9 @@ include cpp/variables.def PROJECT = rebaser -ifeq "$(OP_SYSTEM)" "WIN32" - TARGETS = perform_rebasing -endif +#ifeq "$(OPERATING_SYSTEM)" "WIN32" +# TARGETS = perform_rebasing +#endif TYPE = hierarchy include cpp/rules.def diff --git a/production/check_versions/makefile b/production/check_versions/makefile index ac03b7d9..aac2f1f5 100644 --- a/production/check_versions/makefile +++ b/production/check_versions/makefile @@ -7,7 +7,7 @@ TYPE = test #TARGETS = check_versions.exe DEFINITIONS += __BUILD_STATIC_APPLICATION__ -ifeq "$(OP_SYSTEM)" "WIN32" +ifeq "$(OPERATING_SYSTEM)" "WIN32" ifeq "$(BOOT_STRAPPING)" "" LAST_TARGETS = run_checks endif diff --git a/production/example_apps/shared_calendar/composer.json b/production/example_apps/shared_calendar/composer.json index b49a8f6a..3db754a6 100644 --- a/production/example_apps/shared_calendar/composer.json +++ b/production/example_apps/shared_calendar/composer.json @@ -6,15 +6,15 @@ "license": "MIT", "require": { "php": ">=5.6", - "cakephp/cakephp": "3.8.*", + "cakephp/cakephp": "4.0.*", "mobiledetect/mobiledetectlib": "2.*", - "cakephp/migrations": "~1.0", + "cakephp/migrations": "~3.0", "cakephp/plugin-installer": "~1.0", "google/apiclient": "^2.0" }, "require-dev": { "psy/psysh": "@stable", - "cakephp/debug_kit": "~3.0", + "cakephp/debug_kit": "~4.0", "cakephp/bake": "~1.1" }, "suggest": { diff --git a/production/example_apps/shared_calendar/composer.lock b/production/example_apps/shared_calendar/composer.lock index fc4d0b94..7438ff0e 100644 --- a/production/example_apps/shared_calendar/composer.lock +++ b/production/example_apps/shared_calendar/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bcd0be7657a357e181456be1e9c1f008", + "content-hash": "92585a016ecbb2db833ed6d49f63f9d5", "packages": [ { "name": "aura/intl", @@ -61,40 +61,45 @@ }, { "name": "cakephp/cakephp", - "version": "3.8.13", + "version": "4.0.10", "source": { "type": "git", "url": "https://github.com/cakephp/cakephp.git", - "reference": "1915d78f659d374224b2be0a5ad7822d96fb8366" + "reference": "5c6d72bc9bb1be6eec1b00b3930f9e5054ee6d76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/cakephp/zipball/1915d78f659d374224b2be0a5ad7822d96fb8366", - "reference": "1915d78f659d374224b2be0a5ad7822d96fb8366", + "url": "https://api.github.com/repos/cakephp/cakephp/zipball/5c6d72bc9bb1be6eec1b00b3930f9e5054ee6d76", + "reference": "5c6d72bc9bb1be6eec1b00b3930f9e5054ee6d76", "shasum": "" }, "require": { "aura/intl": "^3.0.0", - "cakephp/chronos": "^1.0.1", + "cakephp/chronos": "^2.0", + "composer/ca-bundle": "^1.2", "ext-intl": "*", + "ext-json": "*", "ext-mbstring": "*", - "php": ">=5.6.0", + "laminas/laminas-diactoros": "^2.2.2", + "laminas/laminas-httphandlerrunner": "^1.1", + "php": ">=7.2.0", + "psr/http-client": "^1.0", + "psr/http-server-handler": "^1.0", + "psr/http-server-middleware": "^1.0", "psr/log": "^1.0.0", - "psr/simple-cache": "^1.0.0", - "zendframework/zend-diactoros": "^1.4.0" - }, - "conflict": { - "phpunit/phpunit": "<5.7" + "psr/simple-cache": "^1.0.0" }, "replace": { "cakephp/cache": "self.version", "cakephp/collection": "self.version", + "cakephp/console": "self.version", "cakephp/core": "self.version", "cakephp/database": "self.version", "cakephp/datasource": "self.version", "cakephp/event": "self.version", "cakephp/filesystem": "self.version", "cakephp/form": "self.version", + "cakephp/http": "self.version", "cakephp/i18n": "self.version", "cakephp/log": "self.version", "cakephp/orm": "self.version", @@ -102,14 +107,16 @@ "cakephp/validation": "self.version" }, "require-dev": { - "cakephp/cakephp-codesniffer": "^3.0", - "cakephp/chronos": "^1.2.1", - "phpunit/phpunit": "^5.7.14|^6.0" + "cakephp/cakephp-codesniffer": "^4.0", + "mikey179/vfsstream": "^1.6", + "paragonie/csp-builder": "^2.3", + "phpunit/phpunit": "~8.5.0" }, "suggest": { "ext-curl": "To enable more efficient network calls in Http\\Client.", "ext-openssl": "To use Security::encrypt() or have secure CSRF token generation.", - "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()" + "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()", + "paragonie/csp-builder": "CSP builder, to use the CSP Middleware" }, "type": "library", "autoload": { @@ -152,30 +159,28 @@ "issues": "https://github.com/cakephp/cakephp/issues", "source": "https://github.com/cakephp/cakephp" }, - "time": "2020-06-19T18:52:08+00:00" + "time": "2020-12-08T03:04:12+00:00" }, { "name": "cakephp/chronos", - "version": "1.3.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/cakephp/chronos.git", - "reference": "ba2bab98849e7bf29b02dd634ada49ab36472959" + "reference": "3ecd6e7ae191c676570cd1bed51fd561de4606dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/chronos/zipball/ba2bab98849e7bf29b02dd634ada49ab36472959", - "reference": "ba2bab98849e7bf29b02dd634ada49ab36472959", + "url": "https://api.github.com/repos/cakephp/chronos/zipball/3ecd6e7ae191c676570cd1bed51fd561de4606dd", + "reference": "3ecd6e7ae191c676570cd1bed51fd561de4606dd", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.2" }, "require-dev": { - "athletic/athletic": "~0.1", - "cakephp/cakephp-codesniffer": "^3.0", - "phpbench/phpbench": "@dev", - "phpunit/phpunit": "<6.0 || ^7.0" + "cakephp/cakephp-codesniffer": "^4.5", + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "autoload": { @@ -213,41 +218,42 @@ "issues": "https://github.com/cakephp/chronos/issues", "source": "https://github.com/cakephp/chronos" }, - "time": "2019-11-30T02:33:19+00:00" + "time": "2021-10-17T02:44:05+00:00" }, { "name": "cakephp/migrations", - "version": "1.8.1", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/cakephp/migrations.git", - "reference": "cd65daa9fae933bc0ccc69d5b5d92460375da9e2" + "reference": "d22737c31243db89774abfe6a077d254c0eae75a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/migrations/zipball/cd65daa9fae933bc0ccc69d5b5d92460375da9e2", - "reference": "cd65daa9fae933bc0ccc69d5b5d92460375da9e2", + "url": "https://api.github.com/repos/cakephp/migrations/zipball/d22737c31243db89774abfe6a077d254c0eae75a", + "reference": "d22737c31243db89774abfe6a077d254c0eae75a", "shasum": "" }, "require": { - "cakephp/cache": "^3.6.0", - "cakephp/orm": "^3.6.0", - "php": ">=5.6.0", - "robmorgan/phinx": "0.8.1" + "cakephp/cache": "^4.0.5", + "cakephp/orm": "^4.0.5", + "php": ">=7.2.0", + "robmorgan/phinx": "^0.12" }, "require-dev": { - "cakephp/bake": "^1.7.0", - "cakephp/cakephp": "^3.6.0", - "cakephp/cakephp-codesniffer": "^3.0", - "phpunit/phpunit": "^5.7.14" + "cakephp/bake": "^2.1.0", + "cakephp/cakephp": "^4.0.5", + "cakephp/cakephp-codesniffer": "~4.1.0", + "phpunit/phpunit": "~8.5.0" }, "suggest": { - "cakephp/bake": "Required if you want to generate migrations." + "cakephp/bake": "If you want to generate migrations.", + "dereuromark/cakephp-ide-helper": "If you want to have IDE suggest/autocomplete when creating migrations." }, "type": "cakephp-plugin", "autoload": { "psr-4": { - "Migrations\\": "src" + "Migrations\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -260,19 +266,19 @@ "homepage": "https://github.com/cakephp/migrations/graphs/contributors" } ], - "description": "Database Migration plugin for CakePHP 3.0 based on Phinx", + "description": "Database Migration plugin for CakePHP based on Phinx", "homepage": "https://github.com/cakephp/migrations", "keywords": [ "cakephp", "migrations" ], "support": { - "forum": "http://stackoverflow.com/tags/cakephp", + "forum": "https://stackoverflow.com/tags/cakephp", "irc": "irc://irc.freenode.org/cakephp", "issues": "https://github.com/cakephp/migrations/issues", "source": "https://github.com/cakephp/migrations" }, - "time": "2018-04-16T01:35:59+00:00" + "time": "2021-05-20T13:57:37+00:00" }, { "name": "cakephp/plugin-installer", @@ -323,25 +329,106 @@ }, "time": "2020-10-29T04:00:42+00:00" }, + { + "name": "composer/ca-bundle", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", + "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "psr/log": "^1.0", + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.3.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-10-28T20:44:15+00:00" + }, { "name": "firebase/php-jwt", - "version": "v6.1.2", + "version": "v6.2.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "c297139da7c6873dbd67cbd1093f09ec0bbd0c50" + "reference": "d28e6df83830252650da4623c78aaaf98fb385f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/c297139da7c6873dbd67cbd1093f09ec0bbd0c50", - "reference": "c297139da7c6873dbd67cbd1093f09ec0bbd0c50", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/d28e6df83830252650da4623c78aaaf98fb385f3", + "reference": "d28e6df83830252650da4623c78aaaf98fb385f3", "shasum": "" }, "require": { "php": "^7.1||^8.0" }, "require-dev": { - "phpunit/phpunit": "^7.5||9.5" + "guzzlehttp/guzzle": "^6.5||^7.4", + "phpspec/prophecy-phpunit": "^1.1", + "phpunit/phpunit": "^7.5||^9.5", + "psr/cache": "^1.0||^2.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0" }, "suggest": { "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" @@ -376,9 +463,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.1.2" + "source": "https://github.com/firebase/php-jwt/tree/v6.2.0" }, - "time": "2022-04-21T14:37:18+00:00" + "time": "2022-05-13T20:54:50+00:00" }, { "name": "google/apiclient", @@ -453,16 +540,16 @@ }, { "name": "google/apiclient-services", - "version": "v0.246.0", + "version": "v0.248.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client-services.git", - "reference": "33aef1ccce34799a1124c39951fed8ad0b16aced" + "reference": "5967583706b1b09c49d04e3c1c3c05e459b0767e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/33aef1ccce34799a1124c39951fed8ad0b16aced", - "reference": "33aef1ccce34799a1124c39951fed8ad0b16aced", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/5967583706b1b09c49d04e3c1c3c05e459b0767e", + "reference": "5967583706b1b09c49d04e3c1c3c05e459b0767e", "shasum": "" }, "require": { @@ -491,9 +578,9 @@ ], "support": { "issues": "https://github.com/googleapis/google-api-php-client-services/issues", - "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.246.0" + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.248.0" }, - "time": "2022-04-24T00:58:37+00:00" + "time": "2022-05-09T01:06:12+00:00" }, { "name": "google/auth", @@ -876,6 +963,238 @@ ], "time": "2022-03-20T21:55:58+00:00" }, + { + "name": "laminas/laminas-diactoros", + "version": "2.10.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-diactoros.git", + "reference": "a3f03b3c158a3a7014c6ba553b0cb83bf7da19c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/a3f03b3c158a3a7014c6ba553b0cb83bf7da19c4", + "reference": "a3f03b3c158a3a7014c6ba553b0cb83bf7da19c4", + "shasum": "" + }, + "require": { + "php": "^7.3 || ~8.0.0 || ~8.1.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0" + }, + "conflict": { + "phpspec/prophecy": "<1.9.0", + "zendframework/zend-diactoros": "*" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-curl": "*", + "ext-dom": "*", + "ext-gd": "*", + "ext-libxml": "*", + "http-interop/http-factory-tests": "^0.8.0", + "laminas/laminas-coding-standard": "~1.0.0", + "php-http/psr7-integration-tests": "^1.1", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.1", + "psalm/plugin-phpunit": "^0.14.0", + "vimeo/psalm": "^4.3" + }, + "type": "library", + "extra": { + "laminas": { + "config-provider": "Laminas\\Diactoros\\ConfigProvider", + "module": "Laminas\\Diactoros" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php", + "src/functions/create_uploaded_file.legacy.php", + "src/functions/marshal_headers_from_sapi.legacy.php", + "src/functions/marshal_method_from_sapi.legacy.php", + "src/functions/marshal_protocol_version_from_sapi.legacy.php", + "src/functions/marshal_uri_from_sapi.legacy.php", + "src/functions/normalize_server.legacy.php", + "src/functions/normalize_uploaded_files.legacy.php", + "src/functions/parse_cookie_header.legacy.php" + ], + "psr-4": { + "Laminas\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://laminas.dev", + "keywords": [ + "http", + "laminas", + "psr", + "psr-17", + "psr-7" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-diactoros/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-diactoros/issues", + "rss": "https://github.com/laminas/laminas-diactoros/releases.atom", + "source": "https://github.com/laminas/laminas-diactoros" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-05-04T15:16:15+00:00" + }, + { + "name": "laminas/laminas-httphandlerrunner", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-httphandlerrunner.git", + "reference": "5f94e55d93f756e8ad07b9049aeb3d6d84582d0e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/5f94e55d93f756e8ad07b9049aeb3d6d84582d0e", + "reference": "5f94e55d93f756e8ad07b9049aeb3d6d84582d0e", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^7.3 || ~8.0.0 || ~8.1.0", + "psr/http-message": "^1.0", + "psr/http-message-implementation": "^1.0", + "psr/http-server-handler": "^1.0" + }, + "replace": { + "zendframework/zend-httphandlerrunner": "^1.1.0" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-diactoros": "^2.8.0", + "phpunit/phpunit": "^9.5.9", + "psalm/plugin-phpunit": "^0.16.1", + "vimeo/psalm": "^4.10.0" + }, + "type": "library", + "extra": { + "laminas": { + "config-provider": "Laminas\\HttpHandlerRunner\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Laminas\\HttpHandlerRunner\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.", + "homepage": "https://laminas.dev", + "keywords": [ + "components", + "laminas", + "mezzio", + "psr-15", + "psr-7" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-httphandlerrunner/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-httphandlerrunner/issues", + "rss": "https://github.com/laminas/laminas-httphandlerrunner/releases.atom", + "source": "https://github.com/laminas/laminas-httphandlerrunner" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2021-09-22T09:17:54+00:00" + }, + { + "name": "laminas/laminas-zendframework-bridge", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-zendframework-bridge.git", + "reference": "7f049390b756d34ba5940a8fb47634fbb51f79ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/7f049390b756d34ba5940a8fb47634fbb51f79ab", + "reference": "7f049390b756d34ba5940a8fb47634fbb51f79ab", + "shasum": "" + }, + "require": { + "php": ">=7.4, <8.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.14", + "psalm/plugin-phpunit": "^0.15.2", + "squizlabs/php_codesniffer": "^3.6.2", + "vimeo/psalm": "^4.21.0" + }, + "type": "library", + "extra": { + "laminas": { + "module": "Laminas\\ZendFrameworkBridge" + } + }, + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ZendFrameworkBridge\\": "src//" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Alias legacy ZF class names to Laminas Project equivalents.", + "keywords": [ + "ZendFramework", + "autoloading", + "laminas", + "zf" + ], + "support": { + "forum": "https://discourse.laminas.dev/", + "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", + "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", + "source": "https://github.com/laminas/laminas-zendframework-bridge" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2022-02-22T22:17:01+00:00" + }, { "name": "mobiledetect/mobiledetectlib", "version": "2.8.39", @@ -934,16 +1253,16 @@ }, { "name": "monolog/monolog", - "version": "2.5.0", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "4192345e260f1d51b365536199744b987e160edc" + "reference": "247918972acd74356b0a91dfaa5adcaec069b6c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4192345e260f1d51b365536199744b987e160edc", - "reference": "4192345e260f1d51b365536199744b987e160edc", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/247918972acd74356b0a91dfaa5adcaec069b6c0", + "reference": "247918972acd74356b0a91dfaa5adcaec069b6c0", "shasum": "" }, "require": { @@ -956,18 +1275,23 @@ "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", "graylog2/gelf-php": "^1.4.2", + "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", "php-console/php-console": "^3.1.3", - "phpspec/prophecy": "^1.6.1", + "phpspec/prophecy": "^1.15", "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5", + "phpunit/phpunit": "^8.5.14", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": ">=0.90@dev", - "swiftmailer/swiftmailer": "^5.3|^6.0" + "ruflin/elastica": "^7", + "swiftmailer/swiftmailer": "^5.3|^6.0", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", @@ -1017,7 +1341,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.5.0" + "source": "https://github.com/Seldaek/monolog/tree/2.6.0" }, "funding": [ { @@ -1029,7 +1353,7 @@ "type": "tidelift" } ], - "time": "2022-04-08T15:43:54+00:00" + "time": "2022-05-10T09:36:00+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -1306,6 +1630,59 @@ }, "time": "2016-08-06T20:24:11+00:00" }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, { "name": "psr/http-client", "version": "1.0.1", @@ -1467,16 +1844,130 @@ "time": "2016-08-06T14:39:51+00:00" }, { - "name": "psr/log", - "version": "1.1.4", + "name": "psr/http-server-handler", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "url": "https://github.com/php-fig/http-server-handler.git", + "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7", + "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP server-side request handler", + "keywords": [ + "handler", + "http", + "http-interop", + "psr", + "psr-15", + "psr-7", + "request", + "response", + "server" + ], + "support": { + "issues": "https://github.com/php-fig/http-server-handler/issues", + "source": "https://github.com/php-fig/http-server-handler/tree/master" + }, + "time": "2018-10-30T16:46:14+00:00" + }, + { + "name": "psr/http-server-middleware", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-server-middleware.git", + "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/2296f45510945530b9dceb8bcedb5cb84d40c5f5", + "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "psr/http-message": "^1.0", + "psr/http-server-handler": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP server-side middleware", + "keywords": [ + "http", + "http-interop", + "middleware", + "psr", + "psr-15", + "psr-7", + "request", + "response" + ], + "support": { + "issues": "https://github.com/php-fig/http-server-middleware/issues", + "source": "https://github.com/php-fig/http-server-middleware/tree/master" + }, + "time": "2018-10-30T17:12:04+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, @@ -1613,26 +2104,37 @@ }, { "name": "robmorgan/phinx", - "version": "v0.8.1", + "version": "0.12.10", "source": { "type": "git", "url": "https://github.com/cakephp/phinx.git", - "reference": "7a19de5bebc59321edd9613bc2a667e7f96224ec" + "reference": "ad056cff354fc67fedf9bf96c441c2b428afad0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/phinx/zipball/7a19de5bebc59321edd9613bc2a667e7f96224ec", - "reference": "7a19de5bebc59321edd9613bc2a667e7f96224ec", + "url": "https://api.github.com/repos/cakephp/phinx/zipball/ad056cff354fc67fedf9bf96c441c2b428afad0c", + "reference": "ad056cff354fc67fedf9bf96c441c2b428afad0c", "shasum": "" }, "require": { - "php": ">=5.4", - "symfony/config": "~2.8|~3.0", - "symfony/console": "~2.8|~3.0", - "symfony/yaml": "~2.8|~3.0" + "cakephp/database": "^4.0", + "php": ">=7.2", + "psr/container": "^1.0 || ^2.0", + "symfony/config": "^3.4|^4.0|^5.0|^6.0", + "symfony/console": "^3.4|^4.0|^5.0|^6.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.26|^5.0" + "cakephp/cakephp-codesniffer": "^4.0", + "ext-json": "*", + "ext-pdo": "*", + "phpunit/phpunit": "^8.5|^9.3", + "sebastian/comparator": ">=1.2.3", + "symfony/yaml": "^3.4|^4.0|^5.0" + }, + "suggest": { + "ext-json": "Install if using JSON configuration format", + "ext-pdo": "PDO extension is needed", + "symfony/yaml": "Install if using YAML configuration format" }, "bin": [ "bin/phinx" @@ -1640,7 +2142,7 @@ "type": "library", "autoload": { "psr-4": { - "Phinx\\": "src/Phinx" + "Phinx\\": "src/Phinx/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1648,22 +2150,27 @@ "MIT" ], "authors": [ - { - "name": "Woody Gilk", - "email": "woody.gilk@gmail.com", - "homepage": "http://shadowhand.me", - "role": "Developer" - }, { "name": "Rob Morgan", "email": "robbym@gmail.com", "homepage": "https://robmorgan.id.au", "role": "Lead Developer" }, + { + "name": "Woody Gilk", + "email": "woody.gilk@gmail.com", + "homepage": "https://shadowhand.me", + "role": "Developer" + }, { "name": "Richard Quadling", "email": "rquadling@gmail.com", "role": "Developer" + }, + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/phinx/graphs/contributors", + "role": "Developer" } ], "description": "Phinx makes it ridiculously easy to manage the database migrations for your PHP app.", @@ -1677,38 +2184,41 @@ ], "support": { "issues": "https://github.com/cakephp/phinx/issues", - "source": "https://github.com/cakephp/phinx/tree/v0.8.1" + "source": "https://github.com/cakephp/phinx/tree/0.12.10" }, - "time": "2017-06-05T13:30:19+00:00" + "time": "2022-01-21T19:53:14+00:00" }, { "name": "symfony/config", - "version": "v3.4.47", + "version": "v5.4.8", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f" + "reference": "9f8964f56f7234f8ace16f66cb3fbae950c04e68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f", - "reference": "bc6b3fd3930d4b53a60b42fe2ed6fc466b75f03f", + "url": "https://api.github.com/repos/symfony/config/zipball/9f8964f56f7234f8ace16f66cb3fbae950c04e68", + "reference": "9f8964f56f7234f8ace16f66cb3fbae950c04e68", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/filesystem": "~2.8|~3.0|~4.0", - "symfony/polyfill-ctype": "~1.8" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/filesystem": "^4.4|^5.0|^6.0", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.16", + "symfony/polyfill-php81": "^1.22" }, "conflict": { - "symfony/dependency-injection": "<3.3", - "symfony/finder": "<3.3" + "symfony/finder": "<4.4" }, "require-dev": { - "symfony/dependency-injection": "~3.3|~4.0", - "symfony/event-dispatcher": "~3.3|~4.0", - "symfony/finder": "~3.3|~4.0", - "symfony/yaml": "~3.0|~4.0" + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/messenger": "^4.4|^5.0|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/yaml": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/yaml": "To use the yaml reference dumper" @@ -1736,10 +2246,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Config Component", + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v3.4.47" + "source": "https://github.com/symfony/config/tree/v5.4.8" }, "funding": [ { @@ -1755,41 +2265,50 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2022-04-12T16:02:29+00:00" }, { "name": "symfony/console", - "version": "v3.4.47", + "version": "v5.4.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81" + "reference": "ffe3aed36c4d60da2cf1b0a1cee6b8f2e5fa881b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a10b1da6fc93080c180bba7219b5ff5b7518fe81", - "reference": "a10b1da6fc93080c180bba7219b5ff5b7518fe81", + "url": "https://api.github.com/repos/symfony/console/zipball/ffe3aed36c4d60da2cf1b0a1cee6b8f2e5fa881b", + "reference": "ffe3aed36c4d60da2cf1b0a1cee6b8f2e5fa881b", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/debug": "~2.8|~3.0|~4.0", - "symfony/polyfill-mbstring": "~1.0" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" }, "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/process": "<3.3" + "psr/log": ">=3", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" }, "provide": { - "psr/log-implementation": "1.0" + "psr/log-implementation": "1.0|2.0" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.3|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~2.8|~3.0|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.3|~4.0" + "psr/log": "^1|^2", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -1820,78 +2339,16 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/console/tree/v3.4.47" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-24T10:57:07+00:00" - }, - { - "name": "symfony/debug", - "version": "v4.4.41", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", - "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", - "shasum": "" - }, - "require": { - "php": ">=7.1.3", - "psr/log": "^1|^2|^3" - }, - "conflict": { - "symfony/http-kernel": "<3.4" - }, - "require-dev": { - "symfony/http-kernel": "^3.4|^4.0|^5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } + "keywords": [ + "cli", + "command line", + "console", + "terminal" ], - "description": "Provides tools to ease debugging PHP code", - "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.41" + "source": "https://github.com/symfony/console/tree/v5.4.8" }, "funding": [ { @@ -1907,7 +2364,7 @@ "type": "tidelift" } ], - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-04-12T16:02:29+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1978,21 +2435,22 @@ }, { "name": "symfony/filesystem", - "version": "v4.4.39", + "version": "v5.4.7", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "72a5b35fecaa670b13954e6eaf414acbe2a67b35" + "reference": "3a4442138d80c9f7b600fb297534ac718b61d37f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/72a5b35fecaa670b13954e6eaf414acbe2a67b35", - "reference": "72a5b35fecaa670b13954e6eaf414acbe2a67b35", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3a4442138d80c9f7b600fb297534ac718b61d37f", + "reference": "3a4442138d80c9f7b600fb297534ac718b61d37f", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", "symfony/polyfill-php80": "^1.16" }, "type": "library", @@ -2021,7 +2479,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v4.4.39" + "source": "https://github.com/symfony/filesystem/tree/v5.4.7" }, "funding": [ { @@ -2037,7 +2495,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T10:38:15+00:00" + "time": "2022-04-01T12:33:59+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2122,27 +2580,24 @@ "time": "2021-10-20T20:35:02+00:00" }, { - "name": "symfony/polyfill-mbstring", + "name": "symfony/polyfill-intl-grapheme", "version": "v1.25.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", + "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", "shasum": "" }, "require": { "php": ">=7.1" }, - "provide": { - "ext-mbstring": "*" - }, "suggest": { - "ext-mbstring": "For best performance" + "ext-intl": "For best performance" }, "type": "library", "extra": { @@ -2159,7 +2614,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2176,17 +2631,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill for intl's grapheme_* functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", + "grapheme", + "intl", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" }, "funding": [ { @@ -2202,25 +2658,28 @@ "type": "tidelift" } ], - "time": "2021-11-30T18:21:41+00:00" + "time": "2021-11-23T21:10:46+00:00" }, { - "name": "symfony/polyfill-php80", + "name": "symfony/polyfill-intl-normalizer", "version": "v1.25.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "shasum": "" }, "require": { "php": ">=7.1" }, + "suggest": { + "ext-intl": "For best performance" + }, "type": "library", "extra": { "branch-alias": { @@ -2236,7 +2695,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, "classmap": [ "Resources/stubs" @@ -2247,10 +2706,6 @@ "MIT" ], "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -2260,16 +2715,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Symfony polyfill for intl's Normalizer class and related functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "intl", + "normalizer", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" }, "funding": [ { @@ -2285,43 +2742,48 @@ "type": "tidelift" } ], - "time": "2022-03-04T08:16:47+00:00" + "time": "2021-02-19T12:13:01+00:00" }, { - "name": "symfony/yaml", - "version": "v3.4.47", + "name": "symfony/polyfill-mbstring", + "version": "v1.25.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "88289caa3c166321883f67fe5130188ebbb47094" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/88289caa3c166321883f67fe5130188ebbb47094", - "reference": "88289caa3c166321883f67fe5130188ebbb47094", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/console": "<3.4" + "php": ">=7.1" }, - "require-dev": { - "symfony/console": "~3.4|~4.0" + "provide": { + "ext-mbstring": "*" }, "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "ext-mbstring": "For best performance" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2329,18 +2791,25 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Yaml Component", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], "support": { - "source": "https://github.com/symfony/yaml/tree/v3.4.47" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" }, "funding": [ { @@ -2356,116 +2825,124 @@ "type": "tidelift" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2021-11-30T18:21:41+00:00" }, { - "name": "zendframework/zend-diactoros", - "version": "1.8.7", + "name": "symfony/polyfill-php73", + "version": "v1.25.0", "source": { "type": "git", - "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "a85e67b86e9b8520d07e6415fcbcb8391b44a75b" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/a85e67b86e9b8520d07e6415fcbcb8391b44a75b", - "reference": "a85e67b86e9b8520d07e6415fcbcb8391b44a75b", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", + "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-dom": "*", - "ext-libxml": "*", - "php-http/psr7-integration-tests": "dev-master", - "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7", - "zendframework/zend-coding-standard": "~1.0" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-release-1.8": "1.8.x-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "files": [ - "src/functions/create_uploaded_file.php", - "src/functions/marshal_headers_from_sapi.php", - "src/functions/marshal_method_from_sapi.php", - "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/marshal_uri_from_sapi.php", - "src/functions/normalize_server.php", - "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php" + "bootstrap.php" ], "psr-4": { - "Zend\\Diactoros\\": "src/" - } + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-2-Clause" + "MIT" ], - "description": "PSR HTTP Message implementations", - "homepage": "https://github.com/zendframework/zend-diactoros", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", "keywords": [ - "http", - "psr", - "psr-7" + "compatibility", + "polyfill", + "portable", + "shim" ], "support": { - "issues": "https://github.com/zendframework/zend-diactoros/issues", - "source": "https://github.com/zendframework/zend-diactoros" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0" }, - "abandoned": "laminas/laminas-diactoros", - "time": "2019-08-06T17:53:53+00:00" - } - ], - "packages-dev": [ + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-06-05T21:20:04+00:00" + }, { - "name": "ajgl/breakpoint-twig-extension", - "version": "0.3.5", + "name": "symfony/polyfill-php80", + "version": "v1.25.0", "source": { "type": "git", - "url": "https://github.com/ajgarlag/AjglBreakpointTwigExtension.git", - "reference": "9875feea0ac4bc3c9f308c62bae4727669d6052a" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ajgarlag/AjglBreakpointTwigExtension/zipball/9875feea0ac4bc3c9f308c62bae4727669d6052a", - "reference": "9875feea0ac4bc3c9f308c62bae4727669d6052a", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", "shasum": "" }, "require": { - "php": ">=5.6", - "twig/twig": "^1.34|^2.0|^3.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.18", - "symfony/framework-bundle": "^2.7|^3.4|^4.4|^5.2", - "symfony/phpunit-bridge": "^4.4|^5.2", - "symfony/twig-bundle": "^2.7|^3.4|^4.4|^5.2" - }, - "suggest": { - "ext-xdebug": "The Xdebug extension is required for the breakpoint to work", - "symfony/framework-bundle": "The framework bundle to integrate the extension into Symfony", - "symfony/twig-bundle": "The twig bundle to integrate the extension into Symfony" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.3.x-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Ajgl\\Twig\\Extension\\": "src/" - } + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2473,120 +2950,154 @@ ], "authors": [ { - "name": "Antonio J. García Lagar", - "email": "aj@garcialagar.es", - "homepage": "http://aj.garcialagar.es", - "role": "developer" + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Twig extension to set breakpoints", - "homepage": "https://github.com/ajgarlag/AjglBreakpointTwigExtension", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", "keywords": [ - "Xdebug", - "breakpoint", - "twig" + "compatibility", + "polyfill", + "portable", + "shim" ], "support": { - "issues": "https://github.com/ajgarlag/AjglBreakpointTwigExtension/issues", - "source": "https://github.com/ajgarlag/AjglBreakpointTwigExtension/tree/0.3.5" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" }, - "time": "2021-02-08T10:48:05+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-03-04T08:16:47+00:00" }, { - "name": "aptoma/twig-markdown", - "version": "2.0.0", + "name": "symfony/polyfill-php81", + "version": "v1.25.0", "source": { "type": "git", - "url": "https://github.com/aptoma/twig-markdown.git", - "reference": "64a9c5c7418c08faf91c4410b34bdb65fb25c23d" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aptoma/twig-markdown/zipball/64a9c5c7418c08faf91c4410b34bdb65fb25c23d", - "reference": "64a9c5c7418c08faf91c4410b34bdb65fb25c23d", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", + "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", "shasum": "" }, "require": { - "twig/twig": "~1.12" - }, - "require-dev": { - "codeclimate/php-test-reporter": "dev-master", - "erusev/parsedown": "^1.6", - "knplabs/github-api": "~1.2", - "league/commonmark": "~0.5", - "michelf/php-markdown": "~1", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "~0.6" - }, - "suggest": { - "knplabs/github-api": "Needed for using GitHub's Markdown engine provided through their API.", - "michelf/php-markdown": "Original Markdown engine with MarkdownExtra." + "php": ">=7.1" }, "type": "library", - "autoload": { - "psr-0": { - "Aptoma": "src/" + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { - "name": "Joris Berthelot", - "email": "joris@berthelot.tel" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Gunnar Lium", - "email": "gunnar@aptoma.com" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Twig extension to work with Markdown content", + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", "keywords": [ - "markdown", - "twig" + "compatibility", + "polyfill", + "portable", + "shim" ], "support": { - "issues": "https://github.com/aptoma/twig-markdown/issues", - "source": "https://github.com/aptoma/twig-markdown/tree/master" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0" }, - "time": "2015-10-23T20:27:08+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-09-13T13:58:11+00:00" }, { - "name": "asm89/twig-cache-extension", - "version": "1.4.0", + "name": "symfony/service-contracts", + "version": "v1.1.2", "source": { "type": "git", - "url": "https://github.com/asm89/twig-cache-extension.git", - "reference": "13787226956ec766f4770722082288097aebaaf3" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/asm89/twig-cache-extension/zipball/13787226956ec766f4770722082288097aebaaf3", - "reference": "13787226956ec766f4770722082288097aebaaf3", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/191afdcb5804db960d26d8566b7e9a2843cab3a0", + "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0", "shasum": "" }, "require": { - "php": ">=5.3.2", - "twig/twig": "^1.0|^2.0" - }, - "require-dev": { - "doctrine/cache": "~1.0", - "phpunit/phpunit": "^5.0 || ^4.8.10" + "php": "^7.1.3" }, "suggest": { - "psr/cache-implementation": "To make use of PSR-6 cache implementation via PsrCacheAdapter." + "psr/container": "", + "symfony/service-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.1-dev" } }, "autoload": { "psr-4": { - "": "lib/" + "Symfony\\Contracts\\Service\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2595,52 +3106,144 @@ ], "authors": [ { - "name": "Alexander", - "email": "iam.asm89@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Cache fragments of templates directly within Twig.", - "homepage": "https://github.com/asm89/twig-cache-extension", + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", "keywords": [ - "cache", - "extension", - "twig" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" ], "support": { - "issues": "https://github.com/asm89/twig-cache-extension/issues", - "source": "https://github.com/asm89/twig-cache-extension/tree/1.4.0" + "source": "https://github.com/symfony/service-contracts/tree/v1.1.2" }, - "abandoned": "twig/cache-extension", - "time": "2020-01-01T20:47:37+00:00" + "time": "2019-05-28T07:50:59+00:00" }, + { + "name": "symfony/string", + "version": "v5.4.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "3c061a76bff6d6ea427d85e12ad1bb8ed8cd43e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/3c061a76bff6d6ea427d85e12ad1bb8ed8cd43e8", + "reference": "3c061a76bff6d6ea427d85e12ad1bb8ed8cd43e8", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "conflict": { + "symfony/translation-contracts": ">=3.0" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.4.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-04-19T10:40:37+00:00" + } + ], + "packages-dev": [ { "name": "cakephp/bake", - "version": "1.12.0", + "version": "1.2.8", "source": { "type": "git", "url": "https://github.com/cakephp/bake.git", - "reference": "33e8ee8419ba36c13fa4074c208c93352b5530cf" + "reference": "dfa20d4113253dc02e6fccd2115a8ba3f8cb51b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/bake/zipball/33e8ee8419ba36c13fa4074c208c93352b5530cf", - "reference": "33e8ee8419ba36c13fa4074c208c93352b5530cf", + "url": "https://api.github.com/repos/cakephp/bake/zipball/dfa20d4113253dc02e6fccd2115a8ba3f8cb51b8", + "reference": "dfa20d4113253dc02e6fccd2115a8ba3f8cb51b8", "shasum": "" }, "require": { - "cakephp/cakephp": "^3.8.0", - "cakephp/plugin-installer": "^1.0", - "php": ">=5.6.0", - "wyrihaximus/twig-view": "^4.3.7" + "cakephp/cakephp": ">=3.2.0", + "cakephp/plugin-installer": "*", + "php": ">=5.5.9" }, "require-dev": { - "cakephp/cakephp-codesniffer": "^3.0", - "phpunit/phpunit": "^5.7.14|^6.0" + "cakephp/cakephp-codesniffer": "^2.1", + "phpunit/phpunit": "*" }, "type": "cakephp-plugin", "autoload": { "psr-4": { - "Bake\\": "src/" + "Bake\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2653,46 +3256,45 @@ "homepage": "https://github.com/cakephp/bake/graphs/contributors" } ], - "description": "Bake plugin for CakePHP 3", + "description": "Bake plugin for CakePHP 3.0", "homepage": "https://github.com/cakephp/bake", "keywords": [ "bake", "cakephp" ], "support": { - "forum": "https://stackoverflow.com/tags/cakephp", + "forum": "http://stackoverflow.com/tags/cakephp", "irc": "irc://irc.freenode.org/cakephp", "issues": "https://github.com/cakephp/bake/issues", "source": "https://github.com/cakephp/bake" }, - "time": "2019-12-07T20:34:43+00:00" + "time": "2016-09-03T13:29:04+00:00" }, { "name": "cakephp/debug_kit", - "version": "3.23.0", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/cakephp/debug_kit.git", - "reference": "49506b55d0b7becf4803e895b07a8cd8599ab1e4" + "reference": "940a0214947e85bbaa0724acfda852f64831f04f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/debug_kit/zipball/49506b55d0b7becf4803e895b07a8cd8599ab1e4", - "reference": "49506b55d0b7becf4803e895b07a8cd8599ab1e4", + "url": "https://api.github.com/repos/cakephp/debug_kit/zipball/940a0214947e85bbaa0724acfda852f64831f04f", + "reference": "940a0214947e85bbaa0724acfda852f64831f04f", "shasum": "" }, "require": { - "cakephp/cakephp": "^3.7.0", - "cakephp/chronos": "^1.0.0", - "composer/composer": "^1.3 | ^2.0", - "jdorn/sql-formatter": "^1.2.0", - "php": ">=5.6.0" + "cakephp/cakephp": "^4.0", + "cakephp/chronos": "^2.0", + "composer/composer": "^1.3", + "jdorn/sql-formatter": "^1.2", + "php": ">=7.2" }, "require-dev": { - "cakephp/authorization": "^1.3.2", - "cakephp/cakephp-codesniffer": "^3.0", - "cakephp/plugin-installer": "^1.3", - "phpunit/phpunit": "^5.7.14|^6.0" + "cakephp/authorization": "^2.0", + "cakephp/cakephp-codesniffer": "^4.0", + "phpunit/phpunit": "^8.0" }, "suggest": { "ext-pdo_sqlite": "DebugKit needs to store panel data in a database. SQLite is simple and easy to use." @@ -2732,119 +3334,43 @@ "issues": "https://github.com/cakephp/debug_kit/issues", "source": "https://github.com/cakephp/debug_kit" }, - "time": "2021-05-16T04:58:57+00:00" - }, - { - "name": "composer/ca-bundle", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", - "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "psr/log": "^1.0", - "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\CaBundle\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", - "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.1" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-10-28T20:44:15+00:00" + "time": "2020-06-10T01:37:18+00:00" }, { "name": "composer/composer", - "version": "2.2.12", + "version": "1.10.26", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "ba61e768b410736efe61df01b61f1ec44f51474f" + "reference": "3e196135eacf9e519a6b00986bc6fe6aff977997" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/ba61e768b410736efe61df01b61f1ec44f51474f", - "reference": "ba61e768b410736efe61df01b61f1ec44f51474f", + "url": "https://api.github.com/repos/composer/composer/zipball/3e196135eacf9e519a6b00986bc6fe6aff977997", + "reference": "3e196135eacf9e519a6b00986bc6fe6aff977997", "shasum": "" }, "require": { "composer/ca-bundle": "^1.0", - "composer/metadata-minifier": "^1.0", - "composer/pcre": "^1.0", - "composer/semver": "^3.0", + "composer/semver": "^1.0", "composer/spdx-licenses": "^1.2", - "composer/xdebug-handler": "^2.0 || ^3.0", - "justinrainbow/json-schema": "^5.2.11", + "composer/xdebug-handler": "^1.1", + "justinrainbow/json-schema": "^5.2.10", "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0 || ^2.0", - "react/promise": "^1.2 || ^2.7", + "psr/log": "^1.0", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.0", - "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0", - "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", - "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", - "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" + "symfony/console": "^2.7 || ^3.0 || ^4.0 || ^5.0", + "symfony/filesystem": "^2.7 || ^3.0 || ^4.0 || ^5.0", + "symfony/finder": "^2.7 || ^3.0 || ^4.0 || ^5.0", + "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0" + }, + "conflict": { + "symfony/console": "2.8.38" }, "require-dev": { "phpspec/prophecy": "^1.10", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + "symfony/phpunit-bridge": "^4.2" }, "suggest": { "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", @@ -2857,7 +3383,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.2-dev" + "dev-master": "1.10-dev" } }, "autoload": { @@ -2873,12 +3399,12 @@ { "name": "Nils Adermann", "email": "naderman@naderman.de", - "homepage": "https://www.naderman.de" + "homepage": "http://www.naderman.de" }, { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" + "homepage": "http://seld.be" } ], "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", @@ -2889,149 +3415,9 @@ "package" ], "support": { - "irc": "ircs://irc.libera.chat:6697/composer", + "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.2.12" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-04-13T14:42:25+00:00" - }, - { - "name": "composer/metadata-minifier", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/metadata-minifier.git", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "composer/composer": "^2", - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\MetadataMinifier\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Small utility library that handles metadata minification and expansion.", - "keywords": [ - "composer", - "compression" - ], - "support": { - "issues": "https://github.com/composer/metadata-minifier/issues", - "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-04-07T13:37:33+00:00" - }, - { - "name": "composer/pcre", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/1.0.1" + "source": "https://github.com/composer/composer/tree/1.10.26" }, "funding": [ { @@ -3047,33 +3433,32 @@ "type": "tidelift" } ], - "time": "2022-01-21T20:24:37+00:00" + "time": "2022-04-13T14:39:56+00:00" }, { "name": "composer/semver", - "version": "3.3.2", + "version": "1.7.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/647490bbcaf7fc4891c58f47b825eb99d19c377a", + "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpunit/phpunit": "^4.5 || ^5.0.5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -3112,7 +3497,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/1.7.2" }, "funding": [ { @@ -3128,7 +3513,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2020-12-03T15:47:16+00:00" }, { "name": "composer/spdx-licenses", @@ -3212,102 +3597,30 @@ }, { "name": "composer/xdebug-handler", - "version": "3.0.3", + "version": "1.4.6", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", - "shasum": "" - }, - "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-02-25T21:32:43+00:00" - }, - { - "name": "jasny/twig-extensions", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/jasny/twig-extensions.git", - "reference": "30bdf3a3903c021544f36332c9d5d4d563527da4" + "reference": "f27e06cd9675801df441b3656569b328e04aa37c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jasny/twig-extensions/zipball/30bdf3a3903c021544f36332c9d5d4d563527da4", - "reference": "30bdf3a3903c021544f36332c9d5d4d563527da4", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c", + "reference": "f27e06cd9675801df441b3656569b328e04aa37c", "shasum": "" }, "require": { - "php": ">=7.0.0 | >=5.6.0", - "twig/twig": "^2.0 | ^1.12" - }, - "require-dev": { - "ext-intl": "*", - "ext-pcre": "*", - "jasny/php-code-quality": "^2.1", - "phpunit/phpunit": "^5.0" + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0" }, - "suggest": { - "ext-intl": "Required for the use of the LocalDate Twig extension", - "ext-pcre": "Required for the use of the PCRE Twig extension" + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "autoload": { "psr-4": { - "Jasny\\Twig\\": "src/" + "Composer\\XdebugHandler\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -3316,29 +3629,35 @@ ], "authors": [ { - "name": "Arnold Daniels", - "email": "arnold@jasny.net", - "homepage": "http://www.jasny.net" + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" } ], - "description": "A set of useful Twig filters", - "homepage": "http://github.com/jasny/twig-extensions#README", + "description": "Restarts a process without Xdebug.", "keywords": [ - "PCRE", - "array", - "date", - "datetime", - "preg", - "regex", - "templating", - "text", - "time" + "Xdebug", + "performance" ], "support": { - "issues": "https://github.com/jasny/twig-extensions/issues", - "source": "https://github.com/jasny/twig-extensions" + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/1.4.6" }, - "time": "2017-09-13T07:38:01+00:00" + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-03-25T17:01:18+00:00" }, { "name": "jdorn/sql-formatter", @@ -3522,16 +3841,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.2", + "version": "v0.11.4", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "7f7da640d68b9c9fec819caae7c744a213df6514" + "reference": "05c544b339b112226ad14803e1e5b09a61957454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/7f7da640d68b9c9fec819caae7c744a213df6514", - "reference": "7f7da640d68b9c9fec819caae7c744a213df6514", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/05c544b339b112226ad14803e1e5b09a61957454", + "reference": "05c544b339b112226ad14803e1e5b09a61957454", "shasum": "" }, "require": { @@ -3546,15 +3865,13 @@ "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "hoa/console": "3.17.05.02" + "bamarni/composer-bin-plugin": "^1.2" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", "ext-pdo-sqlite": "The doc command requires SQLite to work.", "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", - "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." }, "bin": [ "bin/psysh" @@ -3594,85 +3911,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.2" - }, - "time": "2022-02-28T15:28:54+00:00" - }, - { - "name": "react/promise", - "version": "v2.9.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "keywords": [ - "promise", - "promises" - ], - "support": { - "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.9.0" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.4" }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-02-11T10:27:51+00:00" + "time": "2022-05-06T12:49:14+00:00" }, { "name": "seld/jsonlint", @@ -3849,82 +4090,6 @@ ], "time": "2022-04-15T08:07:45+00:00" }, - { - "name": "symfony/polyfill-php72", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T09:17:38+00:00" - }, { "name": "symfony/process", "version": "v5.4.8", @@ -3989,33 +4154,33 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.41", + "version": "v5.4.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "58eb36075c04aaf92a7a9f38ee9a8b97e24eb481" + "reference": "cdcadd343d31ad16fc5e006b0de81ea307435053" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/58eb36075c04aaf92a7a9f38ee9a8b97e24eb481", - "reference": "58eb36075c04aaf92a7a9f38ee9a8b97e24eb481", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/cdcadd343d31ad16fc5e006b0de81ea307435053", + "reference": "cdcadd343d31ad16fc5e006b0de81ea307435053", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=7.2.5", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5", "symfony/polyfill-php80": "^1.16" }, "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/console": "<3.4" + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<4.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^3.4|^4.0|^5.0", - "symfony/process": "^4.4|^5.0", - "twig/twig": "^1.43|^2.13|^3.0.4" + "symfony/console": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/uid": "^5.1|^6.0", + "twig/twig": "^2.13|^3.0.4" }, "suggest": { "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", @@ -4058,7 +4223,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v4.4.41" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.8" }, "funding": [ { @@ -4074,192 +4239,7 @@ "type": "tidelift" } ], - "time": "2022-04-25T21:15:06+00:00" - }, - { - "name": "twig/twig", - "version": "v1.44.6", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "ae39480f010ef88adc7938503c9b02d3baf2f3b3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/ae39480f010ef88adc7938503c9b02d3baf2f3b3", - "reference": "ae39480f010ef88adc7938503c9b02d3baf2f3b3", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "^1.8" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.44-dev" - } - }, - "autoload": { - "psr-0": { - "Twig_": "lib/" - }, - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v1.44.6" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "time": "2021-11-25T13:31:46+00:00" - }, - { - "name": "umpirsky/twig-php-function", - "version": "v0.1", - "source": { - "type": "git", - "url": "https://github.com/umpirsky/twig-php-function.git", - "reference": "53b4b1eb0c5eacbd7d66c504b7d809c79b4bedbc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/umpirsky/twig-php-function/zipball/53b4b1eb0c5eacbd7d66c504b7d809c79b4bedbc", - "reference": "53b4b1eb0c5eacbd7d66c504b7d809c79b4bedbc", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "twig/twig": "~1.12" - }, - "require-dev": { - "phpspec/phpspec": "~2.0", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "autoload": { - "psr-0": { - "Umpirsky\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "SaÅ¡a Stamenković", - "email": "umpirsky@gmail.com" - } - ], - "description": "Call (almost) any PHP function from your Twig templates.", - "support": { - "issues": "https://github.com/umpirsky/twig-php-function/issues", - "source": "https://github.com/umpirsky/twig-php-function/tree/master" - }, - "time": "2016-03-12T16:36:32+00:00" - }, - { - "name": "wyrihaximus/twig-view", - "version": "4.4.0", - "source": { - "type": "git", - "url": "https://github.com/cakephp/legacy-twig-view.git", - "reference": "463e1a6ed493d4fe99eaeaaf39d80172b51fc0fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cakephp/legacy-twig-view/zipball/463e1a6ed493d4fe99eaeaaf39d80172b51fc0fb", - "reference": "463e1a6ed493d4fe99eaeaaf39d80172b51fc0fb", - "shasum": "" - }, - "require": { - "ajgl/breakpoint-twig-extension": "^0.3.0", - "aptoma/twig-markdown": "^2.0", - "asm89/twig-cache-extension": "^1.0", - "cakephp/cakephp": "^3.7", - "jasny/twig-extensions": "^1.0", - "php": "^5.6 || ^7.0", - "twig/twig": "^1.27", - "umpirsky/twig-php-function": "0.1" - }, - "require-dev": { - "cakephp/bake": "^1.5", - "cakephp/debug_kit": "^3.0", - "phake/phake": "^2.3.2", - "phpunit/phpunit": "^5.7.14", - "squizlabs/php_codesniffer": "^3.4.0", - "wyrihaximus/phpunit-class-reflection-helpers": "dev-master" - }, - "type": "cakephp-plugin", - "autoload": { - "psr-4": { - "WyriHaximus\\TwigView\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Cees-Jan Kiewiet", - "email": "ceesjank@gmail.com", - "homepage": "http://wyrihaximus.net/" - } - ], - "description": "Twig powered View for CakePHP3", - "keywords": [ - "cakephp", - "cakephp3", - "twig", - "view" - ], - "support": { - "issues": "https://github.com/cakephp/legacy-twig-view/issues", - "source": "https://github.com/cakephp/legacy-twig-view/tree/4.4.0" - }, - "time": "2021-04-06T15:42:50+00:00" + "time": "2022-04-26T13:19:20+00:00" } ], "aliases": [], diff --git a/production/example_apps/zippy_maps/composer.lock b/production/example_apps/zippy_maps/composer.lock index 133925bb..09947811 100644 --- a/production/example_apps/zippy_maps/composer.lock +++ b/production/example_apps/zippy_maps/composer.lock @@ -3377,16 +3377,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.2", + "version": "v0.11.4", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "7f7da640d68b9c9fec819caae7c744a213df6514" + "reference": "05c544b339b112226ad14803e1e5b09a61957454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/7f7da640d68b9c9fec819caae7c744a213df6514", - "reference": "7f7da640d68b9c9fec819caae7c744a213df6514", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/05c544b339b112226ad14803e1e5b09a61957454", + "reference": "05c544b339b112226ad14803e1e5b09a61957454", "shasum": "" }, "require": { @@ -3401,15 +3401,13 @@ "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "hoa/console": "3.17.05.02" + "bamarni/composer-bin-plugin": "^1.2" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", "ext-pdo-sqlite": "The doc command requires SQLite to work.", "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", - "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." }, "bin": [ "bin/psysh" @@ -3449,9 +3447,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.2" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.4" }, - "time": "2022-02-28T15:28:54+00:00" + "time": "2022-05-06T12:49:14+00:00" }, { "name": "react/promise", diff --git a/production/feisty_meow_config.ini b/production/feisty_meow_config.ini index 55781f81..a0dc1b5b 100644 --- a/production/feisty_meow_config.ini +++ b/production/feisty_meow_config.ini @@ -3,7 +3,7 @@ # specifies the version of the code that is being constructed here. major=2 minor=140 -revision=135 +revision=187 build=420 # specifies the remainder of the version record info. @@ -68,7 +68,7 @@ endif # this flag selects whether to build with unicode enabled. this mainly affects # win32 OSes, and right now we know it affects them badly if this is enabled. # unix may build slightly differently too, such as for WX widgets. -ifneq "$(OP_SYSTEM)" "WIN32" +ifneq "$(OPERATING_SYSTEM)" "WIN32" # DEFINITIONS += UNICODE=t endif diff --git a/production/paths.ini b/production/paths.ini index 0f274370..bd804e11 100644 --- a/production/paths.ini +++ b/production/paths.ini @@ -1,3 +1,4 @@ [Common] +# default logging path that users can alter if needed. LogPath=$FEISTY_MEOW_GENERATED_STORE/logs diff --git a/production/prototype_config.ini b/production/prototype_config.ini index 57aba0fc..0acecedf 100644 --- a/production/prototype_config.ini +++ b/production/prototype_config.ini @@ -68,7 +68,7 @@ endif # this flag selects whether to build with unicode enabled. this mainly affects # win32 OSes, and right now we know it affects them badly if this is enabled. # unix may build slightly differently too, such as for WX widgets. -ifeq "$(OP_SYSTEM)" "WIN32" +ifeq "$(OPERATING_SYSTEM)" "WIN32" ### ### do not enable on win32 right now. ### DEFINITIONS += UNICODE=t diff --git a/production/system_helper_template.h b/production/system_helper_template.h new file mode 100644 index 00000000..96b01772 --- /dev/null +++ b/production/system_helper_template.h @@ -0,0 +1,30 @@ +#ifndef SYSTEM_HELPER_GROUP +#define SYSTEM_HELPER_GROUP + +////////////// +// Name : system helper header +// Author : Chris Koeritz +// Rights : Copyright (c) 2012-$now By Author +////////////// +// This file is free software; you can modify/redistribute it under the terms +// of the GNU General Public License. [ http://www.gnu.org/licenses/gpl.html ] +// Feel free to send updates to: [ fred@gruntose.com ] +////////////// + +//! Isolates a few system dependencies for feisty meow runtime environment. + +////////////// + +/* + default location of virtual root directory for Unix. + the contents here are replaced at runtime on windoze if cygwin is + available. +*/ +#define FEISTY_MEOW_VIRTUAL_UNIX_ROOT "c:/cygwin" + +// hmmm: support msys too at some point? very worthy as well. + +////////////// + +#endif + diff --git a/readme.txt b/readme.txt index 4b52f9ba..6ea6c7b2 100644 --- a/readme.txt +++ b/readme.txt @@ -135,7 +135,7 @@ Install using apt (on Ubuntu or Debian-based OS): $ sudo apt install libfile-which-perl libtext-diff-perl Install using yum (on Centos or similar distros): -$ yum install perl-File-Which perl-Text-Diff +$ sudo yum install perl-File-Which perl-Text-Diff or Install using perl's CPAN: $ sudo cpan install Text::Diff File::Which diff --git a/scripts/agenda/info_overload_report.sh b/scripts/agenda/info_overload_report.sh index 793f6566..2179e400 100644 --- a/scripts/agenda/info_overload_report.sh +++ b/scripts/agenda/info_overload_report.sh @@ -118,9 +118,6 @@ full_report+="count\tcomplexity\tweight (kb)\tcategory\n\ #hmmm: don't fail if the hierarchy doesn't exist. -# high priority stuff would be called urgent. -analyze_hierarchy_and_report $CLOUD_BASE/aaa_priority "high priority (aieeee!)" - # notes are individual files of tasks, usually, although some are combined. analyze_hierarchy_and_report $CLOUD_BASE/grunty* "grunty (external facing) notes" @@ -152,6 +149,9 @@ analyze_hierarchy_and_report $CLOUD_BASE/blue_sky "blue sky is the limit ideas" # this group is found based on matching a pattern, since we may not use a single # standardized name for it, or maybe there are prefixes for similar items (like project-). +# high priority stuff would be called urgent. +analyze_by_dir_patterns "high priority (aieeee!)" $CLOUD_BASE/*priority* + # scan all the items declared as active projects. analyze_by_dir_patterns "active issues" $CLOUD_BASE/*active* diff --git a/scripts/archival/shared_snarfer.pl b/scripts/archival/shared_snarfer.pl index 91ee6d75..7b2b7ecd 100644 --- a/scripts/archival/shared_snarfer.pl +++ b/scripts/archival/shared_snarfer.pl @@ -57,7 +57,12 @@ for (local($i) = 0; $i < scalar(@junk_file_list); $i++) { # generic versions work on sane OSes. $find_tool = which('find'); -$tar_tool = which('tar'); +# for mac, try to match gnu tar first. +$tar_tool = which('gtar'); +if ( ! -f "$tar_tool" ) { + # fall back to regular tar. + $tar_tool = which('tar'); +} #print "find tool: $find_tool\n"; #print "tar tool: $tar_tool\n"; diff --git a/scripts/archival/snarf_feisty_meow.pl b/scripts/archival/snarf_feisty_meow.pl index 20e15a77..084c6585 100644 --- a/scripts/archival/snarf_feisty_meow.pl +++ b/scripts/archival/snarf_feisty_meow.pl @@ -35,7 +35,7 @@ local($snarf_file) = &snarf_name($snarf_file_base, $number); local($root) = &canonicalize("$FEISTY_MEOW_APEX"); # grab the top level stuff. -&backup_files($snarf_file_base, $number, $root, ".", ("*.txt", "make*", ".gitignore", "*.yml")); +&backup_files($snarf_file_base, $number, $root, ".", ("*.txt", "make*", ".gitignore", ".mailmap", "*.yml")); # snarf up all the important directories. # CAK: current as of 2012-05-05. @@ -49,10 +49,11 @@ local($root) = &canonicalize("$FEISTY_MEOW_APEX"); &backup_hierarchy($snarf_file_base, $number, $root, "octopi"); &backup_hierarchy($snarf_file_base, $number, $root, "scripts"); &backup_hierarchy($snarf_file_base, $number, $root, "hypermedia"); +&backup_hierarchy($snarf_file_base, $number, $root, "testkit"); &backup_hierarchy($snarf_file_base, $number, $root, "walrus"); # grab the production assets. -&backup_files($snarf_file_base, $number, $root, "production", ("*.ini", "make*", ".gitignore")); +&backup_files($snarf_file_base, $number, $root, "production", ("*.ini", "make*", ".gitignore", "*.h")); &backup_hierarchy($snarf_file_base, $number, "$root", "production/3rdparty"); &backup_hierarchy($snarf_file_base, $number, "$root", "production/assign_bases"); &backup_hierarchy($snarf_file_base, $number, "$root", "production/check_versions"); diff --git a/scripts/archival/snarf_notes.pl b/scripts/archival/snarf_notes.pl index fac97bcf..7aff737c 100644 --- a/scripts/archival/snarf_notes.pl +++ b/scripts/archival/snarf_notes.pl @@ -43,6 +43,7 @@ local($snarf_file) = &snarf_name($snarf_file_base, $number); # gather any directories in our home that match these often recurring patterns. &snarf_by_pattern($snarf_file_base, "$root", "crucial"); &snarf_by_pattern($snarf_file_base, "$root", "Documents"); +&snarf_by_pattern($snarf_file_base, "$root", "fredspace"); &snarf_by_pattern($snarf_file_base, "$root", "idea"); &snarf_by_pattern($snarf_file_base, "$root", "issue"); &snarf_by_pattern($snarf_file_base, "$root", "list"); @@ -50,6 +51,7 @@ local($snarf_file) = &snarf_name($snarf_file_base, $number); &snarf_by_pattern($snarf_file_base, "$root", "nuage"); &snarf_by_pattern($snarf_file_base, "$root", "project"); &snarf_by_pattern($snarf_file_base, "$root", "proj_"); +&snarf_by_pattern($snarf_file_base, "$root", "Sync"); &snarf_by_pattern($snarf_file_base, "$root", "task"); &snarf_by_pattern($snarf_file_base, "$root", "invention"); &snarf_by_pattern($snarf_file_base, "$root", "transitory"); diff --git a/scripts/cgi/paths.ini b/scripts/cgi/paths.ini index fe57bba9..1faa81a7 100755 --- a/scripts/cgi/paths.ini +++ b/scripts/cgi/paths.ini @@ -1,3 +1,5 @@ [Common] +# simple cgi paths.ini to point at different logging when really running. +#hmmm: not sure this is still useful or necessary; is it being honored on running systems with feisty? LogPath=/tmp/cgi-bin-logs diff --git a/scripts/clam/cpp/get_version.sh b/scripts/clam/cpp/get_version.sh index 50b9c70b..4d4941e3 100644 --- a/scripts/clam/cpp/get_version.sh +++ b/scripts/clam/cpp/get_version.sh @@ -2,7 +2,8 @@ COMPILER=$1 COMPILER_ROOT_DIR=$2 if [ "$COMPILER" = "GNU_LINUX" \ - -o "$COMPILER" = "GNU_DARWIN" ]; then + -o "$COMPILER" = "GNU_DARWIN" \ + -o "$COMPILER" = "GNU_WINDOWS" ]; then # compiler version report for the gnu compiler on linux and darwin. # older code is needed for some versions of gcc / suse. @@ -22,15 +23,6 @@ if [ "$COMPILER" = "GNU_LINUX" \ elif [ "$COMPILER" = "GNU_ARM_LINUX" ]; then # compiler version report for the gnu compiler on the arm processor. gcc -### 2>&1 | grep "gcc version" | sed -e 's/^gcc version \([0-9.][0-9.]*\) .*$/\1/' -elif [ "$COMPILER" = "VISUAL_CPP" ]; then - # compiler version report for ms visual studio. - ver_raw=`$COMPILER_ROOT_DIR/bin/cl 2>&1 | head -1 | sed -e 's/.*Version \([0-9][0-9]*\)\..*$/\1/'` - if [ "$ver_raw" = "12" ]; then echo 6; - elif [ "$ver_raw" = "13" ]; then echo 7; - elif [ "$ver_raw" = "14" ]; then echo 8; - elif [ "$ver_raw" = "15" ]; then echo 9; - elif [ "$ver_raw" = "16" ]; then echo 10; - fi else echo "0" fi diff --git a/scripts/clam/cpp/ms_manifest.sh b/scripts/clam/cpp/ms_manifest.sh deleted file mode 100644 index 94f0f669..00000000 --- a/scripts/clam/cpp/ms_manifest.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# the target is the file that needs its manifest stuffed into the file -# itself. the where parameter tells us what index to use when stuffing it. -target=$1; shift -where=$1; shift -if [ -z "$WIN32_MANIFEST_FILE" ]; then - WIN32_MANIFEST_FILE=$CLAM_SCRIPTS/cpp/ms_manifests/security_manifest.txt -fi -for ((count=1 ; count <= 10; count++)); do - error_val=0 - if [ -f "$target.manifest" -a -f "$target" ]; then - bash $BUILD_SCRIPTS_PATH/wrapdoze.sh mt -manifest $target.manifest $WIN32_MANIFEST_FILE -outputresource:$target\;$where >/dev/null - error_val=$? - elif [ -f "$target" ]; then - bash $BUILD_SCRIPTS_PATH/wrapdoze.sh mt -manifest $WIN32_MANIFEST_FILE -outputresource:$target\;$where >/dev/null - error_val=$? - else - echo skipping manifest generation for $target. - if [ ! -f "$target.manifest" ]; then echo manifest file was missing.; fi - if [ ! -f "$target" ]; then echo main file was missing.; fi - break - fi - if [ $error_val -ne 0 ]; then - echo "Error attaching manifest to $target at try #$count." - else - break - fi -done -if [ $error_val -ne 0 ]; then - echo There was an error attaching manifest to $target. - exit 12 -fi - diff --git a/scripts/clam/cpp/ms_manifests/security_manifest.txt b/scripts/clam/cpp/ms_manifests/security_manifest.txt deleted file mode 100644 index 90dfd47c..00000000 --- a/scripts/clam/cpp/ms_manifests/security_manifest.txt +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/scripts/clam/cpp/ms_manifests/security_manifest_administrator.txt b/scripts/clam/cpp/ms_manifests/security_manifest_administrator.txt deleted file mode 100644 index b9ed75b9..00000000 --- a/scripts/clam/cpp/ms_manifests/security_manifest_administrator.txt +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/scripts/clam/cpp/ms_manifests/security_manifest_administrator_with_ui.txt b/scripts/clam/cpp/ms_manifests/security_manifest_administrator_with_ui.txt deleted file mode 100644 index e54f4bf5..00000000 --- a/scripts/clam/cpp/ms_manifests/security_manifest_administrator_with_ui.txt +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/scripts/clam/cpp/ms_manifests/security_manifest_highest.txt b/scripts/clam/cpp/ms_manifests/security_manifest_highest.txt deleted file mode 100644 index 57b1deb1..00000000 --- a/scripts/clam/cpp/ms_manifests/security_manifest_highest.txt +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/scripts/clam/cpp/ms_manifests/security_manifest_normal.txt b/scripts/clam/cpp/ms_manifests/security_manifest_normal.txt deleted file mode 100644 index 22857fcc..00000000 --- a/scripts/clam/cpp/ms_manifests/security_manifest_normal.txt +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/scripts/clam/cpp/ms_root_dir.sh b/scripts/clam/cpp/ms_root_dir.sh deleted file mode 100644 index 6f7d21e3..00000000 --- a/scripts/clam/cpp/ms_root_dir.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# spits out the root directory of visual studio, calculated from the common -# tools directory that always seems to be reliably set. - -# code snagged from vis_stu_vars... -if [ -z "$VSxTOOLS" ]; then - export VSxTOOLS="$VS90COMNTOOLS" - if [ -z "$VSxTOOLS" ]; then - export VSxTOOLS="$VS80COMNTOOLS" - fi -fi -if [ -z "$VSxTOOLS" ]; then - #echo Failure to locate visual studio tools. - # don't want to echo anything; need to be able to check that this provided nothing. - exit 33 -fi - -cygpath -w -s "$VSxTOOLS" | sed -e 's/\\/\//g' | sed -e 's/^\(.*\)\/[^\/]*\/[^\/]*[\/]$/\1/' - diff --git a/scripts/clam/cpp/preconditions.sh b/scripts/clam/cpp/preconditions.sh index 771f5a30..08d0222d 100644 --- a/scripts/clam/cpp/preconditions.sh +++ b/scripts/clam/cpp/preconditions.sh @@ -33,7 +33,7 @@ if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir -p $STATIC_LIBRARY_DIR; fi # set versions on any extras that were specified in the makefile. if [ ! -z "$EXTRA_VERSIONS" ]; then for i in $EXTRA_VERSIONS; do - $CLAM_BINARIES/version_stamper$EXE_END $i $PARAMETER_FILE + $CLAM_BINARIES/version_stamper$EXE_ENDING $i $PARAMETER_FILE done fi @@ -54,8 +54,8 @@ if [ ! -z "$TEST_MAKEFILE" ]; then #??, STATIC_LIBRARY_DIR - #echo "compiler=$COMPILER" - #echo "OP_SYSTEM=$OP_SYSTEM" + #echo "compiler=$CLAM_COMPILER" + #echo "OPERATING_SYSTEM=$OPERATING_SYSTEM" #echo "checking for all local libs: $LOCAL_LIBS_USED" failed_check= diff --git a/scripts/clam/cpp/rebuild_oldies.sh b/scripts/clam/cpp/rebuild_oldies.sh deleted file mode 100644 index 0edc0072..00000000 --- a/scripts/clam/cpp/rebuild_oldies.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -if [ -f "$BUILD_LIST_FILE" ]; then - echo Compiling Objects [$(cat $BUILD_LIST_FILE | while read input_text; do echo $(basename $input_text); done )] - rm -f $(cat $BUILD_WHACK_FILE) -#echo got line to run: $* - eval "${@}" - rm -f $BUILD_LIST_FILE $BUILD_WHACK_FILE - if [ $? -ne 0 ]; then - . "$CLAM_SCRIPTS/exit_make.sh" - fi -fi - diff --git a/scripts/clam/cpp/rules.def b/scripts/clam/cpp/rules.def index 7a04cc83..87d3bfe4 100644 --- a/scripts/clam/cpp/rules.def +++ b/scripts/clam/cpp/rules.def @@ -5,9 +5,9 @@ # This file composite macros and rules for creating compilation objects # (such as library archives, object files, executable programs, and others). -# This file should be included in the user's Makefile after the variables +# This file should be included in the user Makefile after the variables # have been initialized appropriately for the particular project being -# compiled. The user's own targets should be placed after the include +# compiled. The user targets should be placed after the include # directive that specifies this file. ############################################################################### @@ -24,246 +24,72 @@ ifneq "$(NO_COMPILE)" "" QUIET = t endif -# implement special bits for gnu on unix. -ifeq "$(COMPILER)" "GNU_LINUX" - ifneq "$(USE_XWIN)" "" - DEFINITIONS += __XWINDOWS__ __X__ - LIBS_USED += Xm Xt X11 Xft Xp -#need to separate out with a USE_MOTIF kind of thing. -LIBS_USED += Xmu - HEADER_SEARCH_PATH += /usr/include/X11 /usr/X11R6/include /usr/include/g++ - LIBRARY_SEARCH_PATH += /usr/X11R6/lib - endif - - ifneq "$(USE_SSL)" "" - LIBS_USED += ssl crypto - endif - - ifneq "$(USE_WXWIDGETS)" "" - DEFINITIONS += __WXWIDGETS__ - use_unicode = - ifneq "$(findstring UNICODE, $(DEFINITIONS))" "" - use_unicode = true - endif - - # decide whether to turn on the unicode flag or not. - ifneq "$(use_unicode)" "" - DEFINITIONS += wxUSE_UNICODE - UNICODE_FLAG_ADD = --unicode=yes - else - UNICODE_FLAG_ADD = --unicode=no - endif - # could add for debugging: --debug=yes - COMPILER_FLAGS += $(shell wx-config --cxxflags $(UNICODE_FLAG_ADD) ) - - LOAD_FLAG_PREFIX += $(shell wx-config --libs $(UNICODE_FLAG_ADD) ) - endif +# add-ins for packages we use. - ifneq "$(USE_CURL)" "" - COMPILER_FLAGS += `curl-config --cflags` - LOAD_FLAG_SUFFIX += `curl-config --libs` - endif +# secure socket and crypto libraries. +ifneq "$(USE_SSL)" "" + LIBS_USED += ssl crypto endif -# some special code for gnu compiler on windows. -ifeq "$(COMPILER)" "GNU_WINDOWS" - - ifneq "$(USE_SSL)" "" - LIBS_USED += ssl crypto - endif - - ifneq "$(USE_WXWIDGETS)" "" - DEFINITIONS += __WXWIDGETS__ - use_unicode = - ifneq "$(findstring UNICODE, $(DEFINITIONS))" "" - use_unicode = true - endif - - # decide whether to turn on the unicode flag or not. - ifneq "$(use_unicode)" "" - DEFINITIONS += wxUSE_UNICODE - UNICODE_FLAG_ADD = --unicode=yes - else - UNICODE_FLAG_ADD = --unicode=no - endif - # could add for debugging: --debug=yes - COMPILER_FLAGS += $(shell wx-config --cxxflags $(UNICODE_FLAG_ADD) ) - - LOAD_FLAG_PREFIX += $(shell wx-config --libs $(UNICODE_FLAG_ADD) ) - endif - -LOAD_FLAG_PREFIX += -lwsock32 -lmswsock -shared - - ifneq "$(USE_CURL)" "" - COMPILER_FLAGS += `curl-config --cflags` - LOAD_FLAG_SUFFIX += `curl-config --libs` - endif - +# pull in the curl configuration using their tool. +ifneq "$(USE_CURL)" "" + COMPILER_FLAGS += `curl-config --cflags` + LOAD_FLAG_SUFFIX += `curl-config --libs` endif -############################################################################### - -ifeq "$(COMPILER)" "GNU_DARWIN" - # finds the crypto code on macos. - HEADER_SEARCH_PATH += /usr/local/opt/openssl/include - LIBRARY_SEARCH_PATH += /usr/local/opt/openssl/lib/ - - ifneq "$(USE_XWIN)" "" - DEFINITIONS += __XWINDOWS__ __X__ - LIBS_USED += +# x window system. +ifneq "$(USE_XWIN)" "" + DEFINITIONS += __XWINDOWS__ __X__ + LIBS_USED += #Xm Xt X11 Xft Xp #need to separate out with a USE_MOTIF kind of thing. #LIBS_USED += Xmu - HEADER_SEARCH_PATH += /usr/include/X11 /usr/X11R6/include /usr/include/g++ - LIBRARY_SEARCH_PATH += /usr/X11R6/lib - endif + HEADER_SEARCH_PATH += /usr/include/X11 /usr/X11R6/include +#/usr/include/g++ + LIBRARY_SEARCH_PATH += /usr/X11R6/lib +endif - ifneq "$(USE_SSL)" "" - LIBS_USED += crypto ssl +# generalized wxwidgets toolkit configuration. +ifneq "$(USE_WXWIDGETS)" "" + DEFINITIONS += __WXWIDGETS__ + use_unicode = + ifneq "$(findstring UNICODE, $(DEFINITIONS))" "" + use_unicode = true endif - - ifneq "$(USE_WXWIDGETS)" "" - DEFINITIONS += __WXWIDGETS__ - use_unicode = - ifneq "$(findstring UNICODE, $(DEFINITIONS))" "" - use_unicode = true - endif - # decide whether to turn on the unicode flag or not. + # decide whether to turn on the unicode flag or not. ### ifneq "$(findstring UNICODE, $(DEFINITIONS))" "" - ifneq "$(use_unicode)" "" - UNICODE_FLAG_ADD = --unicode=yes - DEFINITIONS += wxUSE_UNICODE - else - UNICODE_FLAG_ADD = --unicode=no - endif - - COMPILER_FLAGS += $(shell wx-config --cxxflags $(UNICODE_FLAG_ADD) ) - LOAD_FLAG_PREFIX += $(shell wx-config --libs $(UNICODE_FLAG_ADD) ) - endif - - ifneq "$(USE_CURL)" "" - COMPILER_FLAGS += `curl-config --cflags` - LOAD_FLAG_SUFFIX += `curl-config --libs` + ifneq "$(use_unicode)" "" + UNICODE_FLAG_ADD = --unicode=yes + DEFINITIONS += wxUSE_UNICODE + else + UNICODE_FLAG_ADD = --unicode=no endif + COMPILER_FLAGS += $(shell wx-config --cxxflags $(UNICODE_FLAG_ADD) ) + LOAD_FLAG_PREFIX += $(shell wx-config --libs $(UNICODE_FLAG_ADD) ) endif -############################################################################### - +# add special bits for gnu on unix. +ifeq "$(CLAM_COMPILER)" "GNU_LINUX" -# additions for gnu x86 and arm compilers. -ifneq "$(OP_SYSTEM)" "WIN32" - # is the freetds library support available on this host. - ifneq "$(ENABLE_FREETDS)" "" - # establish the headers if freetds is enabled. that just means things - # can be compiled against it. to link in the db-lib, the makefile should - # have a 'USE_FREETDS = true' statement. - - # is this particular library or app using freetds? - ifneq "$(USE_FREETDS)" "" - DEFINITIONS += ENABLE_FREETDS _FREETDS_LIBRARY_SOURCE - LIBS_USED += rt sybdb - endif - endif endif -# win32 compiler additions. -#ifeq "$(OP_SYSTEM)" "WIN32" -ifeq "$(COMPILER)" "VISUAL_CPP" - # processes the def file for linkage, if one has been specified. - ifneq "$(DEF_FILE)" "" - LOAD_FLAG_PREFIX += -def:$(DEF_FILE) - endif - - ifneq "$(TYPE)" "library" - ifneq "$(USE_MFC)" "" - ifneq "$(findstring UNICODE, $(DEFINITIONS))" "" - # specify the winmain type for unicode explicitly. - LOAD_FLAG_PREFIX += -entry:wWinMainCRTStartup - endif - endif - endif - - # these are loaded after any special debugging libs. - ifneq "$(VCPP_USE_BASE)" "" - # the first set will be included in almost any old program. we include - # winmm for multimedia in the base support since we make heavy use of the - # more accurate uptime function. - LOAD_FLAG_PREFIX += kernel32.lib user32.lib advapi32.lib shell32.lib \ - version.lib winmm.lib shlwapi.lib - endif - - ifneq "$(USE_WXWIDGETS)" "" - DEFINITIONS += __WXWIDGETS__ __WXMSW__ - LOCAL_HEADERS += $(THIRD_PARTY_DIR)/wxwidgets/include - LIBRARY_SEARCH_PATH += $(THIRD_PARTY_DIR)/wxwidgets/lib -# ifeq "$(findstring UNICODE, $(DEFINITIONS))" "" - LIBS_USED += wxmsw28_core.lib - LOCAL_HEADERS += $(THIRD_PARTY_DIR)/wxwidgets/lib/msw -# else -# DEFINITIONS += wxUSE_UNICODE -# LIBS_USED += wxmsw28u_core.lib -# LOCAL_HEADERS += $(THIRD_PARTY_DIR)/wxwidgets/lib/mswu -# endif - -## LOAD_FLAG_PREFIX += comctl32.lib shell32.lib - VCPP_USE_GUI = t - VCPP_USE_OLE = t - endif - - ifneq "$(USE_CURL)" "" -# # curl wants this win32 flag? - DEFINITIONS += WIN32 - LOCAL_HEADERS += $(THIRD_PARTY_DIR)/curl/include - LIBRARY_SEARCH_PATH += $(THIRD_PARTY_DIR)/curl/lib -# LIBS_USED += libcurl.dll.a - LIBS_USED += libcurl.lib - endif +# some special code for gnu compiler on windows. +ifeq "$(CLAM_COMPILER)" "GNU_WINDOWS" - ifneq "$(VCPP_USE_GUI)" "" - LOAD_FLAG_PREFIX += comctl32.lib comdlg32.lib gdi32.lib winspool.lib - endif +#hmmm: LOAD_FLAG_PREFIX += -lwsock32 -lmswsock -shared +endif - ifneq "$(VCPP_USE_OLE)" "" - LOAD_FLAG_PREFIX += ole32.lib oleaut32.lib uuid.lib - VCPP_USE_RPC = t - endif - ifneq "$(VCPP_USE_RPC)" "" - ifeq "$(COMPILER_VERSION)" "8" - LOAD_FLAG_PREFIX += rpcndr.lib rpcns4.lib rpcrt4.lib - endif - ifeq "$(COMPILER_VERSION)" "10" - LOAD_FLAG_PREFIX += rpcrt4.lib - endif - VCPP_USE_SOCK = t - endif - ifneq "$(VCPP_USE_SOCK)" "" - LOAD_FLAG_PREFIX += netapi32.lib ws2_32.lib - endif - ifneq "$(VCPP_USE_CLR)" "" - LOAD_FLAG_PREFIX += -noentry -include:"__DllMainCRTStartup@12" - COMPILER_FLAGS += -EHa -clr -AI "$(FRAMEWORK_DIR)" -AI "$(DYNAMIC_LIBRARY_DIR)" -FU "mscorlib.dll" -FU "System.dll" -FU "System.Data.dll" -FU "System.Windows.Forms.dll" -FU "System.Drawing.dll" - endif +############################################################################### - ifneq "$(USE_SSL)" "" - LOCAL_HEADERS += $(THIRD_PARTY_DIR)/openssl/include - LIBRARY_SEARCH_PATH += $(THIRD_PARTY_DIR)/openssl/lib - LIBS_USED += libcrypto.lib libssl.lib -#no, yuck. $(shell cp $(THIRD_PARTY_DIR)/openssl/lib/*dll $(EXECUTABLE_DIR) ) - endif - +ifeq "$(CLAM_COMPILER)" "GNU_DARWIN" + # finds the crypto code on macos. + HEADER_SEARCH_PATH += /usr/local/opt/openssl/include + LIBRARY_SEARCH_PATH += /usr/local/opt/openssl/lib/ endif -#ifeq "$(OP_SYSTEM)" "WIN32" -ifeq "$(COMPILER)" "VISUAL_CPP" - # prep the actual source variable so that certain file names are translated. - ACTUAL_RESX = $(RESX:%.resx=$(OBJECT_DIR)/%.resources) - ACTUAL_RESX_FLAGS = $(ACTUAL_RESX:%=-ASSEMBLYLINKRESOURCE:%) -else - ACTUAL_RESX = - ACTUAL_RESX_FLAGS = -endif +############################################################################### # Create the real list of local libraries needed. TEMP_LOC1 = $(LOCAL_LIBS_USED:%=%$(TRIPART_VERSION)) @@ -272,22 +98,10 @@ ACTUAL_LOCAL_LIBS = $(TEMP_LOC1) # Create the list of objects from the list of source files. TEMP_OBJ1 = $(SOURCE:%.cpp=%.obj) TEMP_OBJ2 = $(TEMP_OBJ1:%.c=%.obj) -ifeq "$(COMPILER)" "VISUAL_CPP" - ifneq "$(OMIT_VERSIONS)" "" - # remove version rc files if we're not dealing with versions. - TEMP_OBJ3a = $(TEMP_OBJ2:%_version.rc=) - else - TEMP_OBJ3a = $(TEMP_OBJ2) - endif - ifeq "$(COMPILER)" "VISUAL_CPP" - TEMP_OBJ3 = $(TEMP_OBJ3a:%.rc=%.res) - else - TEMP_OBJ3 = $(TEMP_OBJ3a) - endif -else - # replace this when supporting resource files on unix. - TEMP_OBJ3 = $(TEMP_OBJ2:%.rc=) -endif + +# replace this when supporting resource files on unix. +TEMP_OBJ3 = $(TEMP_OBJ2:%.rc=) + TEMP_OBJ4 = $(TEMP_OBJ3:%.h=%.bad) OBJECTS = $(TEMP_OBJ4) @@ -300,7 +114,7 @@ OBJECTS = $(TEMP_OBJ4) ACTUAL_OBJECTS = $(OBJECTS) $(EXTRA_OBJECTS) # Updates the search path for the compiler and local libraries. -BASE_HEADER_PATH = $(CODEBASE_HEADERS) $(LOCAL_HEADERS) $(HOOPLE_HEADERS) $(SEARCH_DIRS) +BASE_HEADER_PATH = $(CODEBASE_HEADERS) $(LOCAL_HEADERS) $(strip $(FEISTY_MEOW_CPP_HEADERS)) $(SEARCH_DIRS) HEADER_SEARCH_PATH += $(BASE_HEADER_PATH) $(COMPILER_HEADER_DIR) LIBRARY_SEARCH_PATH += $(LOCAL_LIBRARIES) $(HOOPLE_LIBRARIES) \ @@ -313,8 +127,8 @@ COMPILER_FLAGS += $(HEADER_SEARCH_PATH:%=-I%) $(DEFINITIONS:%=-D%) $(UNDEFINITIO # The load flags are updated by looking for code libraries in the directories # to search and by adding all of the code libraries that are used. LOAD_FLAG_PREFIX += $(LIBRARY_SEARCH_PATH:%=$(LIBRARY_PATH_FLAG)%) -ifeq "$(OP_SYSTEM)" "UNIX" - ifneq "$(COMPILER)" "GNU_DARWIN" +ifeq "$(OPERATING_SYSTEM)" "UNIX" + ifneq "$(CLAM_COMPILER)" "GNU_DARWIN" LOAD_FLAG_PREFIX += -Xlinker --start-group LOAD_FLAG_SUFFIX += -Xlinker --end-group endif @@ -334,23 +148,9 @@ EXE_CPPS = $(EXE_TEMP_3:%.exe=%.cpp) # used for compiling multiple source files at the same time with visual cpp. MULTI_BUILD_CMD = $(CC) $(COMPILER_FLAGS) -c `cat $(BUILD_LIST_FILE)` $(OBJECT_NAME_FLAG)$(OBJECT_DIR)/ -# prepare for mfc style DLLs. currently we plan on all dlls we create being -# based on MFC. this is an unfortunate requirement for using the mfc debug -# support for allocations; if regular new and DEBUG_NEW get mixed together, -# crashes used to result. supposedly these are gone now at least. -ifneq "$(USE_MFC)" "" -# ifeq "$(OP_SYSTEM)" "WIN32" - ifeq "$(COMPILER)" "VISUAL_CPP" - # set the flag that says we are doing mfc extension dlls. - DEFINITIONS += _AFXDLL - DEPENDENCY_DEFINITIONS += _MT _DLL - DEPENDENCY_DEFINITIONS += __AFXWIN_H__ # add this flag to shut stdafx up. - endif -endif - ifeq "$(OMIT_VERSIONS)" "" - ifneq "$(VERSION_RC_ROOT)" "" - VERSION_TARGET = $(VERSION_RC_ROOT)_version.rc + ifneq "$(CLAM_VERSION_RC_ROOT)" "" + VERSION_TARGET = $(CLAM_VERSION_RC_ROOT)_version.rc endif endif @@ -374,34 +174,13 @@ endif ACTUAL_FIRST_TARGETS = check_requirements $(EXTRA_FIRST_TARGETS) $(VERSION_TARGET) $(FIRST_TARGETS) pre_compilation # Adds the primary targets to the list of products to create. -#ifeq "$(NO_COMPILE)" "" - - ifneq "$(COMPILER)" "VISUAL_CPP" - ACTUAL_TARGETS1 = $(TARGETS:%.exe=$(EXECUTABLE_DIR)/%) - else - ACTUAL_TARGETS1 = $(TARGETS:%.exe=$(EXECUTABLE_DIR)/%.exe) - endif - - ifneq "$(COMPILER)" "VISUAL_CPP" - ACTUAL_TARGETS2 = $(ACTUAL_TARGETS1:%.dll=%.so) - ACTUAL_TARGETS3 = $(ACTUAL_TARGETS2:%.so=$(DYNAMIC_LIBRARY_DIR)/%$(TRIPART_VERSION).so) - else - ACTUAL_TARGETS2 = $(ACTUAL_TARGETS1:%.so=%.dll) - ACTUAL_TARGETS3 = $(ACTUAL_TARGETS2:%.dll=$(DYNAMIC_LIBRARY_DIR)/%$(TRIPART_VERSION).dll) - endif - - ACTUAL_TARGETS4 = $(ACTUAL_TARGETS3:%.lib=$(STATIC_LIBRARY_DIR)/%$(TRIPART_VERSION).library) - ACTUAL_TARGETS = $(ACTUAL_TARGETS4:%.elf=$(EXECUTABLE_DIR)/%.elf) +ACTUAL_TARGETS1 = $(TARGETS:%.exe=$(EXECUTABLE_DIR)/%) +ACTUAL_TARGETS2 = $(ACTUAL_TARGETS1:%.dll=%.so) +ACTUAL_TARGETS3 = $(ACTUAL_TARGETS2:%.so=$(DYNAMIC_LIBRARY_DIR)/%$(TRIPART_VERSION).so) +ACTUAL_TARGETS4 = $(ACTUAL_TARGETS3:%.lib=$(STATIC_LIBRARY_DIR)/%$(TRIPART_VERSION).library) +ACTUAL_TARGETS = $(ACTUAL_TARGETS4:%.elf=$(EXECUTABLE_DIR)/%.elf) -#else #is no_compile -# ACTUAL_TARGETS1 = $(TARGETS:%.exe=) -# ACTUAL_TARGETS2 = $(ACTUAL_TARGETS1:%.dll=) -# ACTUAL_TARGETS3 = $(ACTUAL_TARGETS2:%.so=) -# ACTUAL_TARGETS4 = $(ACTUAL_TARGETS3:%.lib=) -# ACTUAL_TARGETS = $(ACTUAL_TARGETS4:%.elf=) -#endif - -# Adds the last few targets for CLAM to do. +# Adds the last few targets that CLAM works on. ACTUAL_LAST_TARGETS = post_compilation $(LAST_TARGETS) ############################################################################ @@ -448,7 +227,7 @@ endif #hmmm: fix this. # Adds the main CLAM system in to get some work done. This should be placed -# after the module's rules are defined and before the module's targets are +# after the module rules are defined and before the module targets are # defined. include rules.def @@ -477,15 +256,9 @@ cpp_add_to_cleanups_variable: $(OBJECT_DIR)/%.obj: $(CURRENT_DIR)/%.cpp ifeq "$(NO_COMPILE)" "" - ifneq "$(COMPILER)" "VISUAL_CPP" @echo Compiling Object [$(notdir $@)] $(HIDESH)-c 'if [ ! -d $(@D) ]; then mkdir $(@D); fi' $(CATCHER)$(CC) $(COMPILER_FLAGS) -c $< $(OBJECT_NAME_FLAG)$@ - else - @echo $< >>$(BUILD_LIST_FILE) - @echo $@ >>$(BUILD_WHACK_FILE) - @echo >$@ - endif endif ############################################################################ @@ -494,43 +267,21 @@ endif $(OBJECT_DIR)/%.obj: $(CURRENT_DIR)/%.c ifeq "$(NO_COMPILE)" "" - ifneq "$(COMPILER)" "VISUAL_CPP" @echo Compiling Object [$(notdir $@)] $(HIDESH)-c 'if [ ! -d $(@D) ]; then mkdir $(@D); fi' $(CATCHER)$(CC) $(COMPILER_FLAGS) -c $< $(OBJECT_NAME_FLAG)$@ - else - @echo $< >>$(BUILD_LIST_FILE) - @echo $@ >>$(BUILD_WHACK_FILE) - @echo >$@ - endif endif ############################################################################ -# resource compiler for win32. +# resource compiler for windoze. -ifeq "$(COMPILER)" "VISUAL_CPP" -$(OBJECT_DIR)/%.res: %.rc $(PARAMETER_FILE) - ifeq "$(NO_COMPILE)" "" - @echo Resource [$@] - $(HIDESH)-c 'if [ ! -d $(@D) ]; then mkdir $(@D); fi' - $(CATCHER)$(RC) -r $(DEFINITIONS:%=-D%) $(HEADER_SEARCH_PATH:%=-i%) -fo $@ $< - endif - -$(OBJECT_DIR)/%.resources: %.resx $(PARAMETER_FILE) - ifeq "$(NO_COMPILE)" "" - @echo Resource [$@] - $(HIDESH)-c 'if [ ! -d $(@D) ]; then mkdir $(@D); fi' - $(VCS_ROOT)/../SDK/v1.1/bin/resgen $< $@ - endif -else #non-visual studio - # this platform probably does not use rc files. +# we currently do not use rc files. $(OBJECT_DIR)/%.res: %.rc ifeq "$(NO_COMPILE)" "" @echo Bogus resource [$@] @echo >$@ endif -endif #win32 ############################################################################ @@ -543,14 +294,13 @@ ifeq "$(NO_COMPILE)" "" $(STATIC_LIBRARY_DIR)/%.library: $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(PARAMETER_FILE) $(HIDER)echo Building Static Library [$(notdir $@)] @echo $@ >$(DIRTY_FILE) - ifeq "$(COMPILER)" "VISUAL_CPP" - $(HIDESH)-c 'if [ -f $(BUILD_LIST_FILE) ]; then $(SHELL) $(CLAM_SCRIPTS)/cpp/rebuild_oldies.sh $(MULTI_BUILD_CMD); fi' - endif $(CATCHER)$(LIBRARY_TOOL) $(LIBRARIAN_FLAGS) $(CREATE_LIBRARY_FLAG)$@ $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) - ifneq "$(OP_SYSTEM)" "UNIX" - $(HIDER)mv $@ $(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) - $(HIDER)echo nil >$@ + ifneq "$(OPERATING_SYSTEM)" "UNIX" + $(HIDER)ranlib $@ + $(HIDER)rm -f $(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) + $(HIDER)ln -s $@ $(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) else +#copied from unix above, not right yet, was not right before either though. $(HIDER)ranlib $@ $(HIDER)rm -f $(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) $(HIDER)ln -s $@ $(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) @@ -563,7 +313,7 @@ endif #no_compile # we whack any existing LIB file, since we want to use changes in that file # as a clue for when we should rescan the dependencies. we'd be fine if -# visual c++ didn't keep an existing LIB if it doesn't change (even when the +# visual c++ didn't keep an existing LIB if it does not change (even when the # DLL does). ifneq "$(NO_COMPILE)" "" @@ -572,21 +322,16 @@ endif ifeq "$(NO_COMPILE)" "" $(DYNAMIC_LIBRARY_DIR)/%.dll: $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(ACTUAL_RESX) $(PARAMETER_FILE) -#hmmm: use the res objects variable to rebuild res files as needed. -###$(RES_OBJECTS) $(HIDER)echo Building Dynamic Library [$(notdir $@)] @echo $@ >$(DIRTY_FILE) - ifeq "$(COMPILER)" "VISUAL_CPP" - $(HIDESH)-c 'if [ -f $(BUILD_LIST_FILE) ]; then $(SHELL) $(CLAM_SCRIPTS)/cpp/rebuild_oldies.sh $(MULTI_BUILD_CMD); fi' - endif $(HIDER)rm -f $(@:%.dll=%.lib) echo about to run link tool. $(CATCHER)$(LINK_TOOL) $(LINKER_OUTPUT_FLAG)$@ -dll $(LOAD_FLAG_PREFIX) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_RESX_FLAGS) $(ACTUAL_LOCAL_LIBS:%=$(LIBRARY_NAME_FLAG)$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) echo ran link tool. - ifeq "$(COMPILER_VERSION)" "8" + ifeq "$(CLAM_COMPILER_VERSION)" "8" $(HIDESH)$(CLAM_SCRIPTS)/cpp/ms_manifest.sh "$@" "2" endif - ifeq "$(COMPILER_VERSION)" "10" + ifeq "$(CLAM_COMPILER_VERSION)" "10" $(HIDESH)$(CLAM_SCRIPTS)/cpp/ms_manifest.sh "$@" "2" endif ifneq "$(VCPP_VISTA_ICON)" "" @@ -600,7 +345,7 @@ endif ifeq "$(NO_COMPILE)" "" $(DYNAMIC_LIBRARY_DIR)/%.so: $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(PARAMETER_FILE) - ifeq "$(COMPILER:%_LINUX=LINUX)" "LINUX" + ifeq "$(CLAM_COMPILER:%_LINUX=LINUX)" "LINUX" $(HIDER)echo Shared [$@] @echo $@ >$(DIRTY_FILE) $(CATCHER)$(LINK_TOOL) $(LINKER_OUTPUT_FLAG)$@ $(LOAD_FLAG_PREFIX) -shared -Wl,-soname,$*.so $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(LIBRARY_NAME_FLAG)%) $(LOAD_FLAG_SUFFIX) @@ -613,46 +358,18 @@ endif #no_compile # creates "exe" executables using all of the appropriate objects. -ifeq "$(COMPILER)" "VISUAL_CPP" - ifneq "$(NO_COMPILE)" "" -$(EXECUTABLE_DIR)/%.exe: - endif - - ifeq "$(NO_COMPILE)" "" -$(EXECUTABLE_DIR)/%.exe: $(OBJECT_DIR)/%.obj $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(ACTUAL_RESX) $(PARAMETER_FILE) - $(HIDER)echo Building Application [$(notdir $@)] - @echo $@ >$(DIRTY_FILE) - ifeq "$(COMPILER)" "VISUAL_CPP" - $(HIDESH)-c 'if [ -f $(BUILD_LIST_FILE) ]; then $(SHELL) $(CLAM_SCRIPTS)/cpp/rebuild_oldies.sh $(MULTI_BUILD_CMD); fi' - endif - $(CATCHER)$(LINK_TOOL) $(EXE_FLAGS) $(LOAD_FLAG_PREFIX) $< $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_RESX_FLAGS) $(ACTUAL_LOCAL_LIBS:%=$(LIBRARY_NAME_FLAG)$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@ -#$(^:force_rebuild=) - ifeq "$(COMPILER_VERSION)" "8" - $(HIDESH)$(CLAM_SCRIPTS)/cpp/ms_manifest.sh "$@" "1" - endif - ifeq "$(COMPILER_VERSION)" "10" - $(HIDESH)$(CLAM_SCRIPTS)/cpp/ms_manifest.sh "$@" "1" - endif - ifneq "$(VCPP_VISTA_ICON)" "" - $(HIDER)ReplaceVistaIcon "$@" "$(VCPP_VISTA_ICON)" - endif - endif #no_compile -endif #visual studio - -ifneq "$(COMPILER)" "VISUAL_CPP" - ifneq "$(NO_COMPILE)" "" +ifneq "$(NO_COMPILE)" "" $(EXECUTABLE_DIR)/%: - endif +endif - ifeq "$(NO_COMPILE)" "" +ifeq "$(NO_COMPILE)" "" $(EXECUTABLE_DIR)/%: $(OBJECT_DIR)/%.obj $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(STATIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(PARAMETER_FILE) $(HIDER)echo Building Application [$(notdir $@)] @echo $@ >$(DIRTY_FILE) $(CATCHER)$(LINK_TOOL) $(EXE_FLAGS) $(LOAD_FLAG_PREFIX) $< $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_LOCAL_LIBS:%=$(LIBRARY_NAME_FLAG)%) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@ #hmmm: experimental item below. #$(^:force_rebuild=) - endif #no_compile -endif #unix +endif #no_compile ############################################################################ @@ -679,10 +396,10 @@ endif #no_compile # handles creating version resource files if this project has a version.ini. ifeq "$(OMIT_VERSIONS)" "" - ifneq "$(VERSION_RC_ROOT)" "" + ifneq "$(CLAM_VERSION_RC_ROOT)" "" # only redo the version resource if it or version.ini is out of date. %_version.rc: version.ini $(PARAMETER_FILE) - $(CATCHER)$(CLAM_BINARIES)/version_stamper$(EXE_END) . $(FEISTY_MEOW_GENERATED_STORE)/versions $(PARAMETER_FILE) + $(CATCHER)$(CLAM_BINARIES)/version_stamper$(EXE_ENDING) . $(FEISTY_MEOW_GENERATED_STORE)/versions $(PARAMETER_FILE) endif endif @@ -697,8 +414,6 @@ ifeq "$(TYPE)" "hierarchy" endif ifneq "$(CLEAN)" "" NO_DEPS = t - # no dependencies get left when we are cleaning up. -# $(shell rm -f $(DEPS_FILE)) endif ifneq "$(NO_COMPILE)" "" # non compiling projects do not need dependencies. @@ -735,10 +450,10 @@ else deps: $(DEPS_FILE) # this causes the dependency file to be regenerated if the sources or libs - # have changed. we have to touch the deps file in case it's missing; - # makedep doesn't deal well with that. also, we touch the dirty flag file + # have changed. we have to touch the deps file in case it is missing; + # makedep does not deal well with that. also, we touch the dirty flag file # to ensure that the fact we redid dependencies for some reason causes us - # to re-promote. we only bother with any of this if we know we're going + # to re-promote. we only bother with any of this if we know we are going # to really do some compilation; if in non-compile mode, we'll skip it. ifneq "$(NO_COMPILE)" "" # no dependencies in non-compile mode. @@ -750,17 +465,17 @@ else else # lax dependencies means create if missing or if parm file changed. $(DEPS_FILE): $(PARAMETER_FILE) endif # !lax dependencies. - ifneq "$(VERSION_RC_ROOT)" "" + ifneq "$(CLAM_VERSION_RC_ROOT)" "" ifeq "$(OMIT_VERSIONS)" "" - $(DEPS_FILE): $(VERSION_RC_ROOT)_version.rc + $(DEPS_FILE): $(CLAM_VERSION_RC_ROOT)_version.rc endif endif @echo Dependencies [$(notdir $@)] -$(HIDESH)$(CLAM_SCRIPTS)/cpp/preconditions.sh @touch $@ # @echo dep adds: $(DEPENDENCY_ADDITIONS) - @$(CLAM_BINARIES)/makedep$(EXE_END) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS) -# $(CATCHER)$(CLAM_BINARIES)/makedep$(EXE_END) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS) + @$(CLAM_BINARIES)/makedep$(EXE_ENDING) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS) +# $(CATCHER)$(CLAM_BINARIES)/makedep$(EXE_ENDING) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS) @echo $@ >$(SUBMAKE_FLAG) endif # non-compile. else # cleaning. @@ -804,7 +519,7 @@ pre_compilation: ############################################################################ # calls the script for copying the final products to the library directory. -# we don't bother reporting errors from touch since there will sometimes +# we do not bother reporting errors from touch since there will sometimes # not be any objects in the final directory. post_compilation: $(HIDESH)$(CLAM_SCRIPTS)/cpp/postconditions.sh diff --git a/scripts/clam/cpp/variables.def b/scripts/clam/cpp/variables.def index 9ab02a87..0ba91e04 100644 --- a/scripts/clam/cpp/variables.def +++ b/scripts/clam/cpp/variables.def @@ -21,74 +21,6 @@ include variables.def ############################################################################### -#no # set the repository directory if it is still set to the base version. -#ifeq "$(FEISTY_MEOW_APEX)" "" -# ifeq "$(OP_SYSTEM)" "UNIX" -# export FEISTY_MEOW_APEX = $(HOME)/hoople -# endif -# ifeq "$(OP_SYSTEM)" "WIN32" -# export FEISTY_MEOW_APEX = l: -# endif -#endif - -#export CLAM_BINARIES = $(CLAM_SCRIPTS)/../bin - -############################################################################### - -# BASE_CPU is a flag that distinguishes the type of processor, if necessary. -export BASE_CPU -#BASE_CPU := m68k = motorola 68000 series | m68340 = motorola 68340 -# | x86 = intel x86 | ppc = power pc | arm = ARM core - -# set the CPU to a default if it has not been set previously. -ifeq "$(BASE_CPU)" "" -# ifneq "$(OP_SYSTEM)" "WIN32" - BASE_CPU := $(shell machine 2>/dev/null || arch 2>/dev/null || uname -m 2>/dev/null || echo i686) -# endif - -# ifeq "$(BASE_CPU)" "" -# BASE_CPU := $(shell uname -m) -# BASE_CPU := $(shell arch) -# ifeq "$(BASE_CPU)" "" -# # failed to get the cpu type. -# BASE_CPU := x86 -# endif -# endif -endif - -# COMPILER is a flag that specifies the compiler that will be used to build -# code. It is mainly used within CLAM itself for determining the proper -# compiler flags. -export COMPILER -#COMPILER := GNU_LINUX | GNU_ARM_LINUX | GNU_DARWIN | GNU_WINDOWS | VISUAL_CPP - -# choose a default compiler if none was specified. -ifeq "$(COMPILER)" "" - ifeq "$(OP_SYSTEM)" "UNIX" - ifeq "$(OS_SUBCLASS)" "darwin" - COMPILER := GNU_DARWIN - else - COMPILER := GNU_LINUX - endif - endif - ifeq "$(OP_SYSTEM)" "WIN32" -# COMPILER := GNU_WINDOWS - COMPILER := VISUAL_CPP - endif - ifeq "$(COMPILER)" "" - # if we get into this case, we have no idea how to set the default - # compiler. you may need to change the above logic for guessing it - # anyhow. but we will go with our favorite default. - COMPILER := GNU_LINUX - endif -endif - -# COMPILER_VERSION specifies the version of a particular compiler, if this is -# needed to distinguish how the code is built. -export COMPILER_VERSION - -############################################################################### - # "TYPE" is the kind of product being generated by this project. this is # used to decide where to put the final products of compilation. this is a # variable in the user makefile. @@ -198,9 +130,9 @@ export OUTPUT_ROOT = $(CLAM_TMP)/objects # "CPU_BUILD_DIR" distinguishes object directories by including the CPU # name and the type of build. ifneq "$(DEBUG)" "" - CPU_BUILD_DIR = $(BASE_CPU)_$(PLATFORM_ADD_IN)dbg + CPU_BUILD_DIR = $(CLAM_BASE_CPU)_$(PLATFORM_ADD_IN)dbg else - CPU_BUILD_DIR = $(BASE_CPU)_$(PLATFORM_ADD_IN)rel + CPU_BUILD_DIR = $(CLAM_BASE_CPU)_$(PLATFORM_ADD_IN)rel endif # "BASE_OUTPUT_PATH" is the parent directory of objects for this type of @@ -208,7 +140,7 @@ endif export BASE_OUTPUT_PATH = $(OUTPUT_ROOT)/$(CPU_BUILD_DIR) # special case when doing arm-linux builds -ifeq "$(COMPILER)" "GNU_ARM_LINUX" +ifeq "$(CLAM_COMPILER)" "GNU_ARM_LINUX" export TARGETS_STORE = $(FEISTY_MEOW_APEX)/$(CPU_BUILD_DIR) # special output directory for firmware does not include CPU name because # the repository already include the CPU name @@ -228,21 +160,9 @@ export DYNAMIC_LIBRARY_DIR = $(TARGETS_STORE) export STATIC_LIBRARY_DIR = $(TARGETS_STORE) # "HEADER_SEARCH_PATH" is where the class interface files are to be found. -# we add the generated store folder for the build version file. -HEADER_SEARCH_PATH = $(FEISTY_MEOW_GENERATED_STORE)/versions - -# "HOOPLE_HEADERS" are locations where the HOOPLE headers can be found. -ifeq "$(HOOPLE_HEADERS)" "" -#seems like some of this is redundant with earlier 3rdparty exploring. - LOCUS_LIBRARY_HEADERS = $(shell bash -c '\ - if [ -d "$(FEISTY_MEOW_APEX)/nucleus" ]; then \ - echo "$(FEISTY_MEOW_APEX)/nucleus" "$(FEISTY_MEOW_APEX)/octopi" "$(FEISTY_MEOW_APEX)/graphiq" ; \ - else \ - echo ""; \ - fi | tr "\\\\" / | sed -e "s/\([a-zA-Z]\):\/\([^ ]*\)/\/cygdrive\/\1\/\2/g" ') - # above assumes cygwin support for windows! was assuming msys support. - HOOPLE_HEADERS := $(shell $(FIND) $(LOCUS_LIBRARY_HEADERS) -mindepth 1 -maxdepth 1 -type d ) -endif +# the generated store folder is added to access the build version file. +# the binaries are added to access the system_helper.h file. +HEADER_SEARCH_PATH = $(FEISTY_MEOW_GENERATED_STORE)/versions $(FEISTY_MEOW_BINARIES) # "LOCAL_HEADERS" are overrides that go first in the header search path. LOCAL_HEADERS = $(THIRD_PARTY_DIR) @@ -403,9 +323,12 @@ LIBRARY_PATH_FLAG = -L # The name of the library creator tool. #LIBRARY_TOOL = -# the root name of the version file. This is currently irrelevant on -# non-win32 platforms. -VERSION_RC_ROOT = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/rc_name.sh) +ifeq "$(OPERATING_SYSTEM)" "WIN32" + # the root name of the version file. This is currently irrelevant on + # non-windoze platforms. + #CLAM_VERSION_RC_ROOT = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/rc_name.sh) + #hmmm: also currently irrelevant since we are only doing static builds. +endif ifneq "$(CONSOLE_MODE)" "" # this definition can be used to signal different behavior when the app is @@ -417,42 +340,34 @@ endif ############################################################################### # Operating system dependent flags. +# (not so OS dependent with move to only gnu compilation...) -ifeq "$(OP_SYSTEM)" "UNIX" - LIB_ENDING = .a - DYNLIB_ENDING = .so -endif -ifeq "$(OP_SYSTEM)" "WIN32" - ifeq "$(COMPILER)" "VISUAL_CPP" - LIB_ENDING = .lib - DYNLIB_ENDING = .dll - else - LIB_ENDING = .a - DYNLIB_ENDING = .so - endif -endif +LIB_ENDING = .a +DYNLIB_ENDING = .so ############################################################################### # Compiler Dependent Flags # -# "COMPILER_ROOT_DIR" is the top-level for the C++ compiler location. -export COMPILER_ROOT_DIR +# "CLAM_COMPILER_ROOT_DIR" is the top-level for the C++ compiler location. # "COMPILER_HEADER_DIR" is where the compiler headers are. -export COMPILER_HEADER_DIR # "COMPILER_LIBRARY_DIR" is where archived libraries are. # "CC" is the name of the C++ compiler to be used. +export COMPILER_HEADER_DIR # These flags may be useful across multiple compilers. # -# SSL brings in the OpenSSL libraries. -USE_SSL= +# "USE_SSL" brings in the OpenSSL libraries. +#USE_SSL = + +# "USE_CURL" provides access to the curl library. +#USE_CURL = -# CURL provides access to the curl library. -USE_CURL= +# "USE_WXWIDGETS" enables wxwidget library support. +#USE_WXWIDGETS = -# Enables wxwidget library support. -USE_WXWIDGETS= +# "USE_XWIN" specifies that this project needs X window system support. +#USE_XWIN = ifneq "$(OMIT_VERSIONS)" "" DEFINITIONS += NO_VERSION @@ -462,29 +377,24 @@ endif # compiler specific section below. ############################################################################ -ifeq "$(COMPILER)" "GNU_LINUX" +ifeq "$(CLAM_COMPILER)" "GNU_LINUX" # Unix GNU compiler... CC = g++ - COMPILER_ROOT_DIR = / PLATFORM_ADD_IN = linux_ - ARCHITECTURE = $(shell machine 2>/dev/null || arch 2>/dev/null || echo i686) - - export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) ) - DEFINITIONS += _FILE_OFFSET_BITS=64 DEPENDENCY_DEFINITIONS += NO_VERSION - DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(COMPILER_VERSION) -X/usr/include/c++/$(COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i686-linux-gnu/$(COMPILER_VERSION)/include -X/usr/lib/gcc/x86_64-linux-gnu/$(COMPILER_VERION)/include -X/usr/include/x86_64-linux-gnu -X/usr/include/i386-linux-gnu - - # "USE_XWIN" specifies that this project needs X window system support. - #USE_XWIN = +#hmmm: uggh, can we clean up this huge list of dep adds somehow? + DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(CLAM_COMPILER_VERSION) -X/usr/include/c++/$(CLAM_COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(CLAM_COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(CLAM_COMPILER_VERSION)/include -X/usr/lib/gcc/i686-linux-gnu/$(CLAM_COMPILER_VERSION)/include -X/usr/lib/gcc/x86_64-linux-gnu/$(COMPILER_VERION)/include -X/usr/include/x86_64-linux-gnu -X/usr/include/i386-linux-gnu - ifeq "x86_64" "$(ARCHITECTURE)" - COMPILER_LIBRARY_DIR = /lib64 /usr/lib64 /usr/local/lib64 - else - COMPILER_LIBRARY_DIR = /lib /usr/lib /usr/local/lib - endif +# ifeq "x86_64" "$(CLAM_BASE_CPU)" +# COMPILER_LIBRARY_DIR = /lib64 /usr/lib64 /usr/local/lib64 +# else +# COMPILER_LIBRARY_DIR = /lib /usr/lib /usr/local/lib +# endif DEFINITIONS += __LINUX__ linux __linux__ UNIX unix __UNIX__ __USE_GNU + +#hmmm: move to an x win enabling area. # X Window System not enabled by default. #DEFINITIONS += __XWINDOWS__ @@ -498,6 +408,8 @@ ifeq "$(COMPILER)" "GNU_LINUX" # space on end is significant. LINKER_OUTPUT_FLAG = -o LINK_TOOL = g++ + + COMPILER_FLAGS += -shared-libgcc -fPIC # compiler flags for gcc: # -finline-functions: inline functions as needed. # -fPIC: generate position independent code. @@ -508,8 +420,6 @@ ifeq "$(COMPILER)" "GNU_LINUX" # -shared-libgcc: use the shared library version of compiler libraries. # -fno-exceptions: do not support exception handling and stack unwinding. - COMPILER_FLAGS += -shared-libgcc -fPIC - ifeq "$(DEBUG)" "" # COMPILER_FLAGS += -finline-functions endif @@ -546,24 +456,71 @@ endif ############################################################################ -ifeq "$(COMPILER)" "GNU_ARM_LINUX" +ifeq "$(CLAM_COMPILER)" "GNU_DARWIN" + # Darwin kernel GNU compiler... really more general macos (MacOS) here these days. + CC = g++ + PLATFORM_ADD_IN = darwin + DEFINITIONS += _FILE_OFFSET_BITS=64 + + DEPENDENCY_DEFINITIONS += NO_VERSION +# DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(CLAM_COMPILER_VERSION) -X/usr/include/c++/$(CLAM_COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(CLAM_COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(CLAM_COMPILER_VERSION)/include + DEPENDENCY_ADDITIONS = -X/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include + + COMPILER_HEADER_DIR := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include +#/usr/local/include /usr/include +#old /System/Library/Frameworks/Foundation.framework/Versions/C/Headers +#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include +#/Library/Developer/CommandLineTools/usr/include + +# ifeq "x86_64" "$(CLAM_BASE_CPU)" +# COMPILER_LIBRARY_DIR = /lib64 /usr/lib64 /usr/local/lib64 +# else +# COMPILER_LIBRARY_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib +##/usr/lib /usr/local/lib +# endif + + DEFINITIONS += UNIX unix __UNIX__ __USE_GNU + + LIBRARY_TOOL = ar + LIB_PREFIX = lib + # special flags for getting rid of warnings on fd_set. + LOAD_FLAG_PREFIX=-Wl,-U,___darwin_check_fd_set_overflow + + CREATE_LIBRARY_FLAG += -r + # space on end is significant. + LINKER_OUTPUT_FLAG = -o + LINK_TOOL = g++ + + # mac specific flags + COMPILER_FLAGS += -Wno-nullability-completeness +#trying this one again, which had been turned off. + COMPILER_FLAGS += -fgnu-runtime + + ifneq "$(DEBUG)" "" + # add in debugging flags. +# COMPILER_FLAGS += -g3 -O0 + endif +endif + +############################################################################ + +ifeq "$(CLAM_COMPILER)" "GNU_ARM_LINUX" # ARM-linux GNU compiler... - COMPILER_ROOT_DIR = /usr/local/arm-linux - CC = $(COMPILER_ROOT_DIR)/bin/g++ - PLATFORM_ADD_IN = linux_ - export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) ) +## CLAM_COMPILER_ROOT_DIR = /usr/local/arm-linux +#hmmm: the above is the one we may need to integrate into build_variables.sh + CC = $(CLAM_COMPILER_ROOT_DIR)/bin/g++ + PLATFORM_ADD_IN = linux_ SNAPGEAR_ROOT_DIR = $(HOME)/snapgear - DEPENDENCY_DEFINITIONS += NO_VERSION COMPILER_HEADER_DIR = $(SNAPGEAR_ROOT_DIR)/linux-2.4.x/include # COMPILER_HEADER_DIR += $(SNAPGEAR_ROOT_DIR)/include - COMPILER_HEADER_DIR += $(COMPILER_ROOT_DIR)/include $(COMPILER_ROOT_DIR)/lib + COMPILER_HEADER_DIR += $(CLAM_COMPILER_ROOT_DIR)/include $(CLAM_COMPILER_ROOT_DIR)/lib COMPILER_HEADER_DIR += /usr/local/lib/gcc-lib/arm-linux/3.3.2/include - COMPILER_LIBRARY_DIR = $(SNAPGEAR_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/lib/be + COMPILER_LIBRARY_DIR = $(SNAPGEAR_ROOT_DIR)/lib $(CLAM_COMPILER_ROOT_DIR)/lib/be DEFINITIONS += linux __linux__ unix UNIX __UNIX__ __LINUX__ @@ -572,12 +529,12 @@ ifeq "$(COMPILER)" "GNU_ARM_LINUX" COMPILER_FLAGS += -Wall -Werror endif - LIBRARY_TOOL = $(COMPILER_ROOT_DIR)/bin/ar + LIBRARY_TOOL = $(CLAM_COMPILER_ROOT_DIR)/bin/ar LIB_PREFIX = lib CREATE_LIBRARY_FLAG += -r # space on end is significant. - LINK_TOOL = $(COMPILER_ROOT_DIR)/bin/g++ + LINK_TOOL = $(CLAM_COMPILER_ROOT_DIR)/bin/g++ LINKER_OUTPUT_FLAG = -o EXE_FLAGS = -mbig-endian LOAD_FLAG_PREFIX += -v -mbig-endian @@ -592,32 +549,23 @@ endif ############################################################################ -ifeq "$(COMPILER)" "GNU_WINDOWS" +ifeq "$(CLAM_COMPILER)" "GNU_WINDOWS" # GNU compiler for MS Windoze... CC = g++ - ifeq "$(COMPILER_ROOT_DIR)" "" - COMPILER_ROOT_DIR = $(CYGROOT) - endif - - export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) ) - - RC := $(COMPILER_ROOT_DIR)/bin/windres +# RC := $(CLAM_COMPILER_ROOT_DIR)/bin/windres PLATFORM_ADD_IN = w32_ - COMPILER_HEADER_DIR = $(COMPILER_ROOT_DIR)/include $(COMPILER_ROOT_DIR)/include/c++/3.4.2 -#$(COMPILER_ROOT_DIR)/lib/gcc/mingw32/3.4.2/include -###$(COMPILER_ROOT_DIR)/usr/include/mingw $(COMPILER_ROOT_DIR)/usr/include $(COMPILER_ROOT_DIR)/usr/include/w32api $(COMPILER_ROOT_DIR)/usr/include/extras + COMPILER_HEADER_DIR = $(CLAM_COMPILER_ROOT_DIR)/include $(CLAM_COMPILER_ROOT_DIR)/include/c++/3.4.2 +#$(CLAM_COMPILER_ROOT_DIR)/lib/gcc/mingw32/3.4.2/include +###$(CLAM_COMPILER_ROOT_DIR)/usr/include/mingw $(CLAM_COMPILER_ROOT_DIR)/usr/include $(CLAM_COMPILER_ROOT_DIR)/usr/include/w32api $(CLAM_COMPILER_ROOT_DIR)/usr/include/extras - COMPILER_LIBRARY_DIR = $(COMPILER_ROOT_DIR)/lib - DEFINITIONS += __GNU_WINDOWS__ _Windows _WINDOWS WIN32 __WIN32__ __FLAT__ VC_EXTRALEAN WIN32_LEAN_AND_MEAN ATL_NO_LEAN_AND_MEAN _WIN32 __USE_W32_SOCKETS -#__cplusplus -#__USE_GNU + COMPILER_LIBRARY_DIR = $(CLAM_COMPILER_ROOT_DIR)/lib + DEFINITIONS += __GNU_WINDOWS__ _Windows _WINDOWS WIN32 __WIN32__ __FLAT__ VC_EXTRALEAN WIN32_LEAN_AND_MEAN ATL_NO_LEAN_AND_MEAN _WIN32 LIBRARY_TOOL = ar LIBRARY_PATH_FLAG = -L LIB_PREFIX = lib LIB_ENDING = .a -# LOAD_FLAG_PREFIX += -lpthread LOAD_FLAG_PREFIX += -mwindows CREATE_LIBRARY_FLAG += -r # space on end is significant. @@ -626,366 +574,9 @@ ifeq "$(COMPILER)" "GNU_WINDOWS" MIDL = midl -Oicf $(MIDL_DEFS) $(HEADER_SEARCH_PATH:%=-I% ) $(DEFINITIONS:%=-D% ) MIDL_DEFS = -no_robust # some lovely definitions used by some of the mfc and other ms code. - DEPENDENCY_DEFINITIONS += __cplusplus __MINGW32__ _WIN32 _CHAR_UNSIGNED M_I86 _M_I86 _M_IX86=500 _WIN32_WINNT=0x501 __RPC_WIN32__ __RPCNDR_H_VERSION__ __RPCPROXY_H_VERSION__ TARGET_IS_NT40_OR_LATER PGM_SETCHILD _MFC_VER=0x0600 - -endif - -############################################################################ - -ifeq "$(COMPILER)" "VISUAL_CPP" - # microsoft visual c++ 4.x, 5.x or 6.x. - - PLATFORM_ADD_IN = w32_ + DEPENDENCY_DEFINITIONS += __cplusplus __MINGW32__ _WIN32 _CHAR_UNSIGNED M_I86 _M_I86 _M_IX86=500 _WIN32_WINNT=0x501 __RPC_WIN32__ __RPCNDR_H_VERSION__ __RPCPROXY_H_VERSION__ TARGET_IS_NT40_OR_LATER PGM_SETCHILD +#hmmm: yuck; re-evaluate need for the above dep defs. - TRIPART_VERSION = - - CLEANUPS += $(PDB_DIR)/$(PROJECT)_bookkeeping.pdb -#hmmm: import libs for dynamic libraries on ms-win32 do not currently get -# cleaned up nicely. - - # ensure that any setting for this is seen by sub-shells. - export WIN32_MANIFEST_FILE - - # these define special characteristics for a program being built. - # BASE is almost always defined and pulls in fundamental w32 support. - # RPC supplies the remote procedure call libraries. - # SECURITY links with the w32 security APIs. - # CLR sets options that are appropriate for managed code. - VCPP_USE_BASE=true - VCPP_USE_RPC= - VCPP_USE_OLE= - VCPP_USE_SECURITY= - VCPP_USE_CLR= - VCPP_VISTA_ICON= - - # the framework dir points at the .net framework to be used for compilation. - ifeq "$(FRAMEWORK_VERSION)" "" - - # older .net 1.1. -# SHORT_FRAMEWORK_VERSION = 1.1 -# FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION).4322 - - # current .net 2.0. - SHORT_FRAMEWORK_VERSION = 2.0 - FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION).50727 - endif - ifeq "$(FRAMEWORK_DIR)" "" - FRAMEWORK_DIR = $(subst \,/,$(WINDIR))/Microsoft.NET/Framework/v$(FRAMEWORK_VERSION) - endif - - # calculate the visual studio root directory. - ifeq "$(VIS_STU_ROOT)" "" - export VIS_STU_ROOT := $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/ms_root_dir.sh ) - endif - ifneq "$(VIS_STU_ROOT)" "" - export COMPILER_ROOT_DIR = $(VIS_STU_ROOT)/VC - endif - ifeq "$(COMPILER_ROOT_DIR)" "" - HOSEUP = $(shell echo The compiler directory is not set. Please define the environment variable) - HOSEUP = $(shell echo VSxCOMNTOOLS (x=80, 90 or 100) to point at the folder where visual ) - HOSEUP = $(shell echo Studio is installed.) - HOSEUP = - endif - - # redo the compiler version with our new info. - export COMPILER_VERSION := $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) ) - - # set up a directory for debugging files to be stored. these are not - # moved with the postconditions--they are generated in place. - export PDB_DIR = $(TARGETS_STORE) - - # set these way up here so we can override them later. - CC = $(BUILD_SCRIPTS_PATH)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/cl.exe - LINK_TOOL = $(BUILD_SCRIPTS_PATH)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/link.exe - LIBRARY_TOOL = $(BUILD_SCRIPTS_PATH)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/lib - - # This is needed to protect against the use of 64-bit time_t structure - # on windows. We are casting to time_t from a 32-bit structure. - DEFINITIONS += _USE_32BIT_TIME_T - - # vary the locations for compiler files based on the version. - ifeq "$(COMPILER_VERSION)" "6" - COMPILER_HEADER_DIR = $(COMPILER_ROOT_DIR)/include $(COMPILER_ROOT_DIR)/atl/include - COMPILER_LIBRARY_DIR = $(COMPILER_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/atl/lib - RC = $(BUILD_SCRIPTS_PATH)/wrapdoze.sh $(COMPILER_ROOT_DIR)/../common/msdev98/bin/rc - endif - ifeq "$(COMPILER_VERSION)" "7" - COMPILER_HEADER_DIR = $(COMPILER_ROOT_DIR)/include $(COMPILER_ROOT_DIR)/atlmfc/include $(COMPILER_ROOT_DIR)/platformsdk/include $(FRAMEWORK_DIR) - COMPILER_LIBRARY_DIR = $(COMPILER_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/atlmfc/lib $(COMPILER_ROOT_DIR)/platformsdk/lib - RC = $(BUILD_SCRIPTS_PATH)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/rc - COMPILER_FLAGS += -Zc:forScope - # turn on proper loop scoping. - endif - ifeq "$(COMPILER_VERSION)" "8" - COMPILER_HEADER_DIR = $(COMPILER_ROOT_DIR)/include $(COMPILER_ROOT_DIR)/atlmfc/include $(COMPILER_ROOT_DIR)/platformsdk/include $(FRAMEWORK_DIR) - COMPILER_LIBRARY_DIR = $(COMPILER_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/atlmfc/lib $(COMPILER_ROOT_DIR)/platformsdk/lib - RC = $(BUILD_SCRIPTS_PATH)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/rc - COMPILER_FLAGS += -Zc:forScope - # turn on proper loop scoping. - DEFINITIONS += _WIN32_WINNT=0x501 - DEPENDENCY_DEFINITIONS += _WIN32_WINNT=0x501 - endif -# -# ver 9 (vis stu 2008) is not in here but is probably similar to 8 or 10. -# - ifeq "$(COMPILER_VERSION)" "10" - export PLATYPUS = $(WindowsSdkDir) - COMPILER_HEADER_DIR = $(COMPILER_ROOT_DIR)/include $(COMPILER_ROOT_DIR)/atlmfc/include $(PLATYPUS)/include -## $(FRAMEWORK_DIR) - COMPILER_LIBRARY_DIR = $(COMPILER_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/atlmfc/lib $(PLATYPUS)/lib - DEFINITIONS += _WIN32_WINNT=0x501 - DEPENDENCY_DEFINITIONS += _WIN32_WINNT=0x501 - RC = $(BUILD_SCRIPTS_PATH)/wrapdoze.sh $(PLATYPUS)/bin/rc - COMPILER_FLAGS += -Zc:forScope - # turn on proper loop scoping. - endif - ifeq "$(COMPILER_HEADER_DIR)" "" - HOSEUP = $(shell echo The compiler version is not set. Please define COMPILER_VERSION.) - endif - ifeq "$(COMPILER_HEADER_DIR)" "" - HOSEUP = $(shell echo The compiler version is not set. Please define COMPILER_VERSION.) - endif - ifeq "$(COMPILER_HEADER_DIR)" "0" - HOSEUP = $(shell echo The compiler version is not set. Please define COMPILER_VERSION.) - endif - - # add in the mfc directories. - COMPILER_HEADER_DIR += $(COMPILER_ROOT_DIR)/mfc/include - COMPILER_LIBRARY_DIR += $(COMPILER_ROOT_DIR)/mfc/lib - - DEFINITIONS += _Windows _WINDOWS WIN32 __WIN32__ __FLAT__ VC_EXTRALEAN WIN32_LEAN_AND_MEAN ATL_NO_LEAN_AND_MEAN - DEF_FILE = - LOAD_FLAG_PREFIX = -subsystem:windows -machine:X86 -nologo - LOAD_FLAG_SUFFIX = - - MIDL = "$(COMPILER_ROOT_DIR)/../Common7/Tools/Bin"/midl.exe -Oicf $(MIDL_DEFS) $(HEADER_SEARCH_PATH:%=-I% ) $(DEFINITIONS:%=-D% ) - MIDL_DEFS = -no_robust - - # additional definitions that get put on the command line for makedep. these - # are needed since visual c++ defines them automatically. - DEPENDENCY_DEFINITIONS += __cplusplus _WIN32 _CHAR_UNSIGNED M_I86 _M_I86 _MSC_VER=1200 _M_IX86=500 __RPC_WIN32__ __RPCNDR_H_VERSION__ __RPCPROXY_H_VERSION__ TARGET_IS_NT40_OR_LATER PGM_SETCHILD _MFC_VER=0x0600 - - # set the flags used by visual c++. - CREATE_LIBRARY_FLAG = -out: - LIBRARY_NAME_FLAG = - LIBRARY_PATH_FLAG = -libpath: - LINKER_OPTION_SEPARATOR = -link - LINKER_OUTPUT_FLAG = -out: - OBJECT_NAME_FLAG = -Fo - - # Add the extra files created by visual c++. -#is this needed now that we whack whole output path? CLEANUPS += $(OUTPUT_PATH)/*.*db - - # compilation parameters for microsoft. - # -c specifies compilation without linking. - # -EHsc is the flag for turning on exception handling. - # -FD is for getting the best dependency checking in visual studio. - # -Fd[filename] names the program database (PDB) file used for debugging. - # -Fp[filename] names the precompiled header file name. - # -FR[filename] names the browser output path used for source analysis. - # -Gd calling convention is cdecl. - # -Gm enables minimal rebuild (only if source files changed). - # Note! as of Visual Studio 6 SP 3, minimal rebuild does not work - # properly. Do not use it unless you want inconsistent builds! - # -GR enables run-time type identification (RTTI). - # -GS enables buffer checking. - # -GX turns on synchronous exception handling. (deprecated) - # -Gz uses __stdcall calling convention. - # -MD specifies multi-threaded DLL (MDd means debug). - # -ML signifies uni-threaded executable (MLd means debug). - # -MT indicates multi-threaded executable (MTd means debug) - # -O is for optimization (1 small code, 2 fast code, d disabled). - # do not use 1 or 2 though; they both include "global optimization", - # which seems plagued with problems. the specific optimizations are: - # -Oa assume no aliasing - # -Obn inline function expansion, where n is 1 (enable) or 0 (disable) - # -Od disable (for debug) - # -Oi generate intrinsic functions - # -Og global optimizations (flawed) - # -Op improve float consistency - # -Os favor small code - # -Ot favor fast code - # -Ow assume aliasing across function calls - # -Ox full optimization - # -Oy frame pointer optimization - # -O1 has g s y b1 Gs Gf Gy - # -O2 has g i t y b1 Gs Gf Gy - # -TP C++ compilation. - # -W sets the warning level (from 0 (least warnings) through 4 (loudest)). - # -WX turns all warnings into errors. - # -Yu[filename] uses a precompiled header file. - # -YX turns on precompiled headers. not used due to poor implementation. - # -Zi generates debugging information into the PDB file. - - # put the common flags into the compiler flags. - COMPILER_FLAGS += -nologo -Fd$(PDB_DIR)/$(PROJECT)_bookkeeping.pdb -GR -W3 -Zi -EHsc -GS -Gd -#-Wp64 - - ifneq "$(DEBUG)" "" - # disable function inlining and optimizations for debug. - COMPILER_FLAGS += -Ob0 -Od - else - # enable function inlining for release only. - COMPILER_FLAGS += -Ob1 - - ifneq "$(OPTIMIZE)" "" - # add in fast code optimization. - COMPILER_FLAGS += -O2 - else - # no optimizations. - endif - - endif - - # linking parameters for microsoft. - # -dll specifies that a dynamic library is to be created. - # -debug specifies that debugging information is to be included. - # -map turns on the map file. - # -warn sets the warning level, from 0 to 3, where 3 is the most verbose. - # kernel32.lib is the kernel support. - # user32.lib is the user level support. - # gdi32.lib is the graphical device interface? support. - # winspool.lib contains printer support. - # comdlg32.lib provides the common dialogs. - # advapi32.lib provides deeper win32 features, like registry, services, etc. - # shell32.lib is ? - # ole32.lib supplies OLE support. - # oleaut32.lib is the OLE automation library. - # uuid.lib has unique id management? - # odbc32.lib provides ODBC data source functionality. - # odbccp32.lib is something? - # winmm.lib has the win32 multimedia support. - # version.lib offers up splendid version services. - - # check if profiling is to be enabled. - PROFILER_FLAG = - ifneq "$(PROFILE)" "" - PROFILER_FLAG = -profile - endif - - LIBS_USED += htmlhelp.lib - - # add the common linker flags. the debugging flag is added because we - # want to be able to debug into release code, but since the pdb files - # are separate, we are not exposing ourselves when we do not include them. - LOAD_FLAG_PREFIX += $(PROFILER_FLAG) -debug -opt:ref -opt:icf -#-warn:3 - - # "USE_MFC" dictates whether mfc should be allowed in the application. - # the default is not to use MFC extension style dlls. this can be turned - # on in the individual makefiles that require MFC. - #USE_MFC = - - # the library creator gets a couple of flags. - LIBRARIAN_FLAGS += -nologo -machine:X86 -subsystem:windows - - # now, vary the flag configuration based on the flags that have been set. - -####override for windows since things are broken with WinMain -###export CONSOLE_MODE = true - - ifneq "$(CONSOLE_MODE)" "" - # console type of applications are built using the static flag so that - # they are more redistributable. - DEFINITIONS += _CONSOLE - LOAD_FLAG_SUFFIX += -subsystem:console - LIBRARIAN_FLAGS += -subsystem:console - endif - - # dynamically linked library or application flags. - ifneq "$(DEBUG)" "" - # debug. - DEFINITIONS += _DEBUG - COMPILER_FLAGS += -MDd - else - # release. - DEFINITIONS += NDEBUG - COMPILER_FLAGS += -MD - LOAD_FLAG_PREFIX += -map - endif - - ifneq "$(STRICT_WARNINGS)" "" - COMPILER_FLAGS += -WX -#would like to add W4 but that triggers warnings in microsoft headers. - endif - -endif - -############################################################################ - -ifeq "$(COMPILER)" "GNU_DARWIN" - # Darwin kernel GNU compiler... really more general macos (MacOS) here these days. - CC = g++ - COMPILER_ROOT_DIR = / - PLATFORM_ADD_IN = darwin - ARCHITECTURE = $(shell machine 2>/dev/null || arch 2>/dev/null || echo i686) - - export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) ) - - DEFINITIONS += _FILE_OFFSET_BITS=64 - - DEPENDENCY_DEFINITIONS += NO_VERSION -# DEPENDENCY_ADDITIONS = -X/usr/include -X/usr/include/c++/$(COMPILER_VERSION) -X/usr/include/c++/$(COMPILER_VERSION)/tr1 -X/usr/local/include -X/usr/include/linux -X/usr/include/wx-2.8 -X/usr/lib/gcc/i586-suse-linux/$(COMPILER_VERSION)/include -X/usr/lib/gcc/i486-linux-gnu/$(COMPILER_VERSION)/include - DEPENDENCY_ADDITIONS = -X/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include - - COMPILER_HEADER_DIR := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -#/usr/local/include /usr/include -#old /System/Library/Frameworks/Foundation.framework/Versions/C/Headers -#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -#/Library/Developer/CommandLineTools/usr/include - - # "USE_XWIN" specifies that this project needs X window system support. - #USE_XWIN = - -# ifeq "x86_64" "$(ARCHITECTURE)" -# COMPILER_LIBRARY_DIR = /lib64 /usr/lib64 /usr/local/lib64 -# else - COMPILER_LIBRARY_DIR = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib -#/usr/lib /usr/local/lib -# endif - -# DEFINITIONS += __LINUX__ linux __linux__ UNIX unix __UNIX__ __USE_GNU - DEFINITIONS += UNIX unix __UNIX__ __USE_GNU - # X Window System not enabled by default. - #DEFINITIONS += __XWINDOWS__ - - LIBRARY_TOOL = ar - LIB_PREFIX = lib -# LOAD_FLAG_PREFIX += -Xlinker -#mac has no o3??? -#-O3 - # special flags for getting rid of warnings on fd_set. - LOAD_FLAG_PREFIX=-Wl,-U,___darwin_check_fd_set_overflow - -# -Xlinker --print-map : shows what went in and why. -# -Xlinker -O3 : linker optimization - CREATE_LIBRARY_FLAG += -r - # space on end is significant. - LINKER_OUTPUT_FLAG = -o - LINK_TOOL = g++ -# COMPILER_FLAGS += -shared-libgcc -fPIC -#old: -Wl,-export-dynamic -# ifeq "$(DEBUG)" "" -# COMPILER_FLAGS += -finline-functions -# endif -# ifneq "$(STRICT_WARNINGS)" "" -# COMPILER_FLAGS += -Wall -Werror -Wextra -pedantic-errors -Wno-long-long -# endif -# LIBS_USED += dl pthread rt -#mac no like these libs - # dl=dynamic library. - # pthread=thread libraries. - # rt=real time libraries for shared memory. - - # mac specific flags - COMPILER_FLAGS += -Wno-nullability-completeness -#trying this one again, which had been turned off. - COMPILER_FLAGS += -fgnu-runtime - - ifneq "$(DEBUG)" "" - # add in debugging flags. -# COMPILER_FLAGS += -g3 -O0 - endif endif ############################################################################ @@ -993,7 +584,7 @@ endif # these activities are done after the compiler specific stuff. # add a definition for programs to be able to differentiate the versions. -DEFINITIONS += COMPILER_VERSION=$(COMPILER_VERSION) +DEFINITIONS += CLAM_COMPILER_VERSION=$(CLAM_COMPILER_VERSION) # set a variable that scripts can use to get most of the definitions. export VARIABLE_DEFINITION_SET := $(DEFINITIONS) diff --git a/scripts/clam/cpp/vis_stu/trap_new.addin b/scripts/clam/cpp/vis_stu/trap_new.addin deleted file mode 100644 index 2cce3945..00000000 --- a/scripts/clam/cpp/vis_stu/trap_new.addin +++ /dev/null @@ -1,7 +0,0 @@ -// this should be included before the first use of new in a header. - -#ifdef new - #undef new - #define NEW_TRAP -#endif - diff --git a/scripts/clam/cpp/vis_stu/untrap_new.addin b/scripts/clam/cpp/vis_stu/untrap_new.addin deleted file mode 100644 index 393b01b2..00000000 --- a/scripts/clam/cpp/vis_stu/untrap_new.addin +++ /dev/null @@ -1,15 +0,0 @@ - -// this should be included after the last usage of new that must be protected. - -#ifdef NEW_TRAP - #undef NEW_TRAP - #ifndef ENABLE_MEMORY_HOOK - #define new DEBUG_NEW - #else - #define new HOOPLE_NEW - #endif -#endif - - - - diff --git a/scripts/clam/dotnet-retired/csharper.sh b/scripts/clam/dotnet-retired/csharper.sh deleted file mode 100644 index ec476037..00000000 --- a/scripts/clam/dotnet-retired/csharper.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -declare -a flipped=() -for i in $*; do - flip=$(echo $i | sed -e 's/\/\([a-zA-Z]\)\//\1:\//' | tr '/' '\\') - flipped+=($flip) -done -${FRAMEWORK_DIR}/csc ${flipped[*]} - diff --git a/scripts/clam/dotnet-retired/postconditions.sh b/scripts/clam/dotnet-retired/postconditions.sh deleted file mode 100644 index 9d145243..00000000 --- a/scripts/clam/dotnet-retired/postconditions.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/bash -# copies the final products of the current project into the repository. - -# check whether a failure should prevent promotion from occurring. -if [ -f $FAILURE_FILE ]; then - echo Postconditions will not promote due to a failure: - cat $FAILURE_FILE - . $CLAM_SCRIPTS/exit_make.sh -fi - -# make sure that we actually did something during the make. -if [ ! -f "$DIRTY_FILE" -a ! -f "$SUBMAKE_FLAG" ]; then - # nothing was built, seemingly, so we do no promotion. - exit -fi - -# toss the flag files so we don't see them again. -rm -f "$DIRTY_FILE" "$SUBMAKE_FLAG" - -# clean up generated resource files after the build. -for i in *.resources; do rm -f "$i"; done - -# these variables define the locations for final products. all of them -# descend from the root of the repository. -ROOT=$TARGETS_STORE -LIB_DIR=$ROOT/lib -DLL_DIR=$ROOT/dll -EXE_DIR=$ROOT/exe -TEST_ROOT=$ROOT/tests -TEST_DIR=$TEST_ROOT/$PROJECT - -# causes the shell to quit. -DIE=". $CLAM_SCRIPTS/exit_make.sh" - -if [ "$TYPE" = "library" ]; then - - # make sure the required directories exist. - if [ ! -d $ROOT ]; then mkdir -p $ROOT; fi - if [ ! -d $LIB_DIR ]; then mkdir $LIB_DIR; fi - if [ ! -d $DLL_DIR ]; then mkdir $DLL_DIR; fi - - if [ -z "$NO_COMPILE" ]; then - # we ensure that none of the normal products are copied for a non-compiling - # style of project. - - # copy the import libraries for any DLLs. - if [ ! -z "`$FIND "$DYNAMIC_LIBRARY_DIR" -iname "*.lib"`" ]; then - echo Moving import libraries to $LIB_DIR. - mv "$DYNAMIC_LIBRARY_DIR"/*.lib $LIB_DIR - fi - - fi - -elif [ "$TYPE" = "application" ]; then - - # sets up the directory for executable programs and copies any found in the - # this project's final directory. - - # first make sure the executable directory is around. - if [ ! -d $EXE_DIR ]; then mkdir $EXE_DIR; fi - - if [ -z "$NO_COMPILE" ]; then - # we ensure that none of the normal products are copied for a non-compiling - # style of project. - - # copy anything extra over. - if [ ! -z "$EXTRA_COPIES" ]; then - echo Copying extra files to $EXE_DIR. - echo [$EXTRA_COPIES] - cp -f $EXTRA_COPIES $EXE_DIR || $DIE - fi - - fi - -elif [ "$TYPE" = "test" ]; then - - # sets up a directory for test programs based on the project name and copies - # the generated programs into there. - - # first make sure the test program root directory is around. - if [ ! -d $TEST_ROOT ]; then mkdir $TEST_ROOT; fi - - # create the target directory if it doesn't exist. - if [ ! -d $TEST_DIR ]; then mkdir $TEST_DIR; fi - - if [ -z "$NO_COMPILE" ]; then - # we ensure that none of the normal products are copied for a non-compiling - # style of project. - - # make the files writable. this is required for some tests' data files, - # which come in from the build and could be read-only. - chmod 777 $TEST_DIR/* $TEST_DIR/*/* $TEST_DIR/*/*/* >/dev/null 2>&1 - - # copy anything extra over. - if [ ! -z "$EXTRA_COPIES" ]; then - echo Copying extra files to $TEST_DIR. - echo [$EXTRA_COPIES] - cp -f $EXTRA_COPIES $TEST_DIR || $DIE - fi - - fi - -else - echo "Unknown type for project [$TYPE]; cancelling postconditions!" - . $CLAM_SCRIPTS/exit_make.sh -fi - diff --git a/scripts/clam/dotnet-retired/preconditions.sh b/scripts/clam/dotnet-retired/preconditions.sh deleted file mode 100644 index cdf66d75..00000000 --- a/scripts/clam/dotnet-retired/preconditions.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# prepares the project for compilation by creating the appropriate directories. - -# make sure the top-level repository exists. -if [ ! -d $FEISTY_MEOW_APEX ]; then mkdir -p $FEISTY_MEOW_APEX; fi -# make sure our temp directory is there. -if [ ! -d $CLAM_TMP ]; then mkdir -p $CLAM_TMP; fi -# make sure the generated files have a home. -if [ ! -d $TARGETS_STORE ]; then mkdir -p $TARGETS_STORE; fi -# create the generated files storage area. -if [ ! -d $OUTPUT_ROOT ]; then mkdir -p $OUTPUT_ROOT; fi -# create the top level object directory if it doesn't exist. -if [ ! -d $BASE_OUTPUT_PATH ]; then mkdir -p $BASE_OUTPUT_PATH; fi -# create the project level object directory if it is non-existent. -if [ ! -d $OUTPUT_PATH ]; then mkdir -p $OUTPUT_PATH; fi -# create a directory to hold any debugging files, if necessary. -if [ ! -d $PDB_DIR ]; then mkdir -p $PDB_DIR; fi -# -if [ ! -d $TESTS_DIR ]; then mkdir -p $TESTS_DIR; fi -# -if [ ! -d $EXECUTABLE_DIR ]; then mkdir -p $EXECUTABLE_DIR; fi -# -if [ ! -d $DYNAMIC_LIBRARY_DIR ]; then mkdir -p $DYNAMIC_LIBRARY_DIR; fi -# -if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir -p $STATIC_LIBRARY_DIR; fi - -# set versions on any extras that were specified in the makefile. -if [ ! -z "$EXTRA_VERSIONS" ]; then - for i in $EXTRA_VERSIONS; do $CLAM_BINARIES/version_stamper$EXE_END $i $PARAMETER_FILE; done -fi - -# create all the directories that objects will go into. -###for i in $OUTPUT_DIRECTORY_LIST; do -### if [ ! -d "$OUTPUT_PATH/$i" ]; then mkdir "$OUTPUT_PATH/$i"; fi -###done - -# for firmware compilations set the compiler to the correct processor platform -if [ "$COMPILER" = "DIAB" ]; then - $COMPILER_CONTROL $COMPILER_CONTROL_FLAGS -fi - diff --git a/scripts/clam/dotnet-retired/readme.txt b/scripts/clam/dotnet-retired/readme.txt deleted file mode 100644 index abe066a5..00000000 --- a/scripts/clam/dotnet-retired/readme.txt +++ /dev/null @@ -1,9 +0,0 @@ - - -this is out of date! - -it used to compile c# assets on windows pretty well. -now it probably does nothing. - -we intend to refurbish it for use with mono. - diff --git a/scripts/clam/dotnet-retired/rules.def b/scripts/clam/dotnet-retired/rules.def deleted file mode 100644 index 9ab0aaaf..00000000 --- a/scripts/clam/dotnet-retired/rules.def +++ /dev/null @@ -1,262 +0,0 @@ -############################################################################### - -# CLAM System default rules and targets for C++ compilation. - -# This file composite macros and rules for creating compilation objects -# (such as library archives, object files, executable programs, and others). - -# This file should be included in the user's Makefile after the variables -# have been initialized appropriately for the particular project being -# compiled. The user's own targets should be placed after the include -# directive that specifies this file. - -############################################################################### - -# This section manipulates variable values to prepare them for their use -# in the standard CLAM support. - -# Modify the output directory for executable files if we're building a -# test project. -ifeq "$(TYPE)" "test" - EXECUTABLE_DIR = $(TARGETS_STORE)/tests/$(PROJECT) - ifneq "$(CONSOLE_MODE)" "" - COMPILER_FLAGS += -target:exe - else - COMPILER_FLAGS += -target:winexe - endif -endif -ifeq "$(TYPE)" "application" - ifneq "$(CONSOLE_MODE)" "" - COMPILER_FLAGS += -target:exe - else - COMPILER_FLAGS += -target:winexe - endif -endif -ifeq "$(TYPE)" "library" - COMPILER_FLAGS += -target:library -endif - -# prep the actual source variable so that certain file names are translated. -ACTUAL_RESX = $(RESX:%.resx=%.resources) - -ifeq "$(OP_SYSTEM)" "WIN32" - ifneq "$(OMIT_VERSIONS)" "" - # remove version rc files if we're not dealing with versions. - ACTUAL_RESOURCE = $(RESOURCE:%.rc=) - else - ACTUAL_RESOURCE = $(RESOURCE:%.rc=%.res) - endif -else - # replace this when supporting resource files on unix. - ACTUAL_RESOURCE = $(RESOURCE:%.rc=) -endif - -# patch the sources so that subdirs work. -ACTUAL_SOURCE = $(SOURCE:%.cs=$(CURRENT_DIR)/%.cs) - -# visual studio settings. -ifeq "$(COMPILER)" "VISUAL_CPP" - # processes the def file for linkage, if one has been specified. - ifneq "$(DEF_FILE)" "" - LOAD_FLAG_PREFIX += -def:$(DEF_FILE) - endif - - # these are loaded after any special debugging libs. - ifneq "$(VCPP_USE_BASE)" "" - # the first set will be included in almost any old program. we include - # winmm for multimedia in the base support since we make heavy use of the - # more accurate uptime function. -# LOAD_FLAG_PREFIX += advapi32.lib kernel32.lib version.lib winmm.lib - endif -#is advapi32 really part of the base required stuff? will it work on -#win98? how about win95? - - ifneq "$(VCPP_USE_GUI)" "" - LOAD_FLAG_PREFIX += comdlg32.lib gdi32.lib user32.lib winspool.lib - endif - - ifneq "$(VCPP_USE_OLE)" "" - LOAD_FLAG_PREFIX += ole32.lib oleaut32.lib uuid.lib - VCPP_USE_RPC = t - endif - ifneq "$(VCPP_USE_RPC)" "" - LOAD_FLAG_PREFIX += rpcndr.lib rpcns4.lib rpcrt4.lib - VCPP_USE_SOCK = t - endif - ifneq "$(VCPP_USE_SOCK)" "" - LOAD_FLAG_PREFIX += netapi32.lib ws2_32.lib - endif -endif - -# Updates the search path for the compiler and local libraries. -BASE_HEADER_PATH = $(CODEBASE_HEADERS) $(LOCAL_HEADERS) $(HOOPLE_HEADERS) $(SEARCH_DIRS) -HEADER_SEARCH_PATH += $(BASE_HEADER_PATH) $(COMPILER_HEADER_DIR) - -LIBRARY_SEARCH_PATH += $(LOCAL_LIBRARIES) $(HOOPLE_LIBRARIES) \ - $(STATIC_LIBRARY_DIR) $(COMPILER_LIBRARY_DIR) $(SEARCH_DIRS) - -# Adds some directories that must be searched onto the search path for -# header files, such as the compiler's own special header file directory. -COMPILER_FLAGS += $(DEFINITIONS:%=-D:%) $(UNDEFINITIONS:%=-U%) -#$(HEADER_SEARCH_PATH:%=-I%) - -# The load flags are updated by looking for code libraries in the directories -# to search and by adding all of the code libraries that are used. -LOAD_FLAG_PREFIX += $(LIBRARY_SEARCH_PATH:%=$(LIBRARY_PATH_FLAG)%) -LOAD_FLAG_PREFIX += $(LIBS_USED:%=$(LIBRARY_NAME_FLAG)%) - -# prepare for mfc style DLLs. currently we plan on all dlls we create being -# based on MFC. this is an unfortunate requirement for using the mfc debug -# support for allocations; if regular new and DEBUG_NEW get mixed together, -# crashes used to result. supposedly these are gone now at least. -ifneq "$(USE_MFC)" "" - # set the flag that says we are doing mfc extension dlls. - DEFINITIONS += _AFXDLL - - # add in the mfc directories. - COMPILER_HEADER_DIR += $(COMPILER_ROOT_DIR)/mfc/include - COMPILER_LIBRARY_DIR += $(COMPILER_ROOT_DIR)/mfc/lib -endif - -ifeq "$(OMIT_VERSIONS)" "" - ifneq "$(VERSION_RC_ROOT)" "" - VERSION_TARGET = $(VERSION_RC_ROOT)_version.rc - endif -endif - -# Make sure that the directory for objects exists. -ACTUAL_FIRST_TARGETS = check_requirements $(VERSION_TARGET) $(FIRST_TARGETS) pre_compilation - -# Adds the primary targets to the list of products to create. -ACTUAL_TARGETS1 = $(TARGETS:%.exe=$(EXECUTABLE_DIR)/%.exe) -ACTUAL_TARGETS2 = $(ACTUAL_TARGETS1:%.dll=$(DYNAMIC_LIBRARY_DIR)/%.dynlibrary) -ACTUAL_TARGETS3 = $(ACTUAL_TARGETS2:%.so=$(DYNAMIC_LIBRARY_DIR)/%.so) -ACTUAL_TARGETS4 = $(ACTUAL_TARGETS3:%.lib=$(STATIC_LIBRARY_DIR)/%.library) -ACTUAL_TARGETS = $(ACTUAL_TARGETS4:%.elf=$(EXECUTABLE_DIR)/%.elf) - -# Adds the last few targets for CLAM to do. -ACTUAL_LAST_TARGETS = post_compilation $(LAST_TARGETS) - -############################################################################ - -# This section defines the rules used to generate various objects from their -# source files. - -############################################################################ - -# resource compiler for c#. - -%.resources: %.resx - @echo Creating resource file [$@]. - $(RC) $< $@ -# $(CATCHER)$(RC) $< $@ - -############################################################################ - -# resource compiler for standard resource files. - -ifeq "$(OP_SYSTEM)" "WIN32" -%.res: %.rc - @echo Creating resource file [$@]. -ifeq "$(NO_COMPILE)" "" - $(CATCHER)$(STANDARD_RC) -r $(DEFINITIONS:%=-D%) $(HEADER_SEARCH_PATH:%=-i%) -fo $@ $< -endif -endif - -############################################################################ - -# creates dynamic libraries. - -# we whack any existing LIB file, since we want to use changes in that file -# as a clue for when we should rescan the dependencies. we'd be fine if -# visual c++ didn't keep an existing LIB if it doesn't change (even when the -# DLL does). - -$(DYNAMIC_LIBRARY_DIR)/%.dynlibrary: $(LOCAL_LIBS_USED:%=$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(ACTUAL_RESX) $(ACTUAL_SOURCE) $(ACTUAL_RESOURCE) - $(HIDER)echo Creating dynamic library [$@]. - @echo $@ >$(DIRTY_FILE) - $(HIDER)rm -f $(@:%.dll=%.lib) - $(CATCHER)$(CC) $(COMPILER_FLAGS) $(EXE_FLAGS) $(LOAD_FLAG_PREFIX) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@ $(ACTUAL_SOURCE) $(ACTUAL_RESX:%=-res:%) $(ACTUAL_RESOURCE:%=-win32res:%) -ifneq "$(VCPP_VISTA_ICON)" "" - $(HIDER)ReplaceVistaIcon "$@" "$(VCPP_VISTA_ICON)" -endif - $(HIDER)mv $@ $(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) -ifneq "$(CREATE_TLB)" "" - $(CATCHER)$(TLBEXPORT) $(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) -out:$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*.tlb -endif - $(HIDER)echo nil >$@ - -#$(LINKER_OUTPUT_FLAG)$@ -dll $(LOAD_FLAG_PREFIX) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) - -############################################################################ - -# creates "exe" executables using all of the appropriate objects. -$(EXECUTABLE_DIR)/%.exe: $(LOCAL_LIBS_USED:%=$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(ACTUAL_RESX) $(ACTUAL_SOURCE) $(ACTUAL_RESOURCE) - $(HIDER)echo Building program [$@]. - @echo $@ >$(DIRTY_FILE) - $(CATCHER)$(CC) $(COMPILER_FLAGS) $(EXE_FLAGS) $(LOAD_FLAG_PREFIX) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@ $(ACTUAL_SOURCE) $(ACTUAL_RESX:%=-res:%) $(ACTUAL_RESOURCE:%=-win32res:%) -ifneq "$(VCPP_VISTA_ICON)" "" - $(HIDER)ReplaceVistaIcon "$@" "$(VCPP_VISTA_ICON)" -endif - -############################################################################ - -# handles creating version resource files if this project has a version.ini. - -ifeq "$(OMIT_VERSIONS)" "" - ifneq "$(VERSION_RC_ROOT)" "" -# only redo the version resource if it or version.ini is out of date. -%_version.rc: version.ini $(PARAMETER_FILE) - $(CATCHER)$(CLAM_BINARIES)/version_stamper$(EXE_END) . $(PARAMETER_FILE) - endif -endif - -############################################################################ - -# Now the active part of the make process... - -# Adds the main CLAM system in to get some work done. This should be placed -# after the module's rules are defined and before the module's targets are -# defined. -include rules.def - -# preserves intermediate files from being deleted. -##.PRECIOUS: %.resources - -# zaps things when they could not be created correctly. -.DELETE_ON_ERROR: - -############################################################################ - -# examines the required variables and complains if they're missing. -check_requirements: - $(HIDESH) -c 'if [ -z "$(PROJECT)" ]; then echo the PROJECT variable is not defined!; . $(CLAM_SCRIPTS)/exit_make.sh; fi' - $(HIDESH) -c 'if [ -z "$(TYPE)" ]; then echo the TYPE variable is not defined!; . $(CLAM_SCRIPTS)/exit_make.sh; fi' - -############################################################################ - -# calls the script for preparing output directories and such. -pre_compilation: - $(HIDESH)$(CLAM_SCRIPTS)/csharp/preconditions.sh - -############################################################################ - -# calls the script for copying the final products to the library directory. -# we don't bother reporting errors from touch since there will sometimes -# not be any objects in the final directory. -post_compilation: - $(HIDESH)$(CLAM_SCRIPTS)/csharp/postconditions.sh - -############################################################################ - -# if REBUILD is defined, then we cause all objects to be recompiled. -.PHONY: force_rebuild -force_rebuild: - -ifneq "$(REBUILD)" "" - # the target below needs the blank rule that it has for this to work. - $(FIRST_TARGETS) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_TARGETS) $(LAST_TARGETS): force_rebuild -endif - -############################################################################ - diff --git a/scripts/clam/dotnet-retired/variables.def b/scripts/clam/dotnet-retired/variables.def deleted file mode 100644 index a645b02f..00000000 --- a/scripts/clam/dotnet-retired/variables.def +++ /dev/null @@ -1,514 +0,0 @@ -############################################################################### - -# CLAM System default variable definitions for C# compilation. - -############################################################################### - -# Pull in the base support for CLAM. -include variables.def - -############################################################################### - -#CLAM_BINARIES = $(CLAM_SCRIPTS)/../bin - -############################################################################### - -ifneq "$(BUILD_PARAMETER_FILE)" "" - # define our version of the build parameter file. this should be set - # beforehand so we override the default parameter file for clam. - export PARAMETER_FILE = $(BUILD_PARAMETER_FILE) -###no: $(FEISTY_MEOW_APEX)/build/identity.ini -endif -ifeq "$(PARAMETER_FILE)" "" - # last ditch attempt to get one that will work. - export PARAMETER_FILE = $(FEISTY_MEOW_APEX)/build.ini -endif - -############################################################################### - -# BASE_CPU is a flag that distinguishes the type of processor, if necessary. -export BASE_CPU -#BASE_CPU = m68k - # motorola 68000 series. -#BASE_CPU = m68340 - # motorola 68340. -#BASE_CPU = x86 - # intel x86. -#BASE_CPU = ppc860 - # power pc 860. - -# set the CPU default if we do not have one. -ifeq "$(BASE_CPU)" "" - BASE_CPU = x86 -endif - -# COMPILER is a flag that specifies the operating system or the compiler for -# use in conditional compilation (#ifdef ... #endif) of the compiler dependent -# interfaces or implementations. -export COMPILER -#COMPILER = VISUAL_CPP - -# choose a default compiler if none was specified. -ifeq "$(COMPILER)" "" - COMPILER = VISUAL_CPP -endif - -# COMPILER_VERSION specifies the version of a particular compiler, if this is -# needed to distinguish how the code is built. -export COMPILER_VERSION - -############################################################################### - -# "TYPE" is the kind of product being generated by this project. this is -# used to decide where to put the final products of compilation. this is a -# variable in the user's makefile. -# Valid Types: -# TYPE = library (outputs are static or dynamic libraries) -# TYPE = application (outputs are main-line executables) -# TYPE = test (outputs are test programs) -export TYPE - -############################################################################### - -# pseudo-boolean variable section. if these have any value at all, then they -# are treated as being true. note that these are flags that should generally -# be passed on the command line to a make. if they are intended to be used -# from inside a makefile, then they must appear before this file is included. - -# "REBUILD" causes a rebuild of all source files if it's true. -export REBUILD - -# "DEBUG" is used to specify a debugging build. the default is for this to -# be false, which causes a release build. -export DEBUG - -# "OPTIMIZE" creates optimized code. -export OPTIMIZE - -# "NO_COMPILE" just runs through the targets without compiling. it still -# promotes headers however. -export NO_COMPILE - -# "BUILD_LIST_FILE" is the set of files that need to be recompiled for -# visual c++. -export BUILD_LIST_FILE = $(CLAM_TMP)/clam_rebuild.$(PROJECT) - -# "BUILD_WHACK_FILE" is the set of object files that should be removed if -# a build failure occurs. -export BUILD_WHACK_FILE = $(CLAM_TMP)/clam_whack.$(PROJECT) - -# we're adding the build list to the flag files so we know it gets cleaned up. -FLAG_FILES += $(BUILD_LIST_FILE) $(BUILD_WHACK_FILE) - -############################################################################### - -# This section implements the HOOPLE directory scheme. If your scheme differs, -# then you'll want to modify these appropriately. - -# "THIRD_PARTY_DIR" is the root of our support libraries. -ifeq "$(OP_SYSTEM)" "UNIX" - export THIRD_PARTY_DIR -endif -ifeq "$(OP_SYSTEM)" "WIN32" - export THIRD_PARTY_DIR = $(FEISTY_MEOW_APEX)/3rdparty -endif - -# "OUTPUT_ROOT" is the root of all output directories for objects and other -# products being built. -export OUTPUT_ROOT = $(TARGETS_STORE)/obj - -# "PLATFORM_ADD_IN" is an option discriminator for the intended execution -# platform. it should end in an underscore if it is provided. -#PLATFORM_ADD_IN = linux_ -#PLATFORM_ADD_IN = w32_ -PLATFORM_ADD_IN = - -# "CPU_BUILD_DIR" distinguishes object directories by including the cpu -# name and the type of build. -ifneq "$(DEBUG)" "" - CPU_BUILD_DIR = $(BASE_CPU)_dbg -else - CPU_BUILD_DIR = $(BASE_CPU)_$(PLATFORM_ADD_IN)rel -endif - -# "BASE_OUTPUT_PATH" is the parent directory of objects for this type of -# cpu and this type of build. -export BASE_OUTPUT_PATH = $(OUTPUT_ROOT)/$(CPU_BUILD_DIR) - -# "OUTPUT_PATH" is the directory to generate all compiled products into. -export OUTPUT_PATH = $(BASE_OUTPUT_PATH)/$(PROJECT) - -# "OBJECT_DIR" is where object files will be stored during compilation for the -# target type being produced. -export OBJECT_DIR = $(OUTPUT_PATH) - -# These specify where files are to be created or located for our local build. -export EXECUTABLE_DIR = $(TARGETS_STORE)/exe -export DYNAMIC_LIBRARY_DIR = $(TARGETS_STORE)/dll -export STATIC_LIBRARY_DIR = $(TARGETS_STORE)/lib -export TESTS_DIR = $(TARGETS_STORE)/tests - -# "HEADER_SEARCH_PATH" is where the class interface files are to be found. -#HEADER_SEARCH_PATH = - -# "HOOPLE_HEADERS" are locations where the HOOPLE headers can be found. -HOOPLE_HEADERS := $(shell $(FIND) $(FEISTY_MEOW_APEX)/source/lib_src $(FEISTY_MEOW_APEX)/libraries -mindepth 1 -maxdepth 1 -type d) - -# "LOCAL_HEADERS" are overrides that go first in the header search path. -#LOCAL_HEADERS = - -# "CODEBASE_HEADERS" is a list that can be changed for a particular codebase. -# it is guaranteed that clam will not interfere with this list, whereas -# the LOCAL_HEADERS can be modified by clam. -#CODEBASE_HEADERS = - -# "LOCAL_LIBRARIES" are overrides that go first in the library search path. -#LOCAL_LIBRARIES = - -# "LIBRARY_SEARCH_PATH" is where the library files are to be found. -#LIBRARY_SEARCH_PATH = - -# "HOOPLE_LIBRARIES" is where our local libraries are located. -HOOPLE_LIBRARIES = - -# "EXTRA_COPIES" is a list of files that are copied to a project's output -# directory. -export EXTRA_COPIES - -# "EXTRA_VERSIONS" is a list of version files to synchronize with the main -# library version for this build. if a file called "version.ini" exists in -# the project directory, then it will automatically be upgraded, so the -# extra version files are mainly useful when you have a project with multiple -# programs in it and you want them to have independent version files (as you -# should perhaps want). -export EXTRA_VERSIONS - -# "OMIT_VERSIONS" is another exclusion flag. this one turns off the creation -# of version resource files and eliminates any references that would include -# such files. this is needed when rebuilding version_stamper. -#OMIT_VERSIONS = t - -# Add the obligatory junk to be cleaned up. Individual compiler sections -# should customize this by adding their object output directories. -CLEANUPS += $(ACTUAL_TARGETS) $(OUTPUT_PATH) -#hmmm: import libs for dynamic libraries on ms-win32 don't currently get -# cleaned up nicely. - -############################################################################### - -# "SEARCH_DIRS" is a list of directories that should be searched for both C++ -# header files and for C++ code libraries. The items placed in SEARCH_DIRS -# are fed into both the LIBRARY_SEARCH_PATH and the HEADER_SEARCH_PATH. -#SEARCH_DIRS = - -# "DEFINITIONS" is a list of compiler flags that define the value of c macros. -# These usually have the format of -D, but in this variable, only the -# itself should be listed because the compiler option -D is added -# automatically. -DEFINITIONS = CLAM_BUILT - -ifneq "$(BOOT_STRAPPING)" "" - # the software is being built from the ground up, including the binaries - # we use for building (like value_tagger and others). - DEFINITIONS += BOOT_STRAPPING -endif - -# "UNDEFINITIONS" is a list of macros to undefine. -#UNDEFINITIONS = - -#hmmm: these kinds of defines (with a value) do not work for csharp. -# GLOBAL_PRODUCT_NAME is an important variable for tagging the entire code base -# with some branding. It is provided as a macro definition to all source -# files. The initial value for the macro should come from the build init -# file, but if it doesn't, we pick a default. -##ifeq "$(product_name)" "" -## DEFINITIONS += GLOBAL_PRODUCT_NAME=\\\"HOOPLE\\\" -##else -## DEFINITIONS += GLOBAL_PRODUCT_NAME=\\\"$(product_name)\\\" -##endif - -# *_PRODUCT_VERSION records parts of our version numbers for the code to see. -###DEFINITIONS += MAJOR_PRODUCT_VERSION=$(major) MINOR_PRODUCT_VERSION=$(minor) - -# "DEBUG_FLAGS" these flags are used for generating specialized versions of -# object files, such as ones that include debugging code or that add code for -# profiling. -# Possible values are -g for adding GDB debugging code and -pg for adding -# gprof profiling code. -#DEBUG_FLAGS = -g -#DEBUG_FLAGS = -pg -#DEBUG_FLAGS = - -# "COMPILER_FLAGS" are the flags for the pre-processor and compiler. -#COMPILER_FLAGS = - -# "STRICT_WARNINGS" turns on all warnings and forces them to be considered -# as errors when encountered. -#STRICT_WARNINGS = - -# "LIBRARIAN_FLAGS" are flags that need to be passed to the library tool -# that creates static code libraries. -#LIBRARIAN_FLAGS = - -# "SOURCE" is the list of files that are turned into objects. -#SOURCE = - -# "LIBS_USED" are system or compiler code libraries that the targets to be -# created depend upon. -#LIBS_USED = - -# "LOCAL_LIBS_USED" is very similar to the LIBS_USED, but these libraries -# actually cause executables and object files to be recompiled when the -# libraries specified have changed. To accomplish this, these libraries MUST -# be located in the STATIC_LIBRARY_DIR rather than at some arbitrary place -# on the LIBRARY_SEARCH_PATH. -#LOCAL_LIBS_USED = - -# Load flags tell the linker and loader how to deal with the files and where -# to locate library components. The prefix goes before object files are -# listed, and the suffix after. The prefix should have things like the -# directories to be searched for code libraries (although they should be added -# to LIBRARY_SEARCH_PATH) and the loading mode for functions (static/dynamic). -# In the suffix, actual library loading statements (like -lmath) can be -# included (although they should be listed in a different form in LIBS_USED). -# Remember that the unix loader looks for functions in libraries in a bizarre -# way: ld searches for a function only when it has already been asked for it. -# This means that it doesn't remember what functions it has already been -# provided with in the libraries and object files, and it will fail if those -# functions are only asked for after they have already been encountered. -#LOAD_FLAG_PREFIX = -#LOAD_FLAG_SUFFIX = - -# The prefix used on library names, mostly for unix. -LIB_PREFIX = -# The standard suffix for static or import libraries on this operating system. -LIB_ENDING = - -# Flag for specifying the library name to create. -#CREATE_LIBRARY_FLAG = - -# Flag for specifying a library to include in linking. -LIBRARY_NAME_FLAG = -l - -# Flag for specifying a directory to add to the search path for libs. -#LIBRARY_PATH_FLAG = -L - -# Flag for specifying the name of an output from the linker. -#LINKER_OUTPUT_FLAG = - -# Flag for separating linker options from compilation options for a combined -# compiler / linker. -#LINKER_OPTION_SEPARATOR = - -# Flag that passes special options when building executable programs. It is -# passed just before the LOAD_FLAG_PREFIX. -#EXE_FLAGS = - -# The name of the compiler tool. -#CC = - -# The name of the library creator tool. -#LIBRARY_TOOL = - -# the root name of the version file. This is currently irrelevant on -# non-win32 platforms. -VERSION_RC_ROOT = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/rc_name.sh) - # we import the rc_name from our close ally, the c++ compiler definitions. - -############################################################################### - -# Compiler Dependent Flags -# -# "COMPILER_ROOT_DIR" is the top-level for the C++ compiler location. -# "COMPILER_HEADER_DIR" is where the compiler's headers are. -export COMPILER_HEADER_DIR -# "COMPILER_LIBRARY_DIR" is where archived libraries are. -# "CC" is the name of the C++ compiler to be used. - -ifeq "$(COMPILER)" "VISUAL_CPP" - # microsoft visual studio 7. - - LIB_ENDING = .dll - PLATFORM_ADD_IN = w32_ - - # these define special characteristics for a program being built. - # BASE is almost always defined and pulls in fundamental w32 support. - # RPC supplies the remote procedure call libraries. - # OLE pulls in object linking and embedding support. - # SECURITY links with the w32 security APIs. - # CLR sets options that are appropriate for managed code. - VCPP_USE_BASE=true - VCPP_USE_RPC= - VCPP_USE_OLE= - VCPP_USE_SECURITY= - VCPP_USE_CLR= - VCPP_VISTA_ICON= - - # the framework dir points at the .net framework to be used for compilation. - ifeq "$(FRAMEWORK_VERSION)" "" - - # older .net 1.1. -# SHORT_FRAMEWORK_VERSION = 1.1 -# FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION).4322 - - # old .net 2.0. -# SHORT_FRAMEWORK_VERSION = 2.0 -# FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION).50727 - - # current .net 3.5. - SHORT_FRAMEWORK_VERSION = 3.5 - FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION) - - endif - export FRAMEWORK_DIR - ifeq "$(FRAMEWORK_DIR)" "" - FRAMEWORK_DIR = $(subst \,/,$(WINDIR))/Microsoft.NET/Framework/v$(FRAMEWORK_VERSION) - endif - - # pick a default compiler version for what we tend to use the most at the - # current time. - ifeq "$(COMPILER_VERSION)" "" - COMPILER_VERSION = 7 - endif -## DEFINITIONS += COMPILER_VERSION=$(COMPILER_VERSION) - # add a macro so programs can check what version is appropriate. - - # C# needs an entry point for exes. a different one can be specified also. - ENTRY_POINT = main - - # C# treats resources differently than simple code files. the list in this - # variable will be embedded in the target. - #RESX = - - # TLBEXPORT is a tool to create TLB files from DLL files. - TLBEXPORT = $(COMPILER_ROOT_DIR)/../SDK/v$(SHORT_FRAMEWORK_VERSION)/bin/tlbexp$(EXE_END) - - # calculate the visual studio root directory. - export VIS_STU_ROOT := $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/ms_root_dir.sh $(CLAM_BINARIES) ) - ifneq "$(VIS_STU_ROOT)" "" - COMPILER_ROOT_DIR = $(VIS_STU_ROOT)/vc# - endif - ifeq "$(COMPILER_ROOT_DIR)" "" - HOSEUP = $(shell echo The compiler directory is not set. Please define the environment ) - HOSEUP = $(shell echo variable VSxCOMNTOOLS to point at the folder where visual C++ is installed. ) - HOSEUP = - endif - - export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_SCRIPTS)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) ) - - # set a variable for the resource compiler for old-style resources. - STANDARD_RC = $(VIS_STU_ROOT)/vc/bin/rc - - # set up a directory for debugging files to be stored. these are not - # moved with the postconditions--they are generated in place. - export PDB_DIR=$(TARGETS_STORE)/pdb - - # set these way up here so we can override them later. - CC = bash $(CLAM_SCRIPTS)/csharp/csharper.sh -##$(FRAMEWORK_DIR)/csc - -# LINK_TOOL = $(COMPILER_ROOT_DIR)/bin/link - - # vary the locations for compiler files based on the version. - COMPILER_HEADER_DIR = $(VIS_STU_ROOT)/vc/include $(VIS_STU_ROOT)/vc/atlmfc/include $(VIS_STU_ROOT)/vc/platformsdk/include - COMPILER_LIBRARY_DIR = -###$(COMPILER_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/atlmfc/lib $(COMPILER_ROOT_DIR)/platformsdk/lib - RC = $(COMPILER_ROOT_DIR)/../SDK/v2.0/bin/resgen$(EXE_END) - - ifeq "$(COMPILER_HEADER_DIR)" "" - HOSEUP = $(shell echo The compiler version is not set. Please define COMPILER_VERSION.) - endif - - DEFINITIONS += _Windows _WINDOWS WIN32 __WIN32__ __FLAT__ VC_EXTRALEAN WIN32_LEAN_AND_MEAN ATL_NO_LEAN_AND_MEAN _WIN32_WINNT=0x403 - DEF_FILE = - LIBRARY_TOOL = $(COMPILER_ROOT_DIR)/bin/lib - LOAD_FLAG_PREFIX = -nologo -#-subsystem:windows -machine:IX86 - LOAD_FLAG_SUFFIX = - - MIDL = midl -Oicf $(MIDL_DEFS) $(HEADER_SEARCH_PATH:%=-I% ) $(DEFINITIONS:%=-I% ) - MIDL_DEFS = -no_robust - - # set the flags used by visual c++. - CREATE_LIBRARY_FLAG = -out: - LIBRARY_NAME_FLAG = -reference: - LIBRARY_PATH_FLAG = -lib: - LINKER_OPTION_SEPARATOR = -link - LINKER_OUTPUT_FLAG = -out: - - # Add the extra files created by visual c++. -#is this needed now that we whack whole output path? CLEANUPS += $(OUTPUT_PATH)/*.*db - - # put the common flags into the compiler flags. - COMPILER_FLAGS += -nologo -#-Fd$(PDB_DIR)/$(PROJECT)_bookkeeping.pdb -GR -GX -W3 -Zi -EHsc -GS -Gd - - ifneq "$(DEBUG)" "" - # disable function inlining and optimizations for debug. -# COMPILER_FLAGS += -Ob0 -Od - else - # enable function inlining for release only. -# COMPILER_FLAGS += -Ob1 - - ifneq "$(OPTIMIZE)" "" - # add in fast code optimization. -#testing... -# COMPILER_FLAGS += -O2 -#trying O2 again although it seems to combust too easily. - else - # no optimizations. - endif - - endif - - # check if profiling is to be enabled. - PROFILER_FLAG = - ifneq "$(PROFILE)" "" - PROFILER_FLAG = -profile - endif - - # add the common linker flags. the debugging flag is added because we - # want to be able to debug into release code, but since the pdb files - # are separate, we're not exposing ourselves when we don't include them. - LOAD_FLAG_PREFIX += $(PROFILER_FLAG) -debug -#-warn:3 - - # "USE_MFC" dictates whether mfc should be allowed in the application. - # the default is not to use MFC extension style dlls. this can be turned - # on in the individual makefiles that require MFC. - #USE_MFC = - - # the library creator gets a couple of flags. - LIBRARIAN_FLAGS += -nologo -machine:IX86 - - # now, vary the flag configuration based on the flags that have been set. - - ifneq "$(CONSOLE_MODE)" "" - # console type of applications are built using the static flag so that - # they are more redistributable. - DEFINITIONS += _CONSOLE -### LOAD_FLAG_SUFFIX += -subsystem:console - STATIC = true - endif - - # dynamically linked library or application flags. - ifneq "$(DEBUG)" "" - # debug. - DEFINITIONS += _DEBUG -# COMPILER_FLAGS += -MDd - else - # release. - DEFINITIONS += NDEBUG -# COMPILER_FLAGS += -MD - endif - - ifneq "$(STRICT_WARNINGS)" "" -# COMPILER_FLAGS += -W3 -WX - # we have not turned on W4 because it is not really warnings for the - # microsoft compiler. instead, it is a bunch of blather about what the - # compiler intends to do rather than problems in the code. - endif - -endif - - diff --git a/scripts/clam/rules.def b/scripts/clam/rules.def index 3cf8bf6e..abd5983d 100644 --- a/scripts/clam/rules.def +++ b/scripts/clam/rules.def @@ -66,7 +66,7 @@ if [ ! -d "$(CLAM_TMP)" ]; then \ mkdir "$(CLAM_TMP)"; \ fi' ifeq "$(QUIET)" "" - $(HIDER)echo Project $(PROJECT) [$(shell basename $(shell dirname $(shell pwd) ) )/$(shell basename $(shell pwd) )] v. $(major).$(minor).$(revision).$(build) + $(HIDER)echo Project $(PROJECT) [$(shell echo $(CURRENT_DIR) | sed -e 's/.*\/\([^\/]*\)\/\([^\/]*\)/\1\/\2/')] v. $(major).$(minor).$(revision).$(build) endif $(HIDER)rm -f $(FLAG_FILES) diff --git a/scripts/clam/target_runner.sh b/scripts/clam/target_runner.sh index 553463f0..c61bbc05 100644 --- a/scripts/clam/target_runner.sh +++ b/scripts/clam/target_runner.sh @@ -23,7 +23,7 @@ if [ ! -z "${RUN_TARGETS}" -a ! -z "${RUN_ALL_TESTS}" ]; then total_exitval=0; for program_name in ${RUN_TARGETS}; do base=$(basename $program_name); - if [ "$OP_SYSTEM" == "WIN32" ]; then + if [ "$OPERATING_SYSTEM" == "WIN32" ]; then # extra step to force win32 applications to stay held in our grip, # since they will float off and appear to have stopped when # run by cygwin. but by grabbing the i/o stream, we know it's diff --git a/scripts/clam/variables.def b/scripts/clam/variables.def index 809f79e5..0ef7ffc4 100644 --- a/scripts/clam/variables.def +++ b/scripts/clam/variables.def @@ -11,53 +11,53 @@ ############################################################################### -# OP_SYSTEM is a flag that specifies the operating system under which -# the makefile system is executing. -export OP_SYSTEM -#OP_SYSTEM := UNIX = unix | OS2 = ibm os/2 | SYSV = v unix | DOS = pc dos -# | WIN32 = ms-win32 / NT. - -# OS_SUBCLASS is a finer differentiation of the OP_SYSTEM. currently only -# the darwin subclass for unix is considered. -export OS_SUBCLASS -#OS_SUBCLASS := darwin | - -# set the default operating system when none is specified. -ifeq "$(OP_SYSTEM)" "" -#is there a nice way to join the greps? - IS_UNIX := $(shell uname | grep -i linux) - ifeq "$(IS_UNIX)" "" - IS_UNIX := $(shell uname | grep -i unix) - ifeq "$(IS_UNIX)" "" - IS_UNIX := $(shell uname | grep -i darwin) - ifneq "$(IS_UNIX)" "" - # pick the subclass now that we know this is darwin. - OS_SUBCLASS := darwin - endif - endif - endif - IS_DOS := $(shell uname | grep -i cygwin) - ifeq "$(IS_DOS)" "" - IS_DOS := $(shell uname | grep -i ming) - endif - ifneq "$(IS_UNIX)" "" - OP_SYSTEM := UNIX - else - ifneq "$(IS_DOS)" "" - OP_SYSTEM := WIN32 - else - # we do not have other comparisons yet, so we will assume unix. fix this - # if it is not your default operating system. - OP_SYSTEM := UNIX - endif - endif -endif - -# now set a special ending for EXE files, which differs between the OSes. -export EXE_END -ifeq "$(OP_SYSTEM)" "WIN32" - EXE_END := .exe -endif +## # OPERATING_SYSTEM is a flag that specifies the operating system under which +## # the makefile system is executing. +## export OPERATING_SYSTEM +## #OPERATING_SYSTEM := UNIX = unix | OS2 = ibm os/2 | SYSV = v unix | DOS = pc dos +## # | WIN32 = ms-win32 / NT. + +## # CLAM_OS_SUBCLASS is a finer differentiation of the OPERATING_SYSTEM. currently only +## # the darwin subclass for unix is considered. +## export CLAM_OS_SUBCLASS +## #CLAM_OS_SUBCLASS := darwin | + +## # set the default operating system when none is specified. +## ifeq "$(OPERATING_SYSTEM)" "" +## #is there a nice way to join the greps? +## CLAM_ON_UNIX := $(shell uname | grep -i linux) +## ifeq "$(CLAM_ON_UNIX)" "" +## CLAM_ON_UNIX := $(shell uname | grep -i unix) +## ifeq "$(CLAM_ON_UNIX)" "" +## CLAM_ON_UNIX := $(shell uname | grep -i darwin) +## ifneq "$(CLAM_ON_UNIX)" "" +## # pick the subclass now that we know this is darwin. +## CLAM_OS_SUBCLASS := darwin +## endif +## endif +## endif +## CLAM_ON_DOS := $(shell uname | grep -i cygwin) +## ifeq "$(CLAM_ON_DOS)" "" +## CLAM_ON_DOS := $(shell uname | grep -i ming) +## endif +## ifneq "$(CLAM_ON_UNIX)" "" +## OPERATING_SYSTEM := UNIX +## else +## ifneq "$(CLAM_ON_DOS)" "" +## OPERATING_SYSTEM := WIN32 +## else +## # we do not have other comparisons yet, so we will assume unix. fix this +## # if it is not your default operating system. +## OPERATING_SYSTEM := UNIX +## endif +## endif +##endif + +## # now set a special ending for EXE files, which differs between the OSes. +## export EXE_ENDING +## ifeq "$(OPERATING_SYSTEM)" "WIN32" +## EXE_ENDING := .exe +## endif ############################################################################### @@ -124,10 +124,11 @@ export PROJECT export TARGETS # "ACTUAL_TARGETS" is how the targets are expected to be passed to the rules -# file; this allows rules from a plug-in module to manipulate the TARGETS to make -# sure that important files do not get deleted by the automatic deletion done -# with "make clean." If the real module used does not create a variable called -# ACTUAL_TARGETS from the TARGETS, then the default specified here is used. +# file. This allows rules from a plug-in module to manipulate the TARGETS to +# make sure that important files do not get deleted by the automatic deletion +# done with "make clean." If the real module used does not create a variable +# called ACTUAL_TARGETS from the TARGETS, then the default specified here is +# used. export ACTUAL_TARGETS = $(TARGETS) # "FIRST_TARGETS" and "LAST_TARGETS" are targets that need to be processed @@ -201,13 +202,6 @@ ifeq "$(CLAM_TMP)" "" CLAM_TMP := $(FEISTY_MEOW_GENERATED_STORE)/clam_tmp endif -#turned off for the moment, since this seems like a bad idea; we define clam tmp in terms of tmp sometimes, do not we??? -#ifeq "$(OP_SYSTEM)" "WIN32" -# # set these so that compilers and such will use them. -# export TMP := $(CLAM_TMP) -# export TEMP := $(CLAM_TMP) -#endif - # "FAILURE_FILE" is a file that is used as a flag to track failures. if the # file exists, then it is assumed that a failure happened during the current # make. diff --git a/scripts/core/array_sifter.sh b/scripts/core/array_sifter.sh index aca301f6..a66941a4 100644 --- a/scripts/core/array_sifter.sh +++ b/scripts/core/array_sifter.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Provides functions for checking and sorting the contents of arrays. diff --git a/scripts/core/common.alias b/scripts/core/common.alias index eb076940..430b14ae 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############## # Name : common.alias # Author : Chris Koeritz @@ -76,6 +76,7 @@ define_yeti_alias md='mkdir' define_yeti_alias move='mv -i -v' define_yeti_alias mv='\mv -i -v' define_yeti_alias netcp='rsync -avz' +define_yeti_alias netcpl='rsync -av' define_yeti_alias notepad='gedit' define_yeti_alias pwd="/bin/pwd|sed -e 's/^\/home\/$USER/~/'" define_yeti_alias rd='perl $FEISTY_MEOW_SCRIPTS/files/zapdirs.pl' @@ -152,10 +153,10 @@ define_yeti_alias why='echo We all wonder what the point of the universe is at t ############## -# remove the "fredization" or "feistymeowization" macros if they're defined, -# which reduces the chance of loading the shell environment twice for users -# like root that don't load feisty meow automatically. -unalias fredme feistyme &>/dev/null +# remove the "feistymeowization" macro if defined, which reduces the chance of +# loading the shell environment twice for users like root who don't load +# feisty meow automatically. +unalias gofeisty &>/dev/null ############## diff --git a/scripts/core/connect_feisty_meow.sh b/scripts/core/connect_feisty_meow.sh index 211bba7b..258656c0 100644 --- a/scripts/core/connect_feisty_meow.sh +++ b/scripts/core/connect_feisty_meow.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Author: Chris Koeritz diff --git a/scripts/core/create_tempdir.sh b/scripts/core/create_tempdir.sh index c435d2dd..e9cda8b7 100644 --- a/scripts/core/create_tempdir.sh +++ b/scripts/core/create_tempdir.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # create_tempdir: # diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 24ce6e8c..c1401efe 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This defines some general, useful functions. @@ -293,15 +293,18 @@ if [ -z "$skip_all" ]; then # gets cygwin's (god awful) ps to show windoze processes also. local EXTRA_DOZER_FLAGS="-W" # pattern to use for peeling off the process numbers. - local pid_finder_pattern='s/ *\([0-9][0-9]*\) *.*$/\1/p' - +# local pid_finder_cmd="awk -- '{ print \$4; }'" + local field_number=4 else # flags which clean up the process listing output on unixes. # apparently cygwin doesn't count as a type of unix, because their # crummy specialized ps command doesn't support normal ps flags. local EXTRA_UNIX_FLAGS="-o pid,args" # pattern to use for peeling off the process numbers. - local pid_finder_pattern='s/^[[:space:]]*\([0-9][0-9]*\).*$/\1/p' +# local pid_finder_cmd="sed -n -e \\'s/^[[:space:]]*\([0-9][0-9]*\).*$/\\\\1/p\\'" +#echo pidfinder: $pid_finder_cmd +# local pid_finder_cmd="awk -- '{ print \$1; }'" + local field_number=1 fi /bin/ps $EXTRA_DOZER_FLAGS $EXTRA_UNIX_FLAGS $user_flag | tail -n +2 >$PID_DUMP @@ -318,7 +321,7 @@ if [ -z "$skip_all" ]; then PIDS_SOUGHT+=($(cat $PID_DUMP \ | grep -i "$i" \ | grep -v "$excluder" \ - | sed -n -e "$pid_finder_pattern")) + | awk -- "{ print \$${field_number}; }" )) done #echo ==== #echo pids sought list became: @@ -373,6 +376,11 @@ if [ -z "$skip_all" ]; then # special case for windows. ps | head -1 for curr in $p; do +#hmmm: currently not working right for windows cygwin. we're getting proper +# winpids out of the list now, but not able to use them in ps? +# should i be keeping the weirdo pid that we were getting in column 1 and +# use that, except when talking to taskkill? +# need further research. ps -W -p $curr | tail -n +2 done else @@ -419,12 +427,12 @@ if [ -z "$skip_all" ]; then DOSSYHOME="$(cygpath -am "$HOME")" fi - if [ ! -z "$SERIOUS_SLASH_TREATMENT" ]; then - # unless this flag is set, in which case we force dos slashes. - echo "$1" | sed -e "s?^$HOME?$DOSSYHOME?g" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' | sed -e 's/\//\\/g' - else +# if [ ! -z "$SERIOUS_SLASH_TREATMENT" ]; then +# # unless this flag is set, in which case we force dos slashes. +# echo "$1" | sed -e "s?^$HOME?$DOSSYHOME?g" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' | sed -e 's/\//\\/g' +# else echo "$1" | sed -e "s?^$HOME?$DOSSYHOME?g" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' - fi +# fi } # # switches from an X:/ form to a /cygdrive/X/path form. this is only useful @@ -967,7 +975,7 @@ return 0 #hmmm: would the composition of those two types of extensions cover all the files i want to rename? they have to be "important". find "${dirs[@]}" -follow -maxdepth 1 -mindepth 1 -type f -and -not -iname ".[a-zA-Z0-9]*" | \ grep -i \ -"csv\|doc\|docx\|eml\|html\|ics\|jpeg\|jpg\|m4a\|mov\|mp3\|odp\|ods\|odt\|pdf\|png\|ppt\|pptx\|rtf\|txt\|vsd\|vsdx\|wav\|xls\|xlsx\|xml\|zip" | \ +"csv\|doc\|docx\|eml\|html\|ics\|jpeg\|jpg\|m4a\|mov\|mp3\|odp\|ods\|odt\|pdf\|png\|ppt\|pptx\|rtf\|txt\|vsd\|vsdx\|wav\|webp\|xls\|xlsx\|xml\|zip" | \ sed -e 's/^/"/' | sed -e 's/$/"/' | \ xargs bash "$FEISTY_MEOW_SCRIPTS/files/spacem.sh" # drop the temp file now that we're done. diff --git a/scripts/core/inventory.sh b/scripts/core/inventory.sh index d32c86c7..84b2b839 100644 --- a/scripts/core/inventory.sh +++ b/scripts/core/inventory.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # a frivolous but useful script that shows information about the local # computer in terms of an adventure game inventory listing. diff --git a/scripts/core/is_feisty_up.sh b/scripts/core/is_feisty_up.sh index 1f4b2d8f..493abd1c 100644 --- a/scripts/core/is_feisty_up.sh +++ b/scripts/core/is_feisty_up.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # tells the caller if the feisty_meow scripts have been initialized # successfully or not, as far as we can tell. diff --git a/scripts/core/launch_feisty_meow.sh b/scripts/core/launch_feisty_meow.sh index 2f8aca08..9caeff37 100644 --- a/scripts/core/launch_feisty_meow.sh +++ b/scripts/core/launch_feisty_meow.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############## diff --git a/scripts/core/loadfm.sh b/scripts/core/loadfm.sh new file mode 100755 index 00000000..de5b7115 --- /dev/null +++ b/scripts/core/loadfm.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# this is a simplified feisty meow environment loader that starts +# a subshell within which the environment is available. exiting +# one time gets back to the shell that ran this script. (this script +# is designed to be executed, not sourced.) + +# Author: Chris Koeritz + +ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && /bin/pwd )" +export CORE_SCRIPTS_DIR="$(echo "$ORIGINATING_FOLDER" | tr '\\\\' '/' )" +#echo core scripts dir is $CORE_SCRIPTS_DIR + +THIS_TOOL_NAME="$(basename "$0")" + +pushd "$CORE_SCRIPTS_DIR/../.." &>/dev/null +export FEISTY_MEOW_APEX="$(/bin/pwd)" +popd &> /dev/null +echo "feisty meow apex is '$FEISTY_MEOW_APEX'" + +#hmmm: actually this should run the reconfigure script first! +# then we would be semi-bulletproof and wouldn't actually have +# to make users run that as first step? + +bash --init-file <(echo "\ +bash "$CORE_SCRIPTS_DIR/reconfigure_feisty_meow.sh"; \ +if [ $? -ne 0 ]; then echo "error--reconfiguring feisty meow environment failed."; fi; \ +source "$CORE_SCRIPTS_DIR/launch_feisty_meow.sh"; \ +if [ $? -ne 0 ]; then echo "error--launching feisty meow environment failed."; fi; \ +") + +#### + diff --git a/scripts/core/prep_feisty_host.sh b/scripts/core/prep_feisty_host.sh index 07b95ae0..5dc95e06 100644 --- a/scripts/core/prep_feisty_host.sh +++ b/scripts/core/prep_feisty_host.sh @@ -1,7 +1,8 @@ -#!/bin/bash +#!/usr/bin/env bash # this is the feisty meow host preparation script. it installs all the packages required to run and build feisty meow scripts and applications. -# this script may still be a bit incomplete; we definitely use a lot of unix and linux tools in different scripts. + +# hmmm: this script may still be a bit incomplete; we definitely use a lot of unix and linux tools in different scripts. # preconditions and dependencies--this script itself depends on: # feisty meow @@ -10,15 +11,62 @@ #### -# something borrowed... +ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && /bin/pwd )" +CORE_SCRIPTS_DIR="$(echo "$ORIGINATING_FOLDER" | tr '\\\\' '/' )" +THIS_TOOL_NAME="$(basename "$0")" + +# set up the feisty_meow dir. +pushd "$CORE_SCRIPTS_DIR/../.." &>/dev/null +#source "$CORE_SCRIPTS_DIR/functions.sh" +echo originating folder is $ORIGINATING_FOLDER +export FEISTY_MEOW_APEX="$(/bin/pwd)" +echo feisty now apex is FEISTY_MEOW_APEX=$FEISTY_MEOW_APEX + +#### + +# helper scripts... + function exit_on_error() { if [ $? -ne 0 ]; then echo -e "\n\nan important action failed and this script will stop:\n\n$*\n\n*** Exiting script..." - error_sound +# error_sound exit 1 fi } +function whichable() +{ + to_find="$1"; + shift; + local WHICHER="$(/usr/bin/which which 2>/dev/null)"; + if [ $? -ne 0 ]; then + echo; + return 2; + fi; + local sporkenz; + sporkenz=$($WHICHER "$to_find" 2>/dev/null); + local err=$?; + echo $sporkenz; + return $err +} + +#### + +function apt_cyg_finder() +{ + if whichable apt-cyg; then + return 0 # success. +#hmmm: is that the right syntax for bash? + else + echo " +The apt-cyg tool does not seem to be available for cygwin. +Please follow the install instructions at: + https://github.com/transcode-open/apt-cyg +" + return 13 # not found. + fi +} + #### # load feisty meow environment here, but first test that we *can* load it. @@ -31,59 +79,57 @@ function exit_on_error() { # e.g.?? $ bash /opt/feistymeow.org/feisty_meow/scripts/core/reconfigure_feisty_meow.sh # hmmm: above ALSO ESSENTIAL TO GET RIGHT! -PHASE_MESSAGE="Checking integrity of Feisty Meow subsystem" -if [ -z $FEISTY_MEOW_APEX ]; then +BASE_PHASE_MESSAGE="Feisty Meow subsystems integrity check: " + +# is our main variable set? +PHASE_MESSAGE="$BASE_PHASE_MESSAGE presence of FEISTY_MEOW_APEX variable" +if [ -z "$FEISTY_MEOW_APEX" ]; then false; exit_on_error $PHASE_MESSAGE fi # simple brute force check. can we go there? +PHASE_MESSAGE="$BASE_PHASE_MESSAGE check on directory $FEISTY_MEOW_APEX" pushd $FEISTY_MEOW_APEX &> /dev/null -exit_on_error locating feisty meow top-level folder +exit_on_error $PHASE_MESSAGE popd &> /dev/null # now ask feisty if it's there; should work as long as our scripts are in place. -bash $FEISTY_MEOW_APEX/scripts/core/is_feisty_up.sh -exit_on_error $PHASE_MESSAGE +#PHASE_MESSAGE="$BASE_PHASE_MESSAGE inquiry is_feisty_up" +#bash $FEISTY_MEOW_APEX/scripts/core/is_feisty_up.sh +#exit_on_error $PHASE_MESSAGE # standard load-up. #hmmm: this will currently fail if reconfigure has never been called. -source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" +#NO NO NO. source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" +# we are preparing to get feisty running; how can we use feisty during +# that process? so bad. #### +#hmmm: why two phases? + # first the crucial bits for scripts to work... PHASE_MESSAGE="installing perl file and diff modules" -# ubuntu or debian or other apt-based OSes... if whichable apt; then + # ubuntu or debian or other apt-based OSes... sudo apt install libfile-which-perl libtext-diff-perl exit_on_error $PHASE_MESSAGE -# rpm based with yum available... elif whichable yum; then - sudo yum install perl-File-Which perl-Text-Diff + # rpm based with yum available... + sudo yum install perl-Env perl-File-Which perl-Text-Diff exit_on_error $PHASE_MESSAGE -# macos based... elif [ ! -z "$IS_DARWIN" ]; then - -#hmmm: not quite right yet... - brew install blah blah? lots? + # macos based... + brew install dos2unix openssl exit_on_error $PHASE_MESSAGE - -# windows-based with cygwin (or we'll fail out). elif [ "$OS" == "Windows_NT" ]; then - -#hmmm: install apt-cyg! -# we need this to do the following step, so why not automate that? -# can we at least check for the packages we absolutely need? - -#hmmm: can we bootstrap and still survive on the basic cygwin modules if already installed? -# then we could use our huge list to get the rest! - -#hmmm: is there any other way to get the missing ones, that we need for apt-cyg? - - apt-cyg install perl-File-Which perl-Text-Diff - exit_on_error $PHASE_MESSAGE + # windows-based with cygwin (or we'll fail out currently). + if apt_cyg_finder; then + apt-cyg install perl-File-Which perl-Text-Diff + exit_on_error $PHASE_MESSAGE + fi fi #### @@ -92,27 +138,33 @@ fi PHASE_MESSAGE="installing code builder packages" -# ubuntu or debian or other apt-based OSes... if whichable apt; then - sudo apt install build-essential librtmp-dev libcurl4-gnutls-dev libssl-dev + # ubuntu or debian or other apt-based OSes... + sudo apt install mawk build-essential librtmp-dev libcurl4-gnutls-dev libssl-dev exit_on_error $PHASE_MESSAGE -# rpm based with yum available... elif whichable yum; then - sudo yum install gcc gcc-c++ openssl-devel.x86_64 curl-devel + # rpm based with yum available... + sudo yum install curl-devel gcc gcc-c++ make mawk openssl-devel.x86_64 zlib-devel exit_on_error $PHASE_MESSAGE -# macos based... elif [ ! -z "$IS_DARWIN" ]; then - -#hmmm: not quite right yet... - brew install blork blork? lots? + # macos based... +#hmmm: still working on these... + brew install mawk gpg meld openjdk exit_on_error $PHASE_MESSAGE - -# windows-based with cygwin (or we'll fail out). elif [ "$OS" == "Windows_NT" ]; then - -#hmmm: unknown list needed still... - apt-cyg install fugazi combustinatorinibasil scampnific - exit_on_error $PHASE_MESSAGE + # windows-based with cygwin (or we'll fail out). + + if apt_cyg_finder; then +echo need to fix apt cyg install list somewhat. +#hmmm: list is in our docs as a separate file for cygwin. +# plug those packages into here please. + apt-cyg install gawk libcurl-devel meld mingw64-i686-openssl openssl openssl-devel libssl-devel zlib-devel + exit_on_error $PHASE_MESSAGE + +#extended set. just add them? +# xorg-server xorg-docs xlaunch + + fi fi #### diff --git a/scripts/core/reconfigure_feisty_meow.sh b/scripts/core/reconfigure_feisty_meow.sh index b7e5dda0..3491beb8 100644 --- a/scripts/core/reconfigure_feisty_meow.sh +++ b/scripts/core/reconfigure_feisty_meow.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # reconfigure_feisty_meow: # diff --git a/scripts/core/search_replace.sh b/scripts/core/search_replace.sh index 8357761a..9849db80 100644 --- a/scripts/core/search_replace.sh +++ b/scripts/core/search_replace.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # a break out of the popular replace_pattern_in_file function that # can work with multiple files. diff --git a/scripts/core/variables.sh b/scripts/core/variables.sh index c9c3d37d..c51490ba 100644 --- a/scripts/core/variables.sh +++ b/scripts/core/variables.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############## @@ -190,24 +190,31 @@ define_yeti_variable DEFAULT_FEISTYMEOW_ORG_DIR=/opt/feistymeow.org # variables for perl. - define_yeti_variable PERLLIB+="/usr/lib/perl5" - if [ "$OS" == "Windows_NT" ]; then - define_yeti_variable PERLIO=:perlio - # choose perl's IO over the ms-windows version so we can handle file - # bytes properly. - fi + if [[ $PERLLIB =~ .*$FEISTY_MEOW_SCRIPTS.* ]]; then + if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then + echo skipping PERLLIB since already mentions feisty meow scripts. + fi + else + define_yeti_variable PERLLIB+="/usr/lib/perl5" + if [ "$OS" == "Windows_NT" ]; then + define_yeti_variable PERLIO=:perlio + # choose perl's IO over the ms-windows version so we can handle file + # bytes properly. + fi - # iterate across our sub-directories and find the perl scripts. - # this currently only looks one level down. - for i in $FEISTY_MEOW_SCRIPTS/*; do - if [ -d "$i" ]; then - # check if there is a perl file present; add the folder to PERLLIB if so. - ls $i/*.pl &>/dev/null - if [ $? -eq 0 ]; then - PERLLIB+=":$(dos_to_unix_path $i)" + # iterate across our sub-directories and find the perl scripts. + # this currently only looks one level down. + for i in $FEISTY_MEOW_SCRIPTS/*; do + if [ -d "$i" ]; then + # check if there is a perl file present; add the folder to PERLLIB if so. + ls $i/*.pl &>/dev/null + if [ $? -eq 0 ]; then + PERLLIB+=":$(dos_to_unix_path $i)" + fi fi - fi - done + done + fi + define_yeti_variable PERL5LIB=$PERLLIB #echo PERLLIB is now $PERLLIB diff --git a/scripts/customize/fred/fred_common.alias b/scripts/customize/fred/fred_common.alias index 9ee52c5a..84ea0b77 100644 --- a/scripts/customize/fred/fred_common.alias +++ b/scripts/customize/fred/fred_common.alias @@ -22,6 +22,12 @@ define_yeti_alias update_slimpickenz='source "$FEISTY_MEOW_SCRIPTS/archival/gene # another drive to update; this is a salvaged 5 tb drive. define_yeti_alias update_flabtastic='source "$FEISTY_MEOW_SCRIPTS/archival/general_updater.sh"; update_archive_drive "/media/fred/flabtastic"' +# updates the bittybarky drive with the prime assortment. +define_yeti_alias update_bittybarky='source "$FEISTY_MEOW_SCRIPTS/archival/general_updater.sh"; update_archive_drive "/media/fred/bittybarky"' + +# synch up the new fairly large seagate drive named swirler. +define_yeti_alias update_swirler='source "$FEISTY_MEOW_SCRIPTS/archival/general_updater.sh"; update_archive_drive "/media/fred/swirler"' + # moo and unmoo mount the local folders i use most. #no longer used. we are doing mostly full directory stores without nfs mounts these days. #define_yeti_alias moo='check_mount /z/stuffing ; check_mount /z/walrus ; check_mount /z/chunky ; check_mount /z/fredgrid' diff --git a/scripts/customize/fred/fred_variables.sh b/scripts/customize/fred/fred_variables.sh index 660bfa64..f592a277 100644 --- a/scripts/customize/fred/fred_variables.sh +++ b/scripts/customize/fred/fred_variables.sh @@ -25,11 +25,11 @@ if [ -z "$USER_CUSTOMIZATIONS_LOADED" ]; then SOURCECODE_HIERARCHY_LIST="codebarn extra_brain interbrane" # point to our local certificate for ssh usage. - export SVN_SSH="ssh -i $HOME/.ssh/id_dsa_sourceforge" + export SVN_SSH="ssh -i $HOME/.ssh/others/id_dsa_sourceforge" # Error and success noises for CLAM. - export CLAM_ERROR_SOUND='/z/walrus/media/sounds/effects/bwaaang.wav /z/walrus/media/sounds/cartoons/doh4.wav' - export CLAM_FINISH_SOUND='/z/walrus/media/sounds/cartoons/meepmeep.wav' + export CLAM_ERROR_SOUND='/z/walrus/media/sounds/effects/bwaaang.mp3 /z/walrus/media/sounds/cartoons/doh4.mp3' + export CLAM_FINISH_SOUND='/z/walrus/media/sounds/cartoons/meepmeep.mp3' # Setup for nethack adventure. export NETHACKOPTIONS="name:Manjusri-W,dogname:Fred,catname:Zonker" diff --git a/scripts/customize/fred/scripts/games/save_f76_pics.sh b/scripts/customize/fred/scripts/games/save_f76_pics.sh index e7bdc5b9..d96897df 100644 --- a/scripts/customize/fred/scripts/games/save_f76_pics.sh +++ b/scripts/customize/fred/scripts/games/save_f76_pics.sh @@ -1,36 +1,48 @@ #!/bin/bash -# copies the fallout 76 screenshots and images into our walruse metaverse hierarchy. +# copies the fallout 76 screenshots and images into our walrus metaverse hierarchy. +# pull in the feisty scripts. source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" -if [[ "$(hostname)" =~ clemens* ]]; then +# figure out where we are. the script must have at least one side be local, +# so we are planning for that to be the source side. +source_host="$(hostname)" + +# constant-like variables... +DESTINATION_HOST=greendragon + +# decide where we're copying based on the source. +if [[ "$source_host" =~ clemens* ]]; then character="chronical_pc" identity="8836c852c8a647ba8ca45808a73c3fbb" -elif [[ "$(hostname)" =~ orpheus* ]]; then +elif [[ "$source_host" =~ orpheus* ]]; then character="spoonburg_pc" identity="8f99c06443f04f6f8270604369bb78eb" else - echo Could not determine the proper character name to store the fallout 76 - echo images under. Can you add a hostname to this script? - echo " => $0" + echo " +Could not determine the proper character name for the fallout 76 images based +on your source host of '$source_host' . Can you add the details of your hostname +to this script? + => script is at '$0' +" exit 1 fi -src_dir="$HOME/linx/wind_goods/My Games/Fallout 76/Photos/${identity}" -dest_dir="/z/walrus/media/pictures/metaverse/fallout_76/${character}" +src_dir="$HOME/data/wind_goods/My Games/Fallout 76/Photos/${identity}" +dest_dir="fred@${DESTINATION_HOST}:/z/walrus/media/pictures/metaverse/fallout_76/${character}" -#echo "src is: '$src_dir'" -#echo "dest is: '$dest_dir'" +echo "src is: '$src_dir'" +echo "dest is: '$dest_dir'" if [ ! -d "$src_dir" ]; then echo "Could not find the source directory: $src_dir" exit 1 fi -if [ ! -d "$dest_dir" ]; then - echo "Could not find the destination directory: $dest_dir" - exit 1 -fi +#if [ ! -d "$dest_dir" ]; then +# echo "Could not find the destination directory: $dest_dir" +# exit 1 +#fi netcp "$src_dir"/*[0-9].png "$dest_dir"/ diff --git a/scripts/customize/fred/scripts/games/zap_fallout.sh b/scripts/customize/fred/scripts/games/zap_fallout.sh index 21e1ddf5..9a2a5c47 100644 --- a/scripts/customize/fred/scripts/games/zap_fallout.sh +++ b/scripts/customize/fred/scripts/games/zap_fallout.sh @@ -1,12 +1,11 @@ #!/bin/bash -# windows compatible process killer for any stray processes started as -#"fallout" something. +# windows compatible process killer for any stray processes started as "fallout" something. source $FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh -procid="$( psa fallout | tail -n 1 | awk '{ print $1; }' )" - -if [ ! -z "$procid" ]; then - taskkill.exe /f /pid ${procid} -fi +for procid in $( psfind fallout ); do + if [ ! -z "$procid" ]; then + taskkill.exe /f /pid ${procid} + fi +done diff --git a/scripts/customize/fred/scripts/jobby/archie_grabber.sh b/scripts/customize/fred/scripts/jobby/archie_grabber.sh new file mode 100644 index 00000000..7c0d1109 --- /dev/null +++ b/scripts/customize/fred/scripts/jobby/archie_grabber.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# grabs a set of archives from a set of machines. +# not tuned for re-use very much yet. + +source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" + +function grab_archies() +{ + local domain_piece="$1"; shift + local host_list="$1"; shift + for host in $host_list; do + mkdir -p ${host}.${domain_piece} + pushd ${host}.${domain_piece} + netcp ${host}.${domain_piece}:z_arch* . + retval=$? + if [ $retval -ne 0 ]; then + echo Error $retval returned from copying z_arch* from ${host}.${domain_piece} + exit 1 + fi + popd + done +} + +mkdir -p $HOME/grabbing_archies +pushd $HOME/grabbing_archies + +domain="its.virginia.edu" +hostlist="idpprod01 idpprod02 idpprod03 idpprod04" +grab_archies "$domain" "$hostlist" +hostlist="idpdev01 idpdev02" +grab_archies "$domain" "$hostlist" +hostlist="idptest01 idptest02" +grab_archies "$domain" "$hostlist" +hostlist="idpsistest01 idpsistest02" +grab_archies "$domain" "$hostlist" + +domain="storage.virginia.edu" +hostlist="manage-s admin02 admin-hsz-s" +grab_archies "$domain" "$hostlist" + +popd + + diff --git a/scripts/customize/fred/scripts/jobby/compare_clambook_dirs.sh b/scripts/customize/fred/scripts/jobby/compare_clambook_dirs.sh new file mode 100644 index 00000000..edf2ba07 --- /dev/null +++ b/scripts/customize/fred/scripts/jobby/compare_clambook_dirs.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# a little helper script for clambook, +# which is uva's mac and which doesn't share syncthing. +# we can easily see what stuff got accidentally put on +# the /z folders with this, and make sure anything new +# actually gets back to the true sources of these files. + +source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" + +DATA_SOURCE_HOST="curie" + +function compare_to_curie() +{ + dir="$1"; shift + s + echo + echo "comparing $dir" + echo + echo "'<' will be remote, '>' will be local." + echo + compare_dirs "fred@${DATA_SOURCE_HOST}:/z/$dir" "/z/$dir" + retval=$? + s + echo + return $retval +} + +compare_to_curie musix +compare_to_curie walrus + + diff --git a/scripts/customize/fred/scripts/rip_burn/create_disco_dirs.sh b/scripts/customize/fred/scripts/rip_burn/create_disco_dirs.sh index ff273ba8..596193cb 100644 --- a/scripts/customize/fred/scripts/rip_burn/create_disco_dirs.sh +++ b/scripts/customize/fred/scripts/rip_burn/create_disco_dirs.sh @@ -1,8 +1,12 @@ #!/bin/bash +FROOT=$HOME/disco -mkdir $HOME/disco -pushd $HOME/disco &>/dev/null -mkdir -p burn converted grind rip -popd &>/dev/null - +for dir in $FROOT $FROOT/burn $FROOT/converted $FROOT/grind $FROOT/rip; do + # make the currently chosen directory and ignore if already exists. + mkdir -p $dir +#check_on_error + # put a sentinel file in the dir to keep it from being deleted. + echo keepy yo yes $RANDOM >>"$dir/.keep" +#check_on_error +done diff --git a/scripts/files/safedel.pl b/scripts/files/safedel.pl index ef4ffcb4..6b8ed29a 100644 --- a/scripts/files/safedel.pl +++ b/scripts/files/safedel.pl @@ -63,7 +63,8 @@ exit 0; sub safedel { # get the list of files and directories to whack. local(@to_delete) = &glob_list(@_); -# print "final list of whackees: @to_delete\n"; +#hmmm: make this into a debug option. +#print "list of whackees: @to_delete\n"; # we store the deleted files in a directory under the temporary directory. if (! -d $TMP) { @@ -147,7 +148,11 @@ sub safedel { print REPORT $printable_date . " -- from [@deleted]\n"; close(REPORT); } else { - print "No files were deleted.\n"; +#hmmm: oh good, and we should always bug people about nothing having been done? +# this is especially tiresome when our own scripts cause safedel to be invoked, +# since then they are automatically noisy and blathery. +#hmmm: make this into a debug option. +# print "No files were deleted.\n"; } } diff --git a/scripts/generator/build_variables.sh b/scripts/generator/build_variables.sh index 6e8fa38e..bd2afb03 100644 --- a/scripts/generator/build_variables.sh +++ b/scripts/generator/build_variables.sh @@ -55,6 +55,11 @@ source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" # outer check on whether this already was run or not. if [ -z "$BUILD_VARS_LOADED" ]; then +if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then + echo recalculating feisty meow build variables. + echo +fi + # perform some calculations to get the right paths from our parameters. if [ ! -z "$PARM_1" ]; then # use the first real parameter since this is probably the 'source' version. @@ -90,10 +95,67 @@ if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo "[FEISTY_MEOW_APEX is $FEISTY_MEOW_APEX]" fi -#if [ "$OPERATING_SYSTEM" == "WIN32" ]; then -# # harsh on the paths and make them use backwards slashes. -# export SERIOUS_SLASH_TREATMENT=true -#fi +# set some extra variables that clam uses. + +# CLAM_ON_UNIX or CLAM_ON_DOS might get defined here. +# we also can set OS_SUBCLASS if we detect darwin. +if [ $OPERATING_SYSTEM == UNIX ]; then + export CLAM_ON_UNIX=$(uname) + if [[ $CLAM_ON_UNIX =~ .*[Dd]arwin.* ]]; then + # pick the subclass now that we know this is darwin. + export CLAM_OS_SUBCLASS=darwin + fi +elif [ $OPERATING_SYSTEM == WIN32 ]; then + export CLAM_ON_DOS=$(uname) +else + echo "Unknown operating system--clam will not build well here." +fi + +# CLAM_BASE_CPU is a flag that distinguishes the type of processor, if necessary. +export CLAM_BASE_CPU="$(uname -m 2>/dev/null || arch 2>/dev/null || echo i686)" +#ugh, machine gives us an odd answer on macos. machine 2>/dev/null || + +# "FEISTY_MEOW_CPP_HEADERS" are folders where our C and C++ header files can be found. +# we'll compute the set of folders as best we can below. +if [ -d "$FEISTY_MEOW_APEX/nucleus" ]; then + # just assumes we're at home and know our header locations under the feisty meow hierarchy. + export LOCUS_LIBRARY_HEADERS="$FEISTY_MEOW_APEX/nucleus $FEISTY_MEOW_APEX/octopi $FEISTY_MEOW_APEX/graphiq" +else + export LOCUS_LIBRARY_HEADERS= +fi +export FEISTY_MEOW_CPP_HEADERS=$(find $LOCUS_LIBRARY_HEADERS -mindepth 1 -maxdepth 1 -type d | grep -v "\.settings") + +# the root name of the version file. This is currently irrelevant on +# non-windoze platforms. +export CLAM_VERSION_RC_ROOT=$(bash $CLAM_SCRIPTS/cpp/rc_name.sh) + +# CLAM_COMPILER is the C/C++ compiler application that builds our code. +# The variable is mainly used within CLAM itself for determining the proper +# compiler flags. +export CLAM_COMPILER +if [ "$OPERATING_SYSTEM" == UNIX ]; then + if [ "$CLAM_OS_SUBCLASS" == darwin ]; then + CLAM_COMPILER=GNU_DARWIN + else + CLAM_COMPILER=GNU_LINUX + fi +elif [ "$OPERATING_SYSTEM" == WIN32 ]; then + CLAM_COMPILER=GNU_WINDOWS +fi +if [ -z "$CLAM_COMPILER" ]; then + # if we get into this case, we have no idea how to set the default compiler. + # so... pick a fun default. + CLAM_COMPILER=GNU_LINUX +fi + +# "CLAM_COMPILER_ROOT_DIR" is the top-level for the C++ compiler location. +# it is generally the top of the OS, although some variants may need this +# modified (e.g., gnu arm linux, but we haven't built on that in a bit). +export CLAM_COMPILER_ROOT_DIR="/" + +# CLAM_COMPILER_VERSION specifies the version of the particular compiler we're using. +# this is sometimes needed to distinguish how the code is built or where headers/libraries are found. +export CLAM_COMPILER_VERSION=$(bash $CLAM_SCRIPTS/cpp/get_version.sh $CLAM_COMPILER $CLAM_COMPILER_ROOT_DIR ) # new BUILD_TOP variable points at the utter top-most level of any files # in the building hierarchy. @@ -103,17 +165,6 @@ export BUILD_TOP="$FEISTY_MEOW_APEX" # code needed to produce the executables for feisty meow. export PRODUCTION_STORE="$BUILD_TOP/production" -## set up the top-level for all build creations and logs and such. -#export FEISTY_MEOW_GENERATED_STORE="$TMP/generated-feisty_meow" -#if [ ! -d "$FEISTY_MEOW_GENERATED_STORE" ]; then -# mkdir -p "$FEISTY_MEOW_GENERATED_STORE" -#fi -## set up our effluent outsourcing valves. -#export TEMPORARIES_PILE="$FEISTY_MEOW_GENERATED_STORE/temporaries" -#if [ ! -d "$TEMPORARIES_PILE" ]; then -# mkdir -p "$TEMPORARIES_PILE" -#fi - # this variable points at a folder where we store the generated products of # the build, such as the binaries and installer packages. export RUNTIME_PATH="$FEISTY_MEOW_GENERATED_STORE/runtime" @@ -196,8 +247,10 @@ if [ -z "$got_bad" ]; then fi # pick the executable's file ending based on the platform. - if [ "$OPERATING_SYSTEM" == "UNIX" ]; then export EXE_ENDING=; - elif [ "$OPERATING_SYSTEM" == "WIN32" ]; then export EXE_ENDING=.exe; + if [ "$OPERATING_SYSTEM" == "UNIX" ]; then + export EXE_ENDING="" + elif [ "$OPERATING_SYSTEM" == "WIN32" ]; then + export EXE_ENDING=".exe" else echo "The OPERATING_SYSTEM variable is unset or unknown. Bailing out." fi @@ -208,7 +261,10 @@ if [ -z "$got_bad" ]; then # load up the helper variables for visual studio on winders. if [ "$OPERATING_SYSTEM" == "WIN32" ]; then - source "$BUILD_SCRIPTS_PATH/vis_stu_vars.sh" + # moved back to the good path of using gcc, not visual studio. +#what vars needed? +#trying just unixy ones, since we're doing cygwin on doze. +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TARGETS_STORE" else export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TARGETS_STORE" fi diff --git a/scripts/generator/produce_feisty_meow.sh b/scripts/generator/produce_feisty_meow.sh index dbecd263..3985f095 100644 --- a/scripts/generator/produce_feisty_meow.sh +++ b/scripts/generator/produce_feisty_meow.sh @@ -33,6 +33,7 @@ export INCLUDED_FROM_BOOTSTRAP=true export BUILD_SCRIPTS_PATH="$( \cd "$(\dirname "$0")" && /bin/pwd )" #echo build scripts dir initial value: $BUILD_SCRIPTS_PATH BUILD_SCRIPTS_PATH="$(echo $BUILD_SCRIPTS_PATH | tr '\\\\' '/' )" +#hmmm: why four backslashes above? trying two in our unix virtual root code below. #echo build scripts dir after chewing: $BUILD_SCRIPTS_PATH # load in feisty meow basic scripts, if not already loaded. @@ -53,19 +54,86 @@ source "$BUILD_SCRIPTS_PATH/build_variables.sh" "$BUILD_SCRIPTS_PATH/build_varia ############## # creates the directory for our binaries and gives it a reasonable paths configuration. -function prepare_binaries_dir() +function prepare_clam_binaries_dir() { # we'll store binaries here from the bootstrap process. if [ ! -d "$CLAM_BINARIES" ]; then - echo "creating binary dir now in $CLAM_BINARIES" + echo "creating clam binary dir now in $CLAM_BINARIES" mkdir -p "$CLAM_BINARIES" + exit_on_error "creating clam binary directory in $CLAM_BINARIES" fi if [ ! -f "$CLAM_BINARIES/paths.ini" ]; then - echo "copied paths.ini to binary dir." cp "$PRODUCTION_STORE/paths.ini" "$CLAM_BINARIES" + exit_on_error "copying paths.ini to $CLAM_BINARIES" + echo "copied paths.ini to clam binary dir." fi } +# fix the system helper header up by calling cygpath to determine the cygwin +# root, if we are on windoze and cygwin. +function update_system_helper_header() +{ + # create our main binaries directory if needed. + if [ ! -d "$FEISTY_MEOW_BINARIES" ]; then + echo "creating feisty meow binary folder now in $FEISTY_MEOW_BINARIES" + mkdir -p "$FEISTY_MEOW_BINARIES" + exit_on_error "creating feisty meow binary folder in $FEISTY_MEOW_BINARIES" + fi + + # copy up the system helper template version into the binaries directory. + if [ ! -f "$FEISTY_MEOW_BINARIES/system_helper.h" ]; then + cp "$PRODUCTION_STORE/system_helper_template.h" "$FEISTY_MEOW_BINARIES/system_helper.h" + exit_on_error "creating system_helper header in $FEISTY_MEOW_BINARIES" + echo "copied system_helper header to feisty meow binary dir." + fi + + # set the cygwin root path if we're on cygwin. + whichable cygpath &>/dev/null + if [ $? -eq 0 ]; then + # found cygpath, so run it now to get the dossy path of the root ('/' folder). + found_root="$(cygpath -w -m /)" + if [ $? -ne 0 ]; then + echo "Failure to find virtual Unix root folder with cygpath." + exit 1322 + fi +#echo "found root as '$found_root'" + # translate any backslashes to forward thinking slashes. + found_root="$(echo $found_root | tr '\\' '/')" +#echo "processed root is now: '$found_root'" + # edit the entry in place to correct the default path. + sed -i \ + -e "s% *#define FEISTY_MEOW_VIRTUAL_UNIX_ROOT \".*$%#define FEISTY_MEOW_VIRTUAL_UNIX_ROOT \"$found_root\"%" \ + "$FEISTY_MEOW_BINARIES/system_helper.h" + exit_on_error "updating system_helper header in $FEISTY_MEOW_BINARIES" +#echo "system helper file now has:" +#cat "$FEISTY_MEOW_BINARIES/system_helper.h" + fi +} + +function make_code { + make $* $BE_NOISY ${BUILD_DEFAULTS[@]} + if [ $? != 0 ]; then + echo "Failed to make on: $*" + exit 2323 + fi +} + +# removes pcdos eol from any scripts. that assumes that the bootstrap script +# itself isn't polluted with them. +function strip_cr { + ctrl_m=$'\015' + for i in $*; do + tempgrep="$(mktemp "$TEMPORARIES_PILE/tempgrep.XXXXXX")" + grep -l "$ctrl_m" "$i" >$tempgrep + if [ ! -z "$(cat $tempgrep)" ]; then + temp="$(mktemp "$TEMPORARIES_PILE/tempsed.XXXXXX")" + sed -e "s/$ctrl_m$//" <$i >$temp + mv -f $temp $i + fi + rm "$tempgrep" + done +} + ############## # turn off sounds to avoid running the sound player that's not been built yet. @@ -78,9 +146,6 @@ echo "Build bootstrap process has started." # preconditions for the build process... -# set up our output directories etc. -prepare_binaries_dir - # set a flag for this process so we can omit certain compilations as necessary. export BOOT_STRAPPING=true @@ -99,30 +164,6 @@ declare -a BUILD_DEFAULTS=( "BOOT_STRAPPING=t" "OPTIMIZE=t" "REBUILD=t" "DEBUG=" # noisy can be added to spew lots of text: "NOISY=t" # this can help with compilation issues by showing all the flags. -function make_code { - make $* $BE_NOISY ${BUILD_DEFAULTS[@]} - if [ $? != 0 ]; then - echo "Failed to make on: $*" - exit 2323 - fi -} - -# removes pcdos eol from any scripts. that assumes that the bootstrap script -# itself isn't polluted with them. -function strip_cr { - ctrl_m=$'\015' - for i in $*; do - tempgrep="$(mktemp "$TEMPORARIES_PILE/tempgrep.XXXXXX")" - grep -l "$ctrl_m" "$i" >$tempgrep - if [ ! -z "$(cat $tempgrep)" ]; then - temp="$(mktemp "$TEMPORARIES_PILE/tempsed.XXXXXX")" - sed -e "s/$ctrl_m$//" <$i >$temp - mv -f $temp $i - fi - rm "$tempgrep" - done -} - # the promote function moves a file from the exe directory into the build's # bin directory. it performs the copy step and makes the file executable. # the original name should just be the root of the filename without any @@ -130,7 +171,7 @@ function strip_cr { # NOTE: this depends on the operating system having been chosen above! if [ "$OPERATING_SYSTEM" = "UNIX" ]; then function promote { - prepare_binaries_dir + prepare_clam_binaries_dir if [ ! -f "$INTERMEDIATE_STORE/$1" ]; then echo "Failed to build the application $1--quitting now." @@ -142,7 +183,7 @@ if [ "$OPERATING_SYSTEM" = "UNIX" ]; then } elif [ "$OPERATING_SYSTEM" = "WIN32" ]; then function promote { - prepare_binaries_dir + prepare_clam_binaries_dir if [ ! -f "$INTERMEDIATE_STORE/$1.exe" ]; then echo "Failed to build the application $1.exe--quitting now." @@ -166,6 +207,9 @@ source "$BUILD_SCRIPTS_PATH/build_variables.sh" "$BUILD_SCRIPTS_PATH/build_varia # clean out any current contents. bash "$BUILD_SCRIPTS_PATH/whack_build.sh" clean +# set up our output directories etc. +prepare_clam_binaries_dir + # make this again so no one gets cranky. mkdir -p "$FEISTY_MEOW_LOGS" @@ -179,13 +223,8 @@ if [ -z "$SAVE_BINARIES" ]; then done fi -# make the clam shell scripts executable. -#hmmm: why? this should no longer be needed. -# and even if it's needed, the perms should be stored in the repo. -#chmod 755 "$CLAM_SCRIPTS"/*.sh -#chmod 755 "$CLAM_SCRIPTS"/cpp/*.sh -#chmod 755 "$CLAM_SCRIPTS"/csharp/*.sh -#chmod 755 "$FEISTY_MEOW_SCRIPTS/generator/wrapdoze.sh" +# copy the system helper header. +update_system_helper_header # rebuild the dependency tool. needed by everything, pretty much, but # since it's from the xfree project, it doesn't need any of our libraries. @@ -257,13 +296,15 @@ echo "The build binaries have been re-created (or were already present)." if [ -z "$JUST_BOOTSTRAP_APPS" ]; then echo Cleaning up the temporary files that were built. bash "$BUILD_SCRIPTS_PATH/whack_build.sh" -#wrong! we don't want to whack it all. clean # recreate our useful junk directories... mkdir -p "$FEISTY_MEOW_GENERATED_STORE" mkdir -p "$TEMPORARIES_PILE" mkdir -p "$FEISTY_MEOW_LOGS" + # re-copy the system helper header. + update_system_helper_header + echo Now starting a normal build of the repository source code. pushd "$FEISTY_MEOW_APEX" &>/dev/null unset BUILD_DEFAULTS diff --git a/scripts/generator/vis_stu_vars.sh b/scripts/generator/vis_stu_vars.sh deleted file mode 100644 index 546d8627..00000000 --- a/scripts/generator/vis_stu_vars.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/bash - -# this file attempts to provide all of the variables needed for compiling -# with the microsoft visual studio compiler (dot net version). it requires -# one environment variable (called VSxCOMNTOOLS) be set that points at the -# location of the common tools in the visual studio installation. -# The value of x can be 80, 90 or 100. - -function print_usage { - echo "The VS80COMNTOOLS, VS90COMNTOOLS and VS100COMNTOOLS variables are not set." - echo "This usually means that the Visual Studio compiler is not installed." - echo "" -} - -if [[ "$1" =~ .*help.* ]]; then - print_usage - exit 0 -fi - -function setup_visual_studio_variables() -{ - # we try to use the most recent compiler location, and work backwards as - # needed for the supported range (10 = vs 2010, 9 = vs 2008, 8 = vs 2005). - export VSxTOOLS="$VS100COMNTOOLS" - if [ -z "$VSxTOOLS" ]; then - export VSxTOOLS="$VS90COMNTOOLS" - if [ -z "$VSxTOOLS" ]; then - export VSxTOOLS="$VS80COMNTOOLS" - fi - fi - - if [ -z "$VSxTOOLS" ]; then - return 33 - fi - export VSxTOOLS="$(cygpath -w -s "$VSxTOOLS" | tr "A-Z" "a-z" | sed -e 's/\\/\//g' )" -#| sed -e 's/^\(.\):/\/\1/' )" - - export VIS_STU_ROOT="$(echo $VSxTOOLS | sed -e 's/^\(.*\)\/[^\/]*\/[^\/]*[\/]$/\1/' )" -#| sed -e 's/^\(.\):/\/\1/' )" - export VSINSTALLDIR="$VIS_STU_ROOT" - - export WINDIR="$(cygpath -w -s "$WINDIR" | tr A-Z a-z | sed -e 's/\\/\//g' )" -#| sed -e 's/^\(.\):/\/\1/' )" - - export VCINSTALLDIR="$VSINSTALLDIR/VC" - export VSCOMMONROOT="$VSINSTALLDIR/Common7" - export VS_TOOLS_DIR="$VSCOMMONROOT/tools" - export DevEnvDir="$VSCOMMONROOT/IDE" - export MSVCDir="$VCINSTALLDIR" - export FrameworkDir="$WINDIR/Microsoft.NET/Framework" - export FrameworkVersion=v4.0.30319 - #old export FrameworkSDKDir="$VSINSTALLDIR/SDK/v2.0" - - export PLATFORM_DIR="$VCINSTALLDIR/PlatformSDK" - if [ ! -d "$PLATFORM_DIR" ]; then - -#on hold: export PLATFORM_DIR="$(cygpath -w -s "$PROGRAMFILES/Microsoft SDKs/Windows/v7.0A" | tr "A-Z" "a-z" | sed -e 's/^\(.*\)\/[^\/]*\/[^\/]*[\/]$/\1/' )" -##| sed -e 's/^\(.\):/\/\1/' )" - - # guess at where we can find this damned directory in its short form. -#hmmm: this is needed until there's a replacement for short path, or we can build again. - export PLATFORM_DIR="c:/progra~2/micros~1/windows/v7.0a" - if [ ! -d "$PLATFORM_DIR" ]; then - PLATFORM_DIR="c:/progra~1/micros~1/windows/v7.0a" - if [ ! -d "$PLATFORM_DIR" ]; then - PLATFORM_DIR="c:/progra~1/micros~2/windows/v7.0a" - if [ ! -d "$PLATFORM_DIR" ]; then - PLATFORM_DIR="c:/progra~2/micros~2/windows/v7.0a" - fi - fi - fi - - if [ ! -d "$PLATFORM_DIR" ]; then - echo "*** Failure to calculate the platform directory based on several attempts using c:\\program files\\microsoft sdks\\windows\\v7.0a as the basic pattern" - fi - - - fi - export WindowsSdkDir="$PLATFORM_DIR" - - #echo "path before is $PATH" - local filena - for filena in "$DevEnvDir" "$VCINSTALLDIR/BIN" "$VSxTOOLS" "$VSxTOOLS/bin" "$FrameworkDir/$FrameworkVersion" "$FrameworkDir/v3.5" "$VCINSTALLDIR/VCPackages" "$VSINSTALLDIR/Common7/Tools" "$PLATFORM_DIR/bin"; do - export PATH="$PATH:$(dos_to_unix_path $filena)" - done - #echo "path after is $PATH" - - export INCLUDE="$VCINSTALLDIR/ATLMFC/INCLUDE:$VCINSTALLDIR/INCLUDE:$PLATFORM_DIR/include" - #:$FrameworkSDKDir/include" - - export LIB="$VCINSTALLDIR/ATLMFC/LIB:$VCINSTALLDIR/LIB:$PLATFORM_DIR/lib" - #:$FrameworkSDKDir/lib" - - # convert framework dir back or things yell like hell. - export FrameworkDir=$(unix_to_dos_path $FrameworkDir) - # the redirection of stderr to null is to get around an obnoxious cygwin - # warning that seems to be erroneously complaining about backslashes. - - ############## - - echo "calculated variables for dos/windoze builds:" - var VIS_STU_ROOT VSxTOOLS WINDIR VSxTOOLS VSINSTALLDIR PLATFORM_DIR FrameworkDir - - ############## -} - -# run the above, very nasty, function. -setup_visual_studio_variables - - diff --git a/scripts/generator/wrapdoze.sh b/scripts/generator/wrapdoze.sh deleted file mode 100644 index d38b432b..00000000 --- a/scripts/generator/wrapdoze.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/bash - -source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" - -#hmmm: make this support multiple vars as parameters. -# replaces a specific environment variable with a dos approved equivalent. -function dossify_environment_variable() -{ - local var="$1"; shift - -#cygpath doesn't handle multiple path variables properly and otherwise operates only on one path element. -## new_value="$(cygpath -p -d ${!var})" -## eval "export $var=\"$new_value\"" -##echo "hey now the var is '${!var}'" - - old_value="${!var}" -#echo "var is '$var' and old value is '$old_value'" - if [[ ! "$old_value" =~ \/cygdrive\/ ]]; then -#echo didnt have a cygdrive in it: $old_value - return 0 -#hmmm: want this to continue in multi parm version. - fi - - # replace single back-slashes with double ones. - local new_value="$(unix_to_dos_path "${old_value}")" - - # remove any quote characters in the value. - new_value="${new_value//\"/}" - - eval "export $var=\"$new_value\"" - echo "new value established: $var='${!var}'" -} - -# for a windows build, this will replace any forward slashes -# and other cygwin notation with the appropriate dos style paths. -function dossify_and_run_commands() -{ - if [ "$OS" != "Windows_NT" ]; then - # for non windows, just run the commands straight up. - eval "${@}" - return $? - fi - - # force all slashes to be dossy. -# export SERIOUS_SLASH_TREATMENT=true - - dossify_environment_variable INCLUDE - - declare -a darc_commands=() - - for i in "$@"; do - if [[ "$i" =~ ^-[a-zA-z][/\"].* ]]; then - flag="${i:0:2}" - filename="$(unix_to_dos_path ${i:2})" -#echo "first two chars are $flag" -#echo "last after that are $filename" - recombined="$flag$filename" -#echo combined flag and file is $recombined - darc_commands+=("$recombined") - elif [[ "$i" =~ ^-libpath:.* ]]; then - flag="-libpath:" - filename="$(unix_to_dos_path ${i:9})" -#echo "libflag flag is $flag" -#echo "name after that is $filename" - recombined="$flag$filename" -#echo combined flag and file is $recombined - darc_commands+=("$recombined") - else - darc_commands+=($(unix_to_dos_path $i)) - fi - done - - declare -a real_commands=() - for i in "${darc_commands[@]}"; do - real_commands+=($(echo $i | sed -e 's/\//\\/g')) - done - - if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then - echo commands are now: - for i in "${real_commands[@]}"; do - echo -n "$i " - done - echo - fi - -# this nonsense is only necessary because cygwin is screwing up our carefully constructed -# command line. it can't seem to leave the dos style paths alone in some cases, and insists -# on changing their form to use forward slashes, which breaks the windows compiler. -# this is NOT what cygwin is supposed to be doing, according to their documentation that -# claims all styles of paths are supported. and of course this worked fine in msys. - - # now actually run the chewed command. - -# old approach, not working since cygwin is hosing us on some paths. -#cmd /c "${real_commands[@]}" - -#new approach that creates a cmd file. - cmdfile="$(mktemp $CLAM_TMP/build_cmds.XXXXXX)" - echo "${real_commands[@]}" >"$cmdfile" -#echo "**** cmd file is $cmdfile" - cmd /c $(cat "$cmdfile") - retval=$? - # leave the file for inspection if there was an error. - if [ $retval -eq 0 ]; then - \rm "$cmdfile" - fi - return $retval -} - -dossify_and_run_commands "$@" - diff --git a/scripts/multimedia/sound_play.sh b/scripts/multimedia/sound_play.sh index 8c5130ef..66b859f9 100644 --- a/scripts/multimedia/sound_play.sh +++ b/scripts/multimedia/sound_play.sh @@ -9,33 +9,53 @@ if [ $# -lt 1 ]; then exit 0; fi -export PLAYCMD=/usr/bin/play -if [ ! -f "$PLAYCMD" ]; then - PLAYCMD='echo Unknown sound player...' -fi +export BASIC_PLAY_CMD='echo Unknown basic sound player...' -if [ ! -z "$(whichable afplay)" ]; then +if [ -f "/usr/bin/play" ]; then +#echo we see /usr/bin/play available... + BASIC_PLAY_CMD=/usr/bin/play +elif [ ! -z "$WINDIR" ]; then +#echo "kludge for win32; we provide our own sound player." + BASIC_PLAY_CMD=playsound +elif [ ! -z "$(whichable afplay)" ]; then #echo we see afplay available... - PLAYCMD=afplay + BASIC_PLAY_CMD=afplay elif [ ! -z "$(psfind artsd)" ]; then #echo we see artsd running... - PLAYCMD=artsplay + BASIC_PLAY_CMD=artsplay elif [ ! -z "$(psfind esd)" ]; then #echo we see esd running... - PLAYCMD=esdplay + BASIC_PLAY_CMD=esdplay elif [ ! -z "$(psfind pulseaudio)" ]; then #echo we see pulse running... - PLAYCMD="padsp aplay" -elif [ ! -z "$WINDIR" ]; then -#echo kludge for win32; we provide our own sound player. - PLAYCMD=playsound + BASIC_PLAY_CMD="padsp aplay" +else + echo "I don't know how to play basic sound files for this OS and sound system." +fi + +export MP3_PLAY_CMD='echo Unknown mp3 player...' + +if [ ! -z "$(whichable mplayer)" ]; then + MP3_PLAY_CMD=mplayer else - echo "I don't know how to play sounds for this OS and sound system." + echo "I don't know how to play mp3 files for this OS and sound system." fi -# play the sounds individually; playsound can handle multiple files, but -# "play" doesn't want to on some systems. -for i in $*; do $PLAYCMD $i >/dev/null 2>&1; done +# play the sounds individually; some apps like playsound can handle multiple +# files, but "/usr/bin/play" doesn't want to on some systems. +for filename in $*; do + case "$filename" in + *wav) + $BASIC_PLAY_CMD $filename >/dev/null 2>&1; + ;; + *mp3) + $MP3_PLAY_CMD $filename >/dev/null 2>&1; + ;; + *) + echo "I don't know the file extension here: $filename" + ;; + esac +done exit 0 diff --git a/scripts/rev_control/branchy.sh b/scripts/rev_control/branchy.sh index 15ec7702..98e21387 100644 --- a/scripts/rev_control/branchy.sh +++ b/scripts/rev_control/branchy.sh @@ -1,7 +1,7 @@ #!/bin/bash -# branchy: lists the branches active on all of the folders present in the -# REPOSITORY_LIST variable or in paths provided on the command line. +# branchy: lists the branches active on all of the paths provided on the command line. +# if no directory is specified, this defaults to operating on the current directory. source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" source "$FEISTY_MEOW_SCRIPTS/rev_control/version_control.sh" @@ -10,15 +10,29 @@ save_terminal_title ############## -FULL_LIST="$@" - -# use the current directory if no paths were provided. -if [ -z "$FULL_LIST" ]; then - FULL_LIST="." +## holding old implem: +#FULL_LIST="$@" +## use the current directory if no paths were provided. +#if [ -z "$FULL_LIST" ]; then +# FULL_LIST="." +#fi# +#show_active_branch $FULL_LIST +#exit_on_error "showing branches: $FULL_LIST" + +dir="$1"; shift +if [ -z "$dir" ]; then + dir=. fi -show_active_branch $FULL_LIST -exit_on_error "showing branches: $FULL_LIST" +pushd "$dir" &>/dev/null +exit_on_error "changing to directory: $dir" +tempfile=$(generate_rev_ctrl_filelist) +popd &>/dev/null + +perform_revctrl_action_on_file "$tempfile" show_active_branch +exit_on_error "performing revision control action show_active_branch on: $tempfile" + +rm "$tempfile" ############## diff --git a/scripts/rev_control/diff_repos.sh b/scripts/rev_control/diff_repos.sh index 5a6cf750..340a5105 100644 --- a/scripts/rev_control/diff_repos.sh +++ b/scripts/rev_control/diff_repos.sh @@ -27,5 +27,7 @@ exit_on_error "performing revision control action do_revctrl_diff on: $tempfile" rm "$tempfile" +############## + restore_terminal_title diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 96a8558e..34d51f28 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -61,7 +61,8 @@ function do_revctrl_checkin() # make a nice echoer since we want to use it inside conditions below. local nicedir="$directory" if [ $nicedir == "." ]; then - nicedir=$(\pwd) + nicedir="$( \cd . && /bin/pwd )" +#echo "calculated nicedir as '$nicedir'" fi local blatt_report="echo -ne \nchecking in '$nicedir'... " local tell_no_checkin="echo -ne \nskipping check-in due to presence of $NO_CHECKIN sentinel file: $nicedir" @@ -283,19 +284,26 @@ function check_branch_state() return $to_return } -# showes the branch currently active in the repository. +# shows the branch currently active in the repository. function show_active_branch() { -#hmmm: if no args, assume current dir! +#hmmm: if no args, assume current dir!? for directory in "$@"; do - echo -n "active branch for '$directory': " + if [ $directory == "." ]; then + directory="$( \cd . && /bin/pwd )" +#echo "calculated directory as '$directory'" + fi + + echo -n -e "$(basename $directory) => branch " pushd "$directory" &>/dev/null #hmmm: if git... git rev-parse --abbrev-ref HEAD #hmmm: else OTHERS!!! + echo + popd &>/dev/null done } @@ -535,7 +543,7 @@ function perform_revctrl_action_on_file() fi did_anything=yes pushd "$dirname" &>/dev/null - echo "[$(pwd)]" + echo -n "[$(pwd)] " # pass the current directory plus the remaining parameters from function invocation. $action . exit_on_error "performing action $action on: $(pwd)" diff --git a/scripts/show_db/call_movie_seeker.sh b/scripts/show_db/call_movie_seeker.sh old mode 100644 new mode 100755 diff --git a/scripts/show_db/call_movie_stripper.sh b/scripts/show_db/call_movie_stripper.sh old mode 100644 new mode 100755 diff --git a/scripts/show_db/call_show_stripper.sh b/scripts/show_db/call_show_stripper.sh old mode 100644 new mode 100755 diff --git a/scripts/show_db/movie_seeker.sh b/scripts/show_db/movie_seeker.sh old mode 100644 new mode 100755 diff --git a/scripts/show_db/movie_stripper.sh b/scripts/show_db/movie_stripper.sh old mode 100644 new mode 100755 diff --git a/scripts/show_db/show_stripper.sh b/scripts/show_db/show_stripper.sh old mode 100644 new mode 100755 diff --git a/scripts/system/find_dhcp_unassigned.sh b/scripts/system/find_dhcp_unassigned.sh index b8b6179a..99cd810a 100644 --- a/scripts/system/find_dhcp_unassigned.sh +++ b/scripts/system/find_dhcp_unassigned.sh @@ -8,5 +8,5 @@ if [ ! -s "$logfile" ]; then # a simple fail over that's not guaranteed to work. logfile="/var/log/syslog" fi -tail -n 2000 "$logfile" | grep -i "dhcp.*2[4-5][0-9]" | less +tail -n 10000 "$logfile" | grep -i "dhcp.*2[4-5][0-9]" | less diff --git a/scripts/text/new_sig.pl b/scripts/text/new_sig.pl index d622893d..fb84e711 100644 --- a/scripts/text/new_sig.pl +++ b/scripts/text/new_sig.pl @@ -31,9 +31,14 @@ print FILE "\n"; close(FILE); local($bindir) = $ENV{'FEISTY_MEOW_BINARIES'}; $bindir = &sanitize_name($bindir); -system("$bindir/nechung >>$temp_filename"); -###always hits this. nechung gives an error? || die "couldn't run nechung."; -open(FILE, ">>" . $temp_filename) || die "couldn't open $temp_filename for writing."; +$app_path = "$bindir/nechung"; +if (-e $app_path) { + system("$app_path >>$temp_filename"); + open(FILE, ">>" . $temp_filename) || die "couldn't open $temp_filename for writing."; +} else { + open(FILE, ">>" . $temp_filename) || die "couldn't open $temp_filename for writing."; + print FILE "nechung oracle program (NOP) could not be found.\n"; +} print FILE "\n"; print FILE "_____________ not necessarily my opinions, not necessarily not. _____________\n"; close(FILE); diff --git a/testkit/library/helper_methods.sh b/testkit/library/helper_methods.sh index 7be57812..1bdb6294 100644 --- a/testkit/library/helper_methods.sh +++ b/testkit/library/helper_methods.sh @@ -294,12 +294,12 @@ function test_fuse_mount() # switches from a /X/path form to an X:/ form. this also processes cygwin paths. function unix_to_dos_path() { # we usually remove dos slashes in favor of forward slashes. - if [ ! -z "$SERIOUS_SLASH_TREATMENT" ]; then - # unless this flag is set, in which case we force dos slashes. - echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' | sed -e 's/\//\\/g' - else +# if [ ! -z "$SERIOUS_SLASH_TREATMENT" ]; then +# # unless this flag is set, in which case we force dos slashes. +# echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' | sed -e 's/\//\\/g' +# else echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/' - fi +# fi } # switches from an X:/ form to an /X/path form. diff --git a/walrus/utilities/multimedia/multimedia_tools.txt b/walrus/utilities/multimedia/multimedia_tools.txt index 51970c89..5efa691b 100644 --- a/walrus/utilities/multimedia/multimedia_tools.txt +++ b/walrus/utilities/multimedia/multimedia_tools.txt @@ -65,6 +65,9 @@ this article helps a lot to get the music off of vinyl records using a usb turnt movie processing ---------------- +devede: + super great dvd creator for playable dvds. + kdenlive: this is an awesome tool that lets you manage multiple tracks of audio and video, apply effects to both, edit and remove pieces, insert tracks, etc. it's great. @@ -91,7 +94,6 @@ fdupes: another useful tool for finding duplicate tracks in a music collection, but relies on exact matches in the names(?). was not so powerful as dupeguru, but still useful. - ----------------------------- picture collection management ----------------------------- @@ -100,6 +102,3 @@ shotwell: currently the top picture manipulation and manager tool i use at home. the imaginations folder is based on the date management in shotwell. - - -