Skip to content

Commit

Permalink
Merge pull request #78 from Miepee/rename-optimized-scripst
Browse files Browse the repository at this point in the history
Rename make.sh to make-linux-build.sh
  • Loading branch information
Alcaro authored May 30, 2024
2 parents e26220e + 0c98fe0 commit 0b81193
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-optimized.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Dependencies
run: dnf install -y gtk3-devel zip
- name: Build
run: ./make.sh
run: ./make-linux-build.sh
- name: Zip to Archive
run: zip -9 ./linux-x64.zip ./flips
- name: Upload Artifacts
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#This script creates a debug-optimized binary by default. If you're on Linux, you'll get a faster binary from make.sh.
#This script creates a debug-optimized binary by default. If you're on Linux, you'll get a faster binary from make-linux-build.sh.

SRCDIR := $(abspath $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))

Expand Down Expand Up @@ -91,7 +91,7 @@ endif
$(FNAME_$(TARGET)): $(SOURCES) $(XFILES)
$(CXX) $^ -std=c++98 $(CFLAGS_G) $(MOREFLAGS) $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS) $(LFLAGS) -o$@
ifeq ($(CFLAGS),-g)
echo 'Compiled Floating IPS in debug mode; for better performance, use ./make.sh instead'
echo 'Compiled Floating IPS in debug mode; for better performance, use ./make-linux-build.sh instead'
endif

ifeq ($(TARGET),gtk)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ Third-party forks, or separate tools, covering usecases this version doesn't (th

Compilation - Linux:
- `sudo apt-get install g++ build-essential`; for GUI support, also `sudo apt-get install libgtk-3-dev pkg-config`; adjust for your distro if necessary
- `./make.sh` to build an optimized binary; for development, use `make CFLAGS=-g` (ignore make-maintainer.sh)
- `./make-linux-build.sh` to build an optimized binary; for development, use `make CFLAGS=-g` (ignore make-maintainer.sh)
- Alternatively, if you prefer binaries, `flatpak install com.github.Alcaro.Flips`

Compilation - OSX, other Unix, or anything else with a C++ compiler:
- Install a C++ compiler
- `clang++ *.c *.cpp -O3 -o flips` (with changes as appropriate)
- For GTK GUI support, use some suitable variant of `clang++ *.c *.cpp -O3 -o flips -DFLIPS_GTK -lgtk3`
- For better optimizations (profiling/etc), extract the appropriate commands from Makefile and make.sh
- For better optimizations (profiling/etc), extract the appropriate commands from Makefile and make-linux-build.sh

Compilation - Windows:
- Install [mingw-w64](https://winlibs.com/), or similar
- `mingw32-make CFLAGS=-O3` (GUI is automatically enabled), or extract the appropriate optimization commands from make.sh
- `mingw32-make CFLAGS=-O3` (GUI is automatically enabled), or extract the appropriate optimization commands from make-linux-build.sh
- Alternatively, [here's a binary](https://www.smwcentral.net/?p=section&a=details&id=11474) (though it's quite outdated).

Usage:
Expand Down
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# (to find which dependencies are missing), it's the best place to put compilation instructions.
cat <<EOF
To compile Floating IPS in release mode (recommended for most users; will take a
few minutes, but result will be fast), use \`./make.sh'.
few minutes, but result will be fast), use \`./make-linux-build.sh'.
To compile Floating IPS in almost-release mode (2% slower at runtime, but only
takes a few seconds to compile), use \`./make.sh --profile=no'.
takes a few seconds to compile), use \`./make-linux-build.sh --profile=no'.
To compile Floating IPS in debug mode (NOT recommended unless you're tracking a
bug, it's VERY slow for big files), use \`make'.
EOF
File renamed without changes.
6 changes: 3 additions & 3 deletions make-maintainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
echo "This script is for making official releases, including a Windows build."
echo "If that's what you want, sure, go ahead (though you may need to read or"
echo " edit this script to satisfy its dependencies);"
echo "if you just want a Linux binary, use make.sh instead."
echo "if you just want a Linux binary, use make-linux-build.sh instead."

rm floating.zip
rm -r obj/* || true

# . rather than ./make.sh, so $FLAGS remains set
. ./make.sh
# . rather than ./make-linux-build.sh, so $FLAGS remains set
. ./make-linux-build.sh
mv flips flips-linux
7z a floating.zip flips-linux
mv ./flips-linux ~/bin/flips
Expand Down

0 comments on commit 0b81193

Please sign in to comment.