This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continue working on windows build script
- Loading branch information
1 parent
753dd16
commit e768fb9
Showing
18 changed files
with
251 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,43 @@ | ||
This directory contains scripts which automatically build GAP on Cygwin. | ||
|
||
Scripts: | ||
Producing an installer requires Inno Setup 6 ( https://jrsoftware.org/isdl.php#stable ) is installed in it's standard location. | ||
|
||
cygwin_install.bat: Install a local cygwin to build GAP | ||
get_gap_head.bat: Build the head of GAP into the cygwin installed by cygwin_install.bat | ||
|
||
Short version: Run 'build_gap_release.bat', and eventually an installer will appear in a directory called 'Output'. | ||
|
||
|
||
Description of scripts | ||
---------------------- | ||
|
||
This script runs a series of smaller scripts: | ||
|
||
cygwin_install.bat: Install two copies of cygwin | ||
- cygwin_build_gap : For building GAP (includes compilers and dev versions of packages) | ||
- cygwin_release_gap : A smaller Cygwin which only includes files needed for running GAP. | ||
|
||
|
||
run_script_in_cygwin.bat : Take a shell script as an argument and runs it inside cygwin_build_gap. The scripts available are: | ||
|
||
- get_gap_head.sh : Get GAP master branch | ||
- get_gap_head_minima.sh : Get GAP master branch with minimal packages (smallest) | ||
- get_gap_release.sh : Get GAP release (current hard-wired to 4.11) | ||
- build_gap_and_packages.sh : Build whatever GAP we previously grabbed. | ||
|
||
step_move_gap_to_release.bat : Move GAP from the cygwin_build_gap to cygwin_release_gap, doing some cleanup and adding extra files (these extra files are described below) | ||
|
||
|
||
Cygwin changes / customisations | ||
------------------------------- | ||
|
||
Some files inside the Cygwin install are changed/customised. These are described below: | ||
|
||
|
||
gap.bat - Run GAP in the standard windows terminal. This is not put on the start menu, and is provided for non-interactive use. | ||
|
||
gap-mintty.bat - Run GAP in the 'mintty' terminal. This tries to provide the best user experience, including keeping the window open if GAP exits with an error. | ||
|
||
run-gap.sh - Run by gap.bat | ||
run-mintty-gap.sh - Run by gap-mintty.bat | ||
|
||
etc/nsswitch.conf - Sets the 'home' directory to the User's Windows home directory. | ||
etc/fstab - Set the /tmp directory to the User's Windows temp directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
SETLOCAL | ||
|
||
REM -- Change to the directory of the executing batch file | ||
CD %~dp0 | ||
|
||
IF EXIST "c:\Program Files (x86)\Inno Setup 6\Compil32.exe" ( | ||
ECHO Inno Setup 6 Found | ||
) ELSE ( | ||
ECHO "c:\Program Files (x86)\Inno Setup 6\Compil32.exe" not Found | ||
EXIT /B 0 | ||
) | ||
|
||
call cygwin_install.bat | ||
call run_script_in_cygwin.bat shell_scripts\get_gap_release.sh | ||
call run_script_in_cygwin.bat shell_scripts\apply_gap_patches_for_cygwin.sh | ||
call run_script_in_cygwin.bat shell_scripts\build_gap_and_packages.sh | ||
call move_gap_to_release.bat | ||
call build_installer.bat | ||
|
||
ENDLOCAL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
SETLOCAL | ||
|
||
REM -- Change to the directory of the executing batch file | ||
CD %~dp0 | ||
|
||
"c:\Program Files (x86)\Inno Setup 6\Compil32.exe" /cc gap.iss | ||
|
||
ENDLOCAL | ||
|
||
EXIT /B 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# /etc/fstab | ||
# | ||
# This file is read once by the first process in a Cygwin process tree. | ||
# To pick up changes, restart all Cygwin processes. For a description | ||
# see https://cygwin.com/cygwin-ug-net/using.html#mount-table | ||
|
||
# This is default anyway: | ||
none /cygdrive cygdrive binary,posix=0,user 0 0 | ||
|
||
# GAP customisation: Point cygwin's temp directory to Windows's temp directory | ||
none /tmp usertemp binary,posix=0 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# /etc/nsswitch.conf | ||
db_home: /%H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@echo off | ||
setlocal enableextensions | ||
set TERM= | ||
cd /d "%~dp0bin" && mintty.exe -s 120,40 .\bash --login /run-gap-mintty.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@echo off | ||
setlocal enableextensions | ||
set TERM= | ||
cd /d "%~dp0bin" && .\bash --login /run-gap.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd ~ | ||
|
||
/opt/gap/gap | ||
|
||
|
||
if [ $? -ne 0 ]; then | ||
read -p "GAP exited with an error. Press Enter to close window" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd ~ | ||
|
||
/opt/gap/gap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
; Script generated by the Inno Setup Script Wizard. | ||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ||
|
||
#define MyAppName "GAP" | ||
#define MyAppVersion "4.11" | ||
#define MyAppPublisher "Gap Group" | ||
#define MyAppURL "https://www.gap-system.org" | ||
#define MyAppExeName "Gap-mintty.bat" | ||
|
||
[Setup] | ||
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. | ||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) | ||
AppId={{AF1BC6F6-32FA-4E72-8F41-8862190D2F8F} | ||
AppName={#MyAppName} | ||
AppVersion={#MyAppVersion} | ||
;AppVerName={#MyAppName} {#MyAppVersion} | ||
AppPublisher={#MyAppPublisher} | ||
AppPublisherURL={#MyAppURL} | ||
AppSupportURL={#MyAppURL} | ||
AppUpdatesURL={#MyAppURL} | ||
DefaultDirName={autopf}\{#MyAppName} | ||
DisableProgramGroupPage=yes | ||
; Uncomment the following line to run in non administrative install mode (install for current user only.) | ||
;PrivilegesRequired=lowest | ||
PrivilegesRequiredOverridesAllowed=dialog | ||
OutputBaseFilename=gap-setup | ||
Compression=lzma | ||
LZMANumBlockThreads=6 | ||
SolidCompression=yes | ||
WizardStyle=modern | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl" | ||
|
||
[Tasks] | ||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked | ||
|
||
[Files] | ||
Source: "cygwin_release_gap\Gap.bat"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "cygwin_release_gap\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs | ||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files | ||
|
||
[Icons] | ||
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" | ||
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon | ||
|
||
|
||
[Run] | ||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
SETLOCAL | ||
|
||
REM -- Change to the directory of the executing batch file | ||
CD %~dp0 | ||
|
||
|
||
rmdir /S /Q cygwin_release_gap\opt\gap | ||
xcopy /E /Y /Q /C cygwin_build_gap\opt\gap cygwin_release_gap\opt\gap\ | ||
|
||
REM -- copy custom cygwin files | ||
xcopy /E /Y /Q /C extra_cygwin_files\* cygwin_release_gap | ||
|
||
REM -- copy cygstart to start, as various GAP packages use 'start' | ||
REM -- to start external programs (as this is the command used to start commands | ||
REM -- in the windows shell). | ||
copy /Y cygwin_release_gap\bin\cygstart.exe cygwin_release_gap\bin\start.exe | ||
|
||
REM - Clean up git repository (if present) | ||
rmdir /S /Q cygwin_release_gap\opt\gap\.git | ||
|
||
REM - Clean up package archive (if downloaded) | ||
del /Q cygwin_release_gap\opt\gap\*.tar.gz | ||
|
||
REM - Clean up any build script left lying around | ||
del /S /Q cygwin_release_gap\script.sh | ||
|
||
ENDLOCAL |
9 changes: 6 additions & 3 deletions
9
NewWindows/get_gap_head.bat → NewWindows/run_script_in_cygwin.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
cd /opt/gap | ||
|
||
# This applies some small fixes to GAP | ||
|
||
# Remove ExternalFilename from Packages | ||
(cd pkg && find anupq-* grape-* -type f -print0 | xargs -0 sed -i '' -e 's/ExternalFilename/Filename/') | ||
|
||
# Fix semigroups | ||
(cd pkg && find semigroups-* -type f -print0 | xargs -0 sed -i '' -e 's/cygsemigroups-0.dll/cygsemigroups-1.dll/' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -eux | ||
|
||
cd /opt/gap | ||
|
||
./configure | ||
make -j4 | ||
(cd pkg && ../bin/BuildPackages.sh) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
#!/usr/bin/env bash | ||
set -eux | ||
mkdir --parents /opt/gap | ||
cd /opt/gap | ||
if [ -d gap-master ]; then | ||
(cd gap-master; git pull) | ||
mkdir --parents /opt/ | ||
cd /opt/ | ||
if [ -d gap ]; then | ||
(cd gap; git pull) | ||
else | ||
git clone https://www.github.com/gap-system/gap gap-master --depth=1 | ||
git clone https://www.github.com/gap-system/gap gap --depth=1 | ||
fi; | ||
cd gap-master | ||
cd gap | ||
./autogen.sh | ||
# Have to run configure so bootstrap-pkg-full works | ||
./configure | ||
make -j4 | ||
# Clean out old package directory, if it exists | ||
rm -rf pkg | ||
make bootstrap-pkg-full | ||
cd pkg | ||
../bin/BuildPackages.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
set -eux | ||
mkdir --parents /opt/ | ||
cd /opt/ | ||
if [ -d gap ]; then | ||
(cd gap; git pull) | ||
else | ||
git clone https://www.github.com/gap-system/gap gap --depth=1 | ||
fi; | ||
cd gap | ||
./autogen.sh | ||
# Have to run configure so bootstrap-pkg-full works | ||
./configure | ||
# Clean out old package directory, if it exists | ||
rm -rf pkg | ||
make bootstrap-pkg-minimal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
set -eux | ||
mkdir --parents /opt/ | ||
cd /opt | ||
wget https://www.gap-system.org/pub/gap/gap-4.11/tar.gz/gap-4.11.0.tar.gz | ||
tar -xf gap-4.11.0.tar.gz | ||
rm gap-4.11.0.tar.gz | ||
# Have standard directory name | ||
mv gap-* gap |