From 9193bdc5ad3c6a6332421f14021317b66dcb9618 Mon Sep 17 00:00:00 2001 From: "Joshua J. Cogliati" Date: Sun, 13 Dec 2020 20:39:19 -0700 Subject: [PATCH 1/6] Bumping version to 6.2 (and 6.2pre in configure.ac) --- README.md | 2 +- configure.ac | 2 +- docs/ucblogo.texi | 4 ++-- inno/ucblogo.iss | 4 ++-- logolib/Messages | 2 +- logolib/Messages.fr | 2 +- logolib/Messages.sp | 2 +- logolib/Messages.zh_TW | 2 +- main.c | 12 ++---------- 9 files changed, 12 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index a921f1be..73a31ac8 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ along with this program. If not, see https://www.gnu.org/licenses/. This uses the repository https://github.com/jrincayc/ucblogo-code created for further UCBLogo development. -The current version is 6.1 +The current version is 6.2 Changes for this release: * The license has been changed to GPL3. diff --git a/configure.ac b/configure.ac index eb6076b3..307ca9e8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([ucblogo],[6.1],[],[],[https://github.com/jrincayc/ucblogo-code]) +AC_INIT([ucblogo],[6.2pre],[],[],[https://github.com/jrincayc/ucblogo-code]) AC_CONFIG_SRCDIR([logodata.c]) AC_CONFIG_HEADER(config.h) diff --git a/docs/ucblogo.texi b/docs/ucblogo.texi index ebda95e5..3a88cb98 100644 --- a/docs/ucblogo.texi +++ b/docs/ucblogo.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename ucblogo.info -@settitle BERKELEY LOGO 6.1 +@settitle BERKELEY LOGO 6.2 @setchapternewpage odd @c %**end of header @@ -24,7 +24,7 @@ @finalout @titlepage -@title BERKELEY LOGO 6.1 +@title BERKELEY LOGO 6.2 @subtitle Berkeley Logo User Manual @author Brian Harvey @end titlepage diff --git a/inno/ucblogo.iss b/inno/ucblogo.iss index 4b7864f6..0f1e5cee 100644 --- a/inno/ucblogo.iss +++ b/inno/ucblogo.iss @@ -3,8 +3,8 @@ [Setup] AppName=Berkeley Logo -AppVerName=Berkeley Logo 6.1 -AppVersion=6.1 +AppVerName=Berkeley Logo 6.2 +AppVersion=6.2 AppPublisher=University of California, Berkeley AppPublisherURL=http://www.cs.berkeley.edu/~bh/logo.html AppSupportURL=https://github.com/jrincayc/ucblogo-code/issues diff --git a/logolib/Messages b/logolib/Messages index fdd82805..5a020c37 100644 --- a/logolib/Messages +++ b/logolib/Messages @@ -1,4 +1,4 @@ -; UCBLogo message file version 6.1 +; UCBLogo message file version 6.2 ; Error messages -- position in this file corresponds to error number ; Lines starting with semicolon don't count in the line numbering ; and may be added at will. diff --git a/logolib/Messages.fr b/logolib/Messages.fr index 9b577540..31f0a9a1 100644 --- a/logolib/Messages.fr +++ b/logolib/Messages.fr @@ -1,4 +1,4 @@ -; French version of Berkeley Logo messages file 6.1 +; French version of Berkeley Logo messages file 6.2 ; Error messages -- position in this file corresponds to error number ; Lines starting with semicolon don't count in the line numbering ; and may be added at will. diff --git a/logolib/Messages.sp b/logolib/Messages.sp index 3e29bd13..44f23cb5 100644 --- a/logolib/Messages.sp +++ b/logolib/Messages.sp @@ -1,4 +1,4 @@ -; Spanish version of Berkeley Logo messages file 6.1 +; Spanish version of Berkeley Logo messages file 6.2 ; Error messages -- position in this file corresponds to error number ; Lines starting with semicolon don't count in the line numbering ; and may be added at will. diff --git a/logolib/Messages.zh_TW b/logolib/Messages.zh_TW index ee4f1df3..ffd1fd63 100644 --- a/logolib/Messages.zh_TW +++ b/logolib/Messages.zh_TW @@ -1,4 +1,4 @@ -; UCBLogo message file version 6.1 +; UCBLogo message file version 6.2 ; Error messages -- position in this file corresponds to error number ; Lines starting with semicolon don't count in the line numbering ; and may be added at will. diff --git a/main.c b/main.c index 2993be12..c5919601 100644 --- a/main.c +++ b/main.c @@ -275,11 +275,7 @@ int main(int argc, char *argv[]) { { char version[64]; lcleartext(NIL); -#ifdef HAVE_WX - strcpy(version,"6.1"); -#else - strcpy(version,"5.6"); -#endif + strcpy(version, VERSION); #ifdef GITID extern char *GIT; strcat(version, GIT); @@ -289,11 +285,7 @@ int main(int argc, char *argv[]) { } } -#ifdef HAVE_WX - setvalnode__caseobj(LogoVersion, make_floatnode(6.1)); -#else - setvalnode__caseobj(LogoVersion, make_floatnode(5.6)); -#endif + setvalnode__caseobj(LogoVersion, make_floatnode(6.2)); setflag__caseobj(LogoVersion, VAL_BURIED); argv2 = argv; argc2 = argc; From 22340446dc6d5107825d86f853372c4f57972e27 Mon Sep 17 00:00:00 2001 From: Dan Malec Date: Fri, 18 Dec 2020 11:00:05 -0500 Subject: [PATCH 2/6] CD workflow - build (but do not release) release candidate artifacts. * Builds and caches wxWidgets for three target platforms - Linux, OSX, Windows * Builds on Linux, producing the PDF, source tar.gz, and source .zip * Builds on OSX and Windows, leveraging the the PDF from the Linux build * End state should be 5 artifacts - PDF, .tar.gx, .zip, .dmg, .exe CD motivated changes: * Allow overriding of MinGw bin directory and wxWidgets directory in makefile.msys * Added -static flag to LDFLAGS in makefile.msys * Removed -lctl3d32 from LIBS in makefile.msys * Commented out makelib and Messages build targets in makefile.msys 6.2 specific changes: * Added VERSION to config.h.msys * Added -DHAVE_CONFIG_H to CFLAGS and CXXFLAGS in makefile.msys * Updated OutputBaseFilename to ucblogo62setup in inno/ucblogo.iss * Updated PDF/texi filename from usermanual.* to ucblogo.* in inno/ucblogo.iss and makefile.msys --- .github/workflows/cd.yaml | 294 ++++++++++++++++++++++++++++++++++++++ config.h.msys | 1 + inno/ucblogo.iss | 4 +- makefile.msys | 26 ++-- 4 files changed, 311 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/cd.yaml diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml new file mode 100644 index 00000000..44bc6b6c --- /dev/null +++ b/.github/workflows/cd.yaml @@ -0,0 +1,294 @@ +name: CD + +on: + push: + branches: + - cd_* + - master + - release* + +env: + INNO_VERSION: 6.1.2 + WX_WIDGETS_VERSION: 3.0.5 + +jobs: + + # ############################################################################ + # The build_wxwidgets_ jobs handle building and caching wxWidgets. + # + # This reduces total build time by a measurable amount, as wxWidgets can take + # over 30 minutes to build. + # ############################################################################ + + build_wxwidgets_linux: + name: Build wxWidgets for Linux + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - name: Cache wxWidgets + uses: actions/cache@v2 + id: wxwidgets-cache + with: + path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} + key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} + - name: Install Dependencies + if: steps.wxwidgets-cache.outputs.cache-hit != 'true' + run: > + sudo apt-get install + libgtk-3-dev + - name: Download wxWidgets + if: steps.wxwidgets-cache.outputs.cache-hit != 'true' + working-directory: ${{ runner.temp }} + run: | + wget https://github.com/wxWidgets/wxWidgets/releases/download/v${{ env.WX_WIDGETS_VERSION }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2 + tar -xjf wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2 + - name: Build wxwidgets + if: steps.wxwidgets-cache.outputs.cache-hit != 'true' + working-directory: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} + run: | + mkdir build-static + cd build-static + ../configure --disable-shared --enable-unicode + make -j2 + + build_wxwidgets_osx: + name: Build wxWidgets for OSX + runs-on: macos-latest + timeout-minutes: 60 + steps: + - name: Cache wxWidgets + uses: actions/cache@v2 + id: wxwidgets-cache + with: + path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} + key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} + - name: Download wxWidgets + if: steps.wxwidgets-cache.outputs.cache-hit != 'true' + working-directory: ${{ runner.temp }} + run: | + wget https://github.com/wxWidgets/wxWidgets/releases/download/v${{ env.WX_WIDGETS_VERSION }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2 + tar -xjf wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2 + - name: Build wxwidgets + if: steps.wxwidgets-cache.outputs.cache-hit != 'true' + working-directory: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} + run: | + mkdir build-static + cd build-static + ../configure --disable-shared --enable-unicode --with-macosx-version-min=10.14 + make -j2 + + build_wxwidgets_windows: + name: Build wxWidgets for Windows + runs-on: windows-latest + timeout-minutes: 60 + steps: + - name: Cache wxWidgets + uses: actions/cache@v2 + id: wxwidgets-cache + with: + path: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }} + key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} + - name: Install Dependencies + if: steps.wxwidgets-cache.outputs.cache-hit != 'true' + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW32 + install: > + make + mingw-w64-i686-gcc + unzip + - name: Download wxWidgets + if: steps.wxwidgets-cache.outputs.cache-hit != 'true' + working-directory: ${{ runner.temp }} + shell: msys2 {0} + run: | + mkdir wxWidgets-${{ env.WX_WIDGETS_VERSION }} + cd wxWidgets-${{ env.WX_WIDGETS_VERSION }} + wget -q https://github.com/wxWidgets/wxWidgets/releases/download/v${{ env.WX_WIDGETS_VERSION }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}.zip + unzip -q wxWidgets-${{ env.WX_WIDGETS_VERSION }}.zip + rm wxWidgets-${{ env.WX_WIDGETS_VERSION }}.zip + - name: Build wxWidgets + if: steps.wxwidgets-cache.outputs.cache-hit != 'true' + working-directory: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }}\build\msw + shell: bash + # NOTE: using -j2 appears to cause problems on the MinGW builds + run: | + mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release clean + mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release + + # ############################################################################ + # The build_ jobs handle building Logo for each platform. + # + # Linux is run first as it produces the PDF for the other platform builds + # to use. + # ############################################################################ + + build_linux: + name: Build Logo for Linux + needs: build_wxwidgets_linux + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Install Dependencies + run: > + sudo apt-get install + autoconf-archive + libwxgtk3.0-dev + texlive + zip + - name: wxWidgets Cache + uses: actions/cache@v2 + id: wxwidgets-cache + with: + path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} + key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Build Logo + env: + WX_CONFIG_PATH: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}/build-static/wx-config + run: | + autoreconf --install + ./configure --enable-gitid --with-wx-config=$WX_CONFIG_PATH + make -j2 dist + make -j2 dist-zip + - name: Archive ucblogo.tar.gz + uses: actions/upload-artifact@v2 + with: + name: ucblogo.tar.gz + path: > + *.tar.gz + - name: Archive ucblogo.zip + uses: actions/upload-artifact@v2 + with: + name: ucblogo.zip + path: > + *.zip + - name: Archive ucblogo.pdf + uses: actions/upload-artifact@v2 + with: + name: ucblogo.pdf + path: docs/ucblogo.pdf + + build_osx: + name: Build Logo for OSX + needs: [ build_wxwidgets_osx, build_linux ] + runs-on: macos-latest + timeout-minutes: 15 + steps: + - name: Install Dependencies + run: > + brew install + autoconf-archive + automake + wxwidgets + - name: wxWidgets Cache + uses: actions/cache@v2 + id: wxwidgets-cache + with: + path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} + key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Download PDF manual + uses: actions/download-artifact@v2 + with: + name: ucblogo.pdf + path: docs + - name: Build Logo + env: + WX_CONFIG_PATH: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}/build-static/wx-config + run: | + autoreconf --install + ./configure --enable-gitid --with-wx-config=$WX_CONFIG_PATH + make -j2 ucblogo.dmg + - name: Archive ucblogo.dmg + uses: actions/upload-artifact@v2 + with: + name: ucblogo.dmg + path: ucblogo.dmg + + download_inno_windows: + name: Download Inno for Windows + runs-on: windows-latest + timeout-minutes: 5 + steps: + - name: Cache inno + uses: actions/cache@v2 + id: inno-cache + with: + path: ${{ runner.temp }}\innosetup-${{ env.INNO_VERSION }} + key: ${{ runner.os }}-innosetup-${{ env.INNO_VERSION }} + - name: Install Dependencies + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW32 + - name: Download inno + if: steps.inno-cache.outputs.cache-hit != 'true' + working-directory: ${{ runner.temp }} + shell: msys2 {0} + run: | + mkdir innosetup-${{ env.INNO_VERSION }} + cd innosetup-${{ env.INNO_VERSION }} + wget -q https://files.jrsoftware.org/is/6/innosetup-${{ env.INNO_VERSION }}.exe + + build_windows: + name: Build Logo for Windows + needs: [ download_inno_windows, build_wxwidgets_windows, build_linux ] + runs-on: windows-latest + timeout-minutes: 15 + steps: + - name: Install Dependencies + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW32 + install: > + make + mingw-w64-i686-gcc + - name: Inno Cache + uses: actions/cache@v2 + id: inno-cache + with: + path: ${{ runner.temp }}\innosetup-${{ env.INNO_VERSION }} + key: ${{ runner.os }}-innosetup-${{ env.INNO_VERSION }} + - name: Install Inno + working-directory: ${{ runner.temp }}\innosetup-${{ env.INNO_VERSION }} + shell: pwsh + run: | + ./innosetup-${{ env.INNO_VERSION }}.exe /SP- /VERYSILENT /ALLUSERS /SUPPRESSMSGBOXES + - name: wxWidgets Cache + uses: actions/cache@v2 + id: wxwidgets-cache + with: + path: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }} + key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Prepare Repository + shell: bash + run: | + git clean -x -d -f . + mingw32-make -f makefile.msys git.c + rm libloc.c + - name: Download PDF manual + uses: actions/download-artifact@v2 + with: + name: ucblogo.pdf + path: docs + - name: Build Logo + shell: bash + env: + MINGW_BIN_DIR: D:\a\_temp\msys\msys64\mingw32\bin + WX_DIR: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }} + run: | + mingw32-make -f makefile.msys MINGW_BIN_DIR=$MINGW_BIN_DIR WX_DIR=$WX_DIR install_win + - name: Run Inno + working-directory: ${{ github.workspace }}\inno + shell: bash + run: | + iscc ucblogo.iss + - name: Archive installer + uses: actions/upload-artifact@v2 + with: + name: ucblogosetup.exe + path: inno/ucblogo62setup.exe diff --git a/config.h.msys b/config.h.msys index 0fa958cb..5622863c 100644 --- a/config.h.msys +++ b/config.h.msys @@ -1 +1,2 @@ #define RETSIGTYPE void +#define VERSION "6.2pre" diff --git a/inno/ucblogo.iss b/inno/ucblogo.iss index 0f1e5cee..c941ddc5 100644 --- a/inno/ucblogo.iss +++ b/inno/ucblogo.iss @@ -9,7 +9,7 @@ AppPublisher=University of California, Berkeley AppPublisherURL=http://www.cs.berkeley.edu/~bh/logo.html AppSupportURL=https://github.com/jrincayc/ucblogo-code/issues AppUpdatesURL=https://github.com/jrincayc/ucblogo-code/releases -OutputBaseFilename=ucblogo61setup +OutputBaseFilename=ucblogo62setup OutputDir=. DefaultDirName={autopf}\UCBLogo DefaultGroupName=Berkeley Logo @@ -41,7 +41,7 @@ Source: "C:\UCBLOGO\lib\logo\HELPFILES\*.*"; DestDir: "{app}\HELPFILE"; CopyMode Source: "C:\UCBLOGO\lib\logo\LOGOLIB\*.*"; DestDir: "{app}\LOGOLIB"; CopyMode: alwaysoverwrite; Components: program Source: "C:\UCBLOGO\lib\logo\LICENSE"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Components: program Source: "C:\UCBLOGO\lib\logo\README.txt"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Components: program -Source: "C:\UCBLOGO\lib\logo\usermanual.pdf"; DestDir: "{app}\DOCS"; CopyMode: alwaysoverwrite; Components: pdf +Source: "C:\UCBLOGO\lib\logo\ucblogo.pdf"; DestDir: "{app}\DOCS"; CopyMode: alwaysoverwrite; Components: pdf Source: "C:\UCBLOGO\lib\logo\SOURCE\*.*"; DestDir: "{app}\SOURCE"; CopyMode: alwaysoverwrite; Components: source [Icons] diff --git a/makefile.msys b/makefile.msys index 467e449e..5a08b31e 100644 --- a/makefile.msys +++ b/makefile.msys @@ -1,10 +1,12 @@ CC = gcc -CFLAGS = -g -O -DHAVE_WX -DX_DISPLAY_MISSING -O0 +CFLAGS = -g -O -DHAVE_CONFIG_H -DHAVE_WX -DX_DISPLAY_MISSING -O0 CXX = g++ -CXXFLAGS = -DHAVE_WX -I$(HOME)/wxWidgets-3.0.4/include -I$(HOME)/wxWidgets-3.0.4/lib/gcc_lib/mswu -D__WXDEBUG__ -D__WXMSW__ -mthreads -LDFLAGS = -mwindows -WX_LIB_LOC = $(HOME)/wxWidgets-3.0.4/lib/gcc_lib/ -LIBS = -lm -L/usr/local/lib -mwindows -mthreads -mwindows -Wl,--subsystem,windows -mwindows -L$(WX_LIB_LOC) -lwxmsw30u_richtext -lwxmsw30u_aui -lwxmsw30u_html -lwxmsw30u_adv -lwxmsw30u_core -lwxbase30u_net -lwxbase30u -lwxregexu -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 +MINGW_BIN_DIR = /mingw/bin +WX_DIR = $(HOME)/wxWidgets-3.0.4 +CXXFLAGS = -DHAVE_CONFIG_H -DHAVE_WX -I$(WX_DIR)/include -I$(WX_DIR)/lib/gcc_lib/mswu -D__WXDEBUG__ -D__WXMSW__ -mthreads +LDFLAGS = -mwindows -static +WX_LIB_LOC = $(WX_DIR)/lib/gcc_lib/ +LIBS = -lm -L/usr/local/lib -mwindows -mthreads -mwindows -Wl,--subsystem,windows -mwindows -L$(WX_LIB_LOC) -lwxmsw30u_richtext -lwxmsw30u_aui -lwxmsw30u_html -lwxmsw30u_adv -lwxmsw30u_core -lwxbase30u_net -lwxbase30u -lwxregexu -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -ladvapi32 -lwsock32 -lgdi32 prefix = /c/ucblogo BINDIR = $(prefix)/bin LIBLOC = $(prefix)/lib/logo @@ -48,10 +50,10 @@ libloc.c: echo 'char *temploc="/tmp";' >> libloc.c echo 'char *separator="/";' >> libloc.c -logolib/Messages: makelib Messages - chmod +x makelib - ./makelib - cp -f Messages logolib +#logolib/Messages: makelib Messages +# chmod +x makelib +# ./makelib +# cp -f Messages logolib helpfiles: mkdir helpfiles @@ -76,14 +78,14 @@ ship: install_win: all for d in $(BINDIR) $(LIBLOC) $(LIBLOC)/logolib $(LIBLOC)/helpfiles $(LIBLOC)/csls $(LIBLOC)/source; do [ -d $$d ] || mkdir -p $$d || exit 1; done cp logo.exe $(BINDIR)/ucblogo.exe - cp /mingw/bin/libgcc_s_dw2-1.dll /mingw/bin/libstdc++-6.dll $(BINDIR)/ + cp $(MINGW_BIN_DIR)/libgcc_s_dw2-1.dll $(MINGW_BIN_DIR)/libstdc++-6.dll $(BINDIR)/ cp -f logolib/* $(LIBLOC)/logolib/. cp -f helpfiles/* $(LIBLOC)/helpfiles/. cp -f csls/* $(LIBLOC)/csls/. cp -f LICENSE $(LIBLOC)/ cp -f README.md $(LIBLOC)/README.txt - cp -f *.[ch]* makefile.msys ucblogo.xpm logo_win.rc logologo.ico makelib Messages docs/usermanual.texi $(LIBLOC)/source/ - cp -f docs/usermanual.pdf $(LIBLOC)/ + cp -f *.[ch]* makefile.msys ucblogo.xpm logo_win.rc logologo.ico docs/ucblogo.texi $(LIBLOC)/source/ + cp -f docs/ucblogo.pdf $(LIBLOC)/ #(cd docs; prefix=$(prefix) LIBLOC=$(LIBLOC) BINDIR=$(BINDIR) $(MAKE) install) # prefix=$(prefix); LIBLOC=$(LIBLOC); BINDIR=$(BINDIR); export prefix LIBLOC BINDIR; cd emacs; $(MAKE) install From aace945f86ca73ba7ee90e061d55f1cc3dcdca0b Mon Sep 17 00:00:00 2001 From: Dan Malec Date: Mon, 21 Dec 2020 18:44:04 -0500 Subject: [PATCH 3/6] CD workflow - code review feedback. * Linux - use package manager wxWidgets instead of building a static version * Windows - fixed git id build by changing repo clone depth * Windows - removed -static flag and added libwinpthread-1.dll to distro --- .github/workflows/cd.yaml | 77 ++++++++++++++------------------------- makefile.msys | 9 +---- 2 files changed, 29 insertions(+), 57 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 44bc6b6c..11c9286c 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -20,37 +20,6 @@ jobs: # over 30 minutes to build. # ############################################################################ - build_wxwidgets_linux: - name: Build wxWidgets for Linux - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - name: Cache wxWidgets - uses: actions/cache@v2 - id: wxwidgets-cache - with: - path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} - key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} - - name: Install Dependencies - if: steps.wxwidgets-cache.outputs.cache-hit != 'true' - run: > - sudo apt-get install - libgtk-3-dev - - name: Download wxWidgets - if: steps.wxwidgets-cache.outputs.cache-hit != 'true' - working-directory: ${{ runner.temp }} - run: | - wget https://github.com/wxWidgets/wxWidgets/releases/download/v${{ env.WX_WIDGETS_VERSION }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2 - tar -xjf wxWidgets-${{ env.WX_WIDGETS_VERSION }}.tar.bz2 - - name: Build wxwidgets - if: steps.wxwidgets-cache.outputs.cache-hit != 'true' - working-directory: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} - run: | - mkdir build-static - cd build-static - ../configure --disable-shared --enable-unicode - make -j2 - build_wxwidgets_osx: name: Build wxWidgets for OSX runs-on: macos-latest @@ -94,8 +63,9 @@ jobs: with: msystem: MINGW32 install: > - make - mingw-w64-i686-gcc + git + base-devel + mingw-w64-i686-toolchain unzip - name: Download wxWidgets if: steps.wxwidgets-cache.outputs.cache-hit != 'true' @@ -110,7 +80,12 @@ jobs: - name: Build wxWidgets if: steps.wxwidgets-cache.outputs.cache-hit != 'true' working-directory: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }}\build\msw - shell: bash + shell: msys2 {0} + env: + # NOTE: wxWidgets 3.1.x has a fix for the narrowing issue; but, this + # approach should work for now given with wxWidgets 3.0.x + CFLAGS: -Wno-narrowing + CXXFLAGS: -Wno-narrowing # NOTE: using -j2 appears to cause problems on the MinGW builds run: | mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release clean @@ -125,7 +100,6 @@ jobs: build_linux: name: Build Logo for Linux - needs: build_wxwidgets_linux runs-on: ubuntu-latest timeout-minutes: 15 steps: @@ -136,20 +110,14 @@ jobs: libwxgtk3.0-dev texlive zip - - name: wxWidgets Cache - uses: actions/cache@v2 - id: wxwidgets-cache - with: - path: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }} - key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} - name: Checkout Repository uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Build Logo - env: - WX_CONFIG_PATH: ${{ runner.temp }}/wxWidgets-${{ env.WX_WIDGETS_VERSION }}/build-static/wx-config run: | autoreconf --install - ./configure --enable-gitid --with-wx-config=$WX_CONFIG_PATH + ./configure --enable-gitid make -j2 dist make -j2 dist-zip - name: Archive ucblogo.tar.gz @@ -190,6 +158,8 @@ jobs: key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} - name: Checkout Repository uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Download PDF manual uses: actions/download-artifact@v2 with: @@ -243,8 +213,10 @@ jobs: with: msystem: MINGW32 install: > - make - mingw-w64-i686-gcc + git + base-devel + mingw-w64-i686-toolchain + unzip - name: Inno Cache uses: actions/cache@v2 id: inno-cache @@ -264,8 +236,10 @@ jobs: key: ${{ runner.os }}-wxWidgets-${{ env.WX_WIDGETS_VERSION }} - name: Checkout Repository uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Prepare Repository - shell: bash + shell: msys2 {0} run: | git clean -x -d -f . mingw32-make -f makefile.msys git.c @@ -275,16 +249,19 @@ jobs: with: name: ucblogo.pdf path: docs + - name: Find MinGW bin directory + shell: msys2 {0} + run: | + echo "MINGW_BIN_DIR=`dirname $(command -v gcc)`" >> $GITHUB_ENV - name: Build Logo - shell: bash + shell: msys2 {0} env: - MINGW_BIN_DIR: D:\a\_temp\msys\msys64\mingw32\bin WX_DIR: ${{ runner.temp }}\wxWidgets-${{ env.WX_WIDGETS_VERSION }} run: | mingw32-make -f makefile.msys MINGW_BIN_DIR=$MINGW_BIN_DIR WX_DIR=$WX_DIR install_win - name: Run Inno working-directory: ${{ github.workspace }}\inno - shell: bash + shell: pwsh run: | iscc ucblogo.iss - name: Archive installer diff --git a/makefile.msys b/makefile.msys index 5a08b31e..e04915a9 100644 --- a/makefile.msys +++ b/makefile.msys @@ -4,7 +4,7 @@ CXX = g++ MINGW_BIN_DIR = /mingw/bin WX_DIR = $(HOME)/wxWidgets-3.0.4 CXXFLAGS = -DHAVE_CONFIG_H -DHAVE_WX -I$(WX_DIR)/include -I$(WX_DIR)/lib/gcc_lib/mswu -D__WXDEBUG__ -D__WXMSW__ -mthreads -LDFLAGS = -mwindows -static +LDFLAGS = -mwindows WX_LIB_LOC = $(WX_DIR)/lib/gcc_lib/ LIBS = -lm -L/usr/local/lib -mwindows -mthreads -mwindows -Wl,--subsystem,windows -mwindows -L$(WX_LIB_LOC) -lwxmsw30u_richtext -lwxmsw30u_aui -lwxmsw30u_html -lwxmsw30u_adv -lwxmsw30u_core -lwxbase30u_net -lwxbase30u -lwxregexu -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -ladvapi32 -lwsock32 -lgdi32 prefix = /c/ucblogo @@ -50,11 +50,6 @@ libloc.c: echo 'char *temploc="/tmp";' >> libloc.c echo 'char *separator="/";' >> libloc.c -#logolib/Messages: makelib Messages -# chmod +x makelib -# ./makelib -# cp -f Messages logolib - helpfiles: mkdir helpfiles @@ -78,7 +73,7 @@ ship: install_win: all for d in $(BINDIR) $(LIBLOC) $(LIBLOC)/logolib $(LIBLOC)/helpfiles $(LIBLOC)/csls $(LIBLOC)/source; do [ -d $$d ] || mkdir -p $$d || exit 1; done cp logo.exe $(BINDIR)/ucblogo.exe - cp $(MINGW_BIN_DIR)/libgcc_s_dw2-1.dll $(MINGW_BIN_DIR)/libstdc++-6.dll $(BINDIR)/ + cp $(MINGW_BIN_DIR)/libgcc_s_dw2-1.dll $(MINGW_BIN_DIR)/libstdc++-6.dll $(MINGW_BIN_DIR)/libwinpthread-1.dll $(BINDIR)/ cp -f logolib/* $(LIBLOC)/logolib/. cp -f helpfiles/* $(LIBLOC)/helpfiles/. cp -f csls/* $(LIBLOC)/csls/. From 2d09c86d30188c24158b4142f77b8699ab2b8b13 Mon Sep 17 00:00:00 2001 From: "Joshua J. Cogliati" Date: Mon, 28 Dec 2020 11:51:55 -0700 Subject: [PATCH 4/6] Updating README to mention releases and wxWidgets and 6.2 changes. --- README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 73a31ac8..3b624e58 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,9 @@ created for further UCBLogo development. The current version is 6.2 Changes for this release: -* The license has been changed to GPL3. -* The wxWidgets version updated to compile and run with version 3.0. -* Adjustments made to compile and run on newer OSX versions. -* Variety fixes like fixing implicit function definitions, fixing a line cursor behaviour, etc. +* Added optional object oriented LOGO features ( --enable-objects ) +* autoconf based build system +* Variety of bug fixes Here is an overview of the repository: * csls - Programs form [Brian Harvey's trilogy "Computer Science Logo Style"](https://people.eecs.berkeley.edu/~bh/). @@ -50,13 +49,19 @@ respective web sites. ## Usage -To build Logo under *nix, do this: +To build Logo under *nix, install wxWidgets and other dependencies +and then do this: ``` autoreconf --install ./configure make ``` +Note that if you don't have autoconf, the release .tar.gz have already built +configure files. + +[UCBLogo Releases](https://github.com/jrincayc/ucblogo-code/releases) + ## Previous versions For getting UCBLogo previous versions such as version 6.0 if you're running wxWidgets or 5.4 if not, please visit [Brian Harvey's UCBLogo GitHub repository](https://github.com/brianharvey/UCBLogo). From 83745353d7eee8adb51f3b171c6732b1960a8fb7 Mon Sep 17 00:00:00 2001 From: Joshua Cogliati Date: Mon, 28 Dec 2020 11:53:34 -0700 Subject: [PATCH 5/6] If WX_CONFIG_CHECK missing, disable WX. (#84) --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 307ca9e8..ed3278c8 100644 --- a/configure.ac +++ b/configure.ac @@ -34,6 +34,7 @@ AS_IF([test x${enable_gitid} = xyes], [AC_DEFINE([GITID],[1],[enable gitid in version])]) AM_CONDITIONAL([GITID], [test x${enable_gitid} = xyes]) +m4_ifdef([WX_CONFIG_CHECK], [ WX_CONFIG_OPTIONS WX_CONFIG_CHECK([3.0.0], [wxWin=1]) @@ -48,6 +49,11 @@ AM_COND_IF([WX], CXXFLAGS="$WX_CXXFLAGS_ONLY $CXXFLAGS" CFLAGS="$WX_CFLAGS_ONLY $CFLAGS" LIBS="$WX_LIBS $LIBS"]) + ], [ + AC_MSG_NOTICE([No WX_CONFIG_CHECK available]) + AM_CONDITIONAL([WX], [test 1 = 0]) +]) + AC_MSG_CHECKING([enable_x11]) AC_ARG_ENABLE([x11], From 873caa5031e1a2dd3210e59a0ace114e6cdffd32 Mon Sep 17 00:00:00 2001 From: "Joshua J. Cogliati" Date: Wed, 30 Dec 2020 08:19:29 -0700 Subject: [PATCH 6/6] Removing "pre" from version. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ed3278c8..933fcc04 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([ucblogo],[6.2pre],[],[],[https://github.com/jrincayc/ucblogo-code]) +AC_INIT([ucblogo],[6.2],[],[],[https://github.com/jrincayc/ucblogo-code]) AC_CONFIG_SRCDIR([logodata.c]) AC_CONFIG_HEADER(config.h)