diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/build-all.bat b/applications/Photoframe/build-all.bat deleted file mode 100755 index 7f67edb..0000000 --- a/applications/Photoframe/build-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-all.sh diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/build-all.bat b/applications/Photoframe/build-all.bat deleted file mode 100755 index 7f67edb..0000000 --- a/applications/Photoframe/build-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-all.sh diff --git a/applications/Photoframe/build-all.sh b/applications/Photoframe/build-all.sh index 3fbaccd..ba190f4 100755 --- a/applications/Photoframe/build-all.sh +++ b/applications/Photoframe/build-all.sh @@ -5,11 +5,13 @@ # InvertedLogic 2009-2021 # -. build-libexif.sh +sh build-libexif.sh qmake make -. refresh_translations.sh +echo sh refresh-translations.sh +sh refresh-translations.sh +echo cp config/dpf.ini ./ cp config/dpf.ini ./ diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/build-all.bat b/applications/Photoframe/build-all.bat deleted file mode 100755 index 7f67edb..0000000 --- a/applications/Photoframe/build-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-all.sh diff --git a/applications/Photoframe/build-all.sh b/applications/Photoframe/build-all.sh index 3fbaccd..ba190f4 100755 --- a/applications/Photoframe/build-all.sh +++ b/applications/Photoframe/build-all.sh @@ -5,11 +5,13 @@ # InvertedLogic 2009-2021 # -. build-libexif.sh +sh build-libexif.sh qmake make -. refresh_translations.sh +echo sh refresh-translations.sh +sh refresh-translations.sh +echo cp config/dpf.ini ./ cp config/dpf.ini ./ diff --git a/applications/Photoframe/build-libexif.bat b/applications/Photoframe/build-libexif.bat deleted file mode 100755 index 3835462..0000000 --- a/applications/Photoframe/build-libexif.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-libexif.sh diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/build-all.bat b/applications/Photoframe/build-all.bat deleted file mode 100755 index 7f67edb..0000000 --- a/applications/Photoframe/build-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-all.sh diff --git a/applications/Photoframe/build-all.sh b/applications/Photoframe/build-all.sh index 3fbaccd..ba190f4 100755 --- a/applications/Photoframe/build-all.sh +++ b/applications/Photoframe/build-all.sh @@ -5,11 +5,13 @@ # InvertedLogic 2009-2021 # -. build-libexif.sh +sh build-libexif.sh qmake make -. refresh_translations.sh +echo sh refresh-translations.sh +sh refresh-translations.sh +echo cp config/dpf.ini ./ cp config/dpf.ini ./ diff --git a/applications/Photoframe/build-libexif.bat b/applications/Photoframe/build-libexif.bat deleted file mode 100755 index 3835462..0000000 --- a/applications/Photoframe/build-libexif.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-libexif.sh diff --git a/applications/Photoframe/build-libexif.sh b/applications/Photoframe/build-libexif.sh index c832ac2..c0a322b 100755 --- a/applications/Photoframe/build-libexif.sh +++ b/applications/Photoframe/build-libexif.sh @@ -25,6 +25,7 @@ cp release/libexif*.dylib ../../bin cp release/libexif.a ../../lib cp release/exif.dll ../../release +cp release/exif.lib ../../lib cp release/liblibexif.a ../../lib cp release/libexif.dll ../../lib cp release/libexif.dll ../../release diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/build-all.bat b/applications/Photoframe/build-all.bat deleted file mode 100755 index 7f67edb..0000000 --- a/applications/Photoframe/build-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-all.sh diff --git a/applications/Photoframe/build-all.sh b/applications/Photoframe/build-all.sh index 3fbaccd..ba190f4 100755 --- a/applications/Photoframe/build-all.sh +++ b/applications/Photoframe/build-all.sh @@ -5,11 +5,13 @@ # InvertedLogic 2009-2021 # -. build-libexif.sh +sh build-libexif.sh qmake make -. refresh_translations.sh +echo sh refresh-translations.sh +sh refresh-translations.sh +echo cp config/dpf.ini ./ cp config/dpf.ini ./ diff --git a/applications/Photoframe/build-libexif.bat b/applications/Photoframe/build-libexif.bat deleted file mode 100755 index 3835462..0000000 --- a/applications/Photoframe/build-libexif.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-libexif.sh diff --git a/applications/Photoframe/build-libexif.sh b/applications/Photoframe/build-libexif.sh index c832ac2..c0a322b 100755 --- a/applications/Photoframe/build-libexif.sh +++ b/applications/Photoframe/build-libexif.sh @@ -25,6 +25,7 @@ cp release/libexif*.dylib ../../bin cp release/libexif.a ../../lib cp release/exif.dll ../../release +cp release/exif.lib ../../lib cp release/liblibexif.a ../../lib cp release/libexif.dll ../../lib cp release/libexif.dll ../../release diff --git a/applications/Photoframe/clean.bat b/applications/Photoframe/clean.bat deleted file mode 100755 index d15a7d6..0000000 --- a/applications/Photoframe/clean.bat +++ /dev/null @@ -1,18 +0,0 @@ -@echo off -rem -rem Batch script to clean Photoframe on Windows -rem By John Ryland -rem InvertedLogic 2009 -rem - -rmdir /s /q libexif\libexif-0.6.17 -rmdir /s /q include -rmdir /s /q bin -rmdir /s /q lib -rmdir /s /q release -rmdir /s /q debug -del /q lib\*.* -del /q i18n\*.qm -del /q qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - -pause diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/build-all.bat b/applications/Photoframe/build-all.bat deleted file mode 100755 index 7f67edb..0000000 --- a/applications/Photoframe/build-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-all.sh diff --git a/applications/Photoframe/build-all.sh b/applications/Photoframe/build-all.sh index 3fbaccd..ba190f4 100755 --- a/applications/Photoframe/build-all.sh +++ b/applications/Photoframe/build-all.sh @@ -5,11 +5,13 @@ # InvertedLogic 2009-2021 # -. build-libexif.sh +sh build-libexif.sh qmake make -. refresh_translations.sh +echo sh refresh-translations.sh +sh refresh-translations.sh +echo cp config/dpf.ini ./ cp config/dpf.ini ./ diff --git a/applications/Photoframe/build-libexif.bat b/applications/Photoframe/build-libexif.bat deleted file mode 100755 index 3835462..0000000 --- a/applications/Photoframe/build-libexif.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-libexif.sh diff --git a/applications/Photoframe/build-libexif.sh b/applications/Photoframe/build-libexif.sh index c832ac2..c0a322b 100755 --- a/applications/Photoframe/build-libexif.sh +++ b/applications/Photoframe/build-libexif.sh @@ -25,6 +25,7 @@ cp release/libexif*.dylib ../../bin cp release/libexif.a ../../lib cp release/exif.dll ../../release +cp release/exif.lib ../../lib cp release/liblibexif.a ../../lib cp release/libexif.dll ../../lib cp release/libexif.dll ../../release diff --git a/applications/Photoframe/clean.bat b/applications/Photoframe/clean.bat deleted file mode 100755 index d15a7d6..0000000 --- a/applications/Photoframe/clean.bat +++ /dev/null @@ -1,18 +0,0 @@ -@echo off -rem -rem Batch script to clean Photoframe on Windows -rem By John Ryland -rem InvertedLogic 2009 -rem - -rmdir /s /q libexif\libexif-0.6.17 -rmdir /s /q include -rmdir /s /q bin -rmdir /s /q lib -rmdir /s /q release -rmdir /s /q debug -del /q lib\*.* -del /q i18n\*.qm -del /q qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - -pause diff --git a/applications/Photoframe/clean.sh b/applications/Photoframe/clean.sh index be12bfa..a50bd23 100755 --- a/applications/Photoframe/clean.sh +++ b/applications/Photoframe/clean.sh @@ -1,6 +1,21 @@ #!/bin/bash +# +# Script to clean Photoframe +# By John Ryland +# InvertedLogic 2009 +# - -rm -rf libexif/libexif-0.6.17 include/libexif release debug lib/* i18n/*.qm qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - - +rm -rf libexif/libexif-0.6.17 +rm -rf include +rm -rf bin +rm -rf lib +rm -rf release +rm -rf debug +rm -f lib/*.* +rm -f i18n/*.qm +rm -f qdevelop-settings.db +rm -f Makefile +rm -f *.Debug +rm -f *.Release +rm -f dpf.ini +rm -f .qmake.* diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/build-all.bat b/applications/Photoframe/build-all.bat deleted file mode 100755 index 7f67edb..0000000 --- a/applications/Photoframe/build-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-all.sh diff --git a/applications/Photoframe/build-all.sh b/applications/Photoframe/build-all.sh index 3fbaccd..ba190f4 100755 --- a/applications/Photoframe/build-all.sh +++ b/applications/Photoframe/build-all.sh @@ -5,11 +5,13 @@ # InvertedLogic 2009-2021 # -. build-libexif.sh +sh build-libexif.sh qmake make -. refresh_translations.sh +echo sh refresh-translations.sh +sh refresh-translations.sh +echo cp config/dpf.ini ./ cp config/dpf.ini ./ diff --git a/applications/Photoframe/build-libexif.bat b/applications/Photoframe/build-libexif.bat deleted file mode 100755 index 3835462..0000000 --- a/applications/Photoframe/build-libexif.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-libexif.sh diff --git a/applications/Photoframe/build-libexif.sh b/applications/Photoframe/build-libexif.sh index c832ac2..c0a322b 100755 --- a/applications/Photoframe/build-libexif.sh +++ b/applications/Photoframe/build-libexif.sh @@ -25,6 +25,7 @@ cp release/libexif*.dylib ../../bin cp release/libexif.a ../../lib cp release/exif.dll ../../release +cp release/exif.lib ../../lib cp release/liblibexif.a ../../lib cp release/libexif.dll ../../lib cp release/libexif.dll ../../release diff --git a/applications/Photoframe/clean.bat b/applications/Photoframe/clean.bat deleted file mode 100755 index d15a7d6..0000000 --- a/applications/Photoframe/clean.bat +++ /dev/null @@ -1,18 +0,0 @@ -@echo off -rem -rem Batch script to clean Photoframe on Windows -rem By John Ryland -rem InvertedLogic 2009 -rem - -rmdir /s /q libexif\libexif-0.6.17 -rmdir /s /q include -rmdir /s /q bin -rmdir /s /q lib -rmdir /s /q release -rmdir /s /q debug -del /q lib\*.* -del /q i18n\*.qm -del /q qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - -pause diff --git a/applications/Photoframe/clean.sh b/applications/Photoframe/clean.sh index be12bfa..a50bd23 100755 --- a/applications/Photoframe/clean.sh +++ b/applications/Photoframe/clean.sh @@ -1,6 +1,21 @@ #!/bin/bash +# +# Script to clean Photoframe +# By John Ryland +# InvertedLogic 2009 +# - -rm -rf libexif/libexif-0.6.17 include/libexif release debug lib/* i18n/*.qm qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - - +rm -rf libexif/libexif-0.6.17 +rm -rf include +rm -rf bin +rm -rf lib +rm -rf release +rm -rf debug +rm -f lib/*.* +rm -f i18n/*.qm +rm -f qdevelop-settings.db +rm -f Makefile +rm -f *.Debug +rm -f *.Release +rm -f dpf.ini +rm -f .qmake.* diff --git a/applications/Photoframe/dos.inc b/applications/Photoframe/dos.inc deleted file mode 100755 index 60b3639..0000000 --- a/applications/Photoframe/dos.inc +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -DEBUG=1 - -function debug() -{ - if [ "$DEBUG" == "1" ] - then - echo "$@" - fi -} - -function fix_args1() -{ - while [ $# -ne 0 ] - do - # echo -E -- "$1" | tr "\\" "~" | sed "s/ \/\([a-zA-Z0-9]*\)/ -\1/g" | tr "~" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -E -- "$1" | tr "\\\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -n " " - shift - done - # echo -E -- "$@" | tr "\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" -} - -function fix_args() -{ - ARGS=`fix_args1 ${@}` - ARGS=`eval echo -- $ARGS | sed "s/^-- //g"` - echo "$ARGS" -} - -function @echo() -{ - debug "Echo: @echo $@" -} - -function rem() -{ - debug "Comment: $@" -} - -function copy() -{ - echo '"Copy: '${@}'"' - debug "Copy: `which cp` `fix_args "$@"`" - `which cp` `fix_args "${@}"` -} - -function md() -{ - debug "Mkdir: `which mkdir` `fix_args $@`" - `which mkdir` `fix_args "$@"` -} - -function cd() -{ - debug "Chdir: cd `fix_args $@`" - builtin cd `fix_args "$@"` -} - -function set() -{ - debug "Set: export `fix_args $@`" - export `fix_args $@` -} - -function unzip() -{ - ARGS=`fix_args "$@"` - debug "Unzip: `which unzip` $ARGS" - `which unzip` $ARGS -} - -function cmd() -{ - debug "Cmd: `fix_args $@`" - if [ "$1" == "/C" ] - then - $2 - fi -} - -function rmdir() -{ - debug "Rmdir: rm -rf `fix_args $@`" -} - -function del() -{ - debug "Del: rm -f `fix_args $@`" -} - -function pause() -{ - debug "Pause: `fix_args $@`" - echo "Press Enter to continue..." - read -} - - diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/build-all.bat b/applications/Photoframe/build-all.bat deleted file mode 100755 index 7f67edb..0000000 --- a/applications/Photoframe/build-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-all.sh diff --git a/applications/Photoframe/build-all.sh b/applications/Photoframe/build-all.sh index 3fbaccd..ba190f4 100755 --- a/applications/Photoframe/build-all.sh +++ b/applications/Photoframe/build-all.sh @@ -5,11 +5,13 @@ # InvertedLogic 2009-2021 # -. build-libexif.sh +sh build-libexif.sh qmake make -. refresh_translations.sh +echo sh refresh-translations.sh +sh refresh-translations.sh +echo cp config/dpf.ini ./ cp config/dpf.ini ./ diff --git a/applications/Photoframe/build-libexif.bat b/applications/Photoframe/build-libexif.bat deleted file mode 100755 index 3835462..0000000 --- a/applications/Photoframe/build-libexif.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-libexif.sh diff --git a/applications/Photoframe/build-libexif.sh b/applications/Photoframe/build-libexif.sh index c832ac2..c0a322b 100755 --- a/applications/Photoframe/build-libexif.sh +++ b/applications/Photoframe/build-libexif.sh @@ -25,6 +25,7 @@ cp release/libexif*.dylib ../../bin cp release/libexif.a ../../lib cp release/exif.dll ../../release +cp release/exif.lib ../../lib cp release/liblibexif.a ../../lib cp release/libexif.dll ../../lib cp release/libexif.dll ../../release diff --git a/applications/Photoframe/clean.bat b/applications/Photoframe/clean.bat deleted file mode 100755 index d15a7d6..0000000 --- a/applications/Photoframe/clean.bat +++ /dev/null @@ -1,18 +0,0 @@ -@echo off -rem -rem Batch script to clean Photoframe on Windows -rem By John Ryland -rem InvertedLogic 2009 -rem - -rmdir /s /q libexif\libexif-0.6.17 -rmdir /s /q include -rmdir /s /q bin -rmdir /s /q lib -rmdir /s /q release -rmdir /s /q debug -del /q lib\*.* -del /q i18n\*.qm -del /q qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - -pause diff --git a/applications/Photoframe/clean.sh b/applications/Photoframe/clean.sh index be12bfa..a50bd23 100755 --- a/applications/Photoframe/clean.sh +++ b/applications/Photoframe/clean.sh @@ -1,6 +1,21 @@ #!/bin/bash +# +# Script to clean Photoframe +# By John Ryland +# InvertedLogic 2009 +# - -rm -rf libexif/libexif-0.6.17 include/libexif release debug lib/* i18n/*.qm qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - - +rm -rf libexif/libexif-0.6.17 +rm -rf include +rm -rf bin +rm -rf lib +rm -rf release +rm -rf debug +rm -f lib/*.* +rm -f i18n/*.qm +rm -f qdevelop-settings.db +rm -f Makefile +rm -f *.Debug +rm -f *.Release +rm -f dpf.ini +rm -f .qmake.* diff --git a/applications/Photoframe/dos.inc b/applications/Photoframe/dos.inc deleted file mode 100755 index 60b3639..0000000 --- a/applications/Photoframe/dos.inc +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -DEBUG=1 - -function debug() -{ - if [ "$DEBUG" == "1" ] - then - echo "$@" - fi -} - -function fix_args1() -{ - while [ $# -ne 0 ] - do - # echo -E -- "$1" | tr "\\" "~" | sed "s/ \/\([a-zA-Z0-9]*\)/ -\1/g" | tr "~" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -E -- "$1" | tr "\\\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -n " " - shift - done - # echo -E -- "$@" | tr "\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" -} - -function fix_args() -{ - ARGS=`fix_args1 ${@}` - ARGS=`eval echo -- $ARGS | sed "s/^-- //g"` - echo "$ARGS" -} - -function @echo() -{ - debug "Echo: @echo $@" -} - -function rem() -{ - debug "Comment: $@" -} - -function copy() -{ - echo '"Copy: '${@}'"' - debug "Copy: `which cp` `fix_args "$@"`" - `which cp` `fix_args "${@}"` -} - -function md() -{ - debug "Mkdir: `which mkdir` `fix_args $@`" - `which mkdir` `fix_args "$@"` -} - -function cd() -{ - debug "Chdir: cd `fix_args $@`" - builtin cd `fix_args "$@"` -} - -function set() -{ - debug "Set: export `fix_args $@`" - export `fix_args $@` -} - -function unzip() -{ - ARGS=`fix_args "$@"` - debug "Unzip: `which unzip` $ARGS" - `which unzip` $ARGS -} - -function cmd() -{ - debug "Cmd: `fix_args $@`" - if [ "$1" == "/C" ] - then - $2 - fi -} - -function rmdir() -{ - debug "Rmdir: rm -rf `fix_args $@`" -} - -function del() -{ - debug "Del: rm -f `fix_args $@`" -} - -function pause() -{ - debug "Pause: `fix_args $@`" - echo "Press Enter to continue..." - read -} - - diff --git a/applications/Photoframe/libexif/libexif.pro b/applications/Photoframe/libexif/libexif.pro index 39fa931..9086733 100755 --- a/applications/Photoframe/libexif/libexif.pro +++ b/applications/Photoframe/libexif/libexif.pro @@ -1,5 +1,6 @@ TEMPLATE = lib TARGET = exif +CONFIG += staticlib DEFINES += _CRT_SECURE_NO_WARNINGS M_PI=3.14 ssize_t=int SOURCES += libexif/exif-utils.c \ libexif/exif-byte-order.c \ diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/build-all.bat b/applications/Photoframe/build-all.bat deleted file mode 100755 index 7f67edb..0000000 --- a/applications/Photoframe/build-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-all.sh diff --git a/applications/Photoframe/build-all.sh b/applications/Photoframe/build-all.sh index 3fbaccd..ba190f4 100755 --- a/applications/Photoframe/build-all.sh +++ b/applications/Photoframe/build-all.sh @@ -5,11 +5,13 @@ # InvertedLogic 2009-2021 # -. build-libexif.sh +sh build-libexif.sh qmake make -. refresh_translations.sh +echo sh refresh-translations.sh +sh refresh-translations.sh +echo cp config/dpf.ini ./ cp config/dpf.ini ./ diff --git a/applications/Photoframe/build-libexif.bat b/applications/Photoframe/build-libexif.bat deleted file mode 100755 index 3835462..0000000 --- a/applications/Photoframe/build-libexif.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-libexif.sh diff --git a/applications/Photoframe/build-libexif.sh b/applications/Photoframe/build-libexif.sh index c832ac2..c0a322b 100755 --- a/applications/Photoframe/build-libexif.sh +++ b/applications/Photoframe/build-libexif.sh @@ -25,6 +25,7 @@ cp release/libexif*.dylib ../../bin cp release/libexif.a ../../lib cp release/exif.dll ../../release +cp release/exif.lib ../../lib cp release/liblibexif.a ../../lib cp release/libexif.dll ../../lib cp release/libexif.dll ../../release diff --git a/applications/Photoframe/clean.bat b/applications/Photoframe/clean.bat deleted file mode 100755 index d15a7d6..0000000 --- a/applications/Photoframe/clean.bat +++ /dev/null @@ -1,18 +0,0 @@ -@echo off -rem -rem Batch script to clean Photoframe on Windows -rem By John Ryland -rem InvertedLogic 2009 -rem - -rmdir /s /q libexif\libexif-0.6.17 -rmdir /s /q include -rmdir /s /q bin -rmdir /s /q lib -rmdir /s /q release -rmdir /s /q debug -del /q lib\*.* -del /q i18n\*.qm -del /q qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - -pause diff --git a/applications/Photoframe/clean.sh b/applications/Photoframe/clean.sh index be12bfa..a50bd23 100755 --- a/applications/Photoframe/clean.sh +++ b/applications/Photoframe/clean.sh @@ -1,6 +1,21 @@ #!/bin/bash +# +# Script to clean Photoframe +# By John Ryland +# InvertedLogic 2009 +# - -rm -rf libexif/libexif-0.6.17 include/libexif release debug lib/* i18n/*.qm qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - - +rm -rf libexif/libexif-0.6.17 +rm -rf include +rm -rf bin +rm -rf lib +rm -rf release +rm -rf debug +rm -f lib/*.* +rm -f i18n/*.qm +rm -f qdevelop-settings.db +rm -f Makefile +rm -f *.Debug +rm -f *.Release +rm -f dpf.ini +rm -f .qmake.* diff --git a/applications/Photoframe/dos.inc b/applications/Photoframe/dos.inc deleted file mode 100755 index 60b3639..0000000 --- a/applications/Photoframe/dos.inc +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -DEBUG=1 - -function debug() -{ - if [ "$DEBUG" == "1" ] - then - echo "$@" - fi -} - -function fix_args1() -{ - while [ $# -ne 0 ] - do - # echo -E -- "$1" | tr "\\" "~" | sed "s/ \/\([a-zA-Z0-9]*\)/ -\1/g" | tr "~" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -E -- "$1" | tr "\\\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -n " " - shift - done - # echo -E -- "$@" | tr "\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" -} - -function fix_args() -{ - ARGS=`fix_args1 ${@}` - ARGS=`eval echo -- $ARGS | sed "s/^-- //g"` - echo "$ARGS" -} - -function @echo() -{ - debug "Echo: @echo $@" -} - -function rem() -{ - debug "Comment: $@" -} - -function copy() -{ - echo '"Copy: '${@}'"' - debug "Copy: `which cp` `fix_args "$@"`" - `which cp` `fix_args "${@}"` -} - -function md() -{ - debug "Mkdir: `which mkdir` `fix_args $@`" - `which mkdir` `fix_args "$@"` -} - -function cd() -{ - debug "Chdir: cd `fix_args $@`" - builtin cd `fix_args "$@"` -} - -function set() -{ - debug "Set: export `fix_args $@`" - export `fix_args $@` -} - -function unzip() -{ - ARGS=`fix_args "$@"` - debug "Unzip: `which unzip` $ARGS" - `which unzip` $ARGS -} - -function cmd() -{ - debug "Cmd: `fix_args $@`" - if [ "$1" == "/C" ] - then - $2 - fi -} - -function rmdir() -{ - debug "Rmdir: rm -rf `fix_args $@`" -} - -function del() -{ - debug "Del: rm -f `fix_args $@`" -} - -function pause() -{ - debug "Pause: `fix_args $@`" - echo "Press Enter to continue..." - read -} - - diff --git a/applications/Photoframe/libexif/libexif.pro b/applications/Photoframe/libexif/libexif.pro index 39fa931..9086733 100755 --- a/applications/Photoframe/libexif/libexif.pro +++ b/applications/Photoframe/libexif/libexif.pro @@ -1,5 +1,6 @@ TEMPLATE = lib TARGET = exif +CONFIG += staticlib DEFINES += _CRT_SECURE_NO_WARNINGS M_PI=3.14 ssize_t=int SOURCES += libexif/exif-utils.c \ libexif/exif-byte-order.c \ diff --git a/applications/Photoframe/run-unix-script.bat b/applications/Photoframe/run-unix-script.bat deleted file mode 100644 index 13c638a..0000000 --- a/applications/Photoframe/run-unix-script.bat +++ /dev/null @@ -1,84 +0,0 @@ -@echo off - -rem Process the file given on the command line -setlocal enabledelayedexpansion -for /f "tokens=1,*" %%a in ('type %1') do ( -set cmd=%%a -set line=%%b -call :_!cmd! !line! -) - -goto:_slash_convert_end -:_slash_convert -SET ARGS= -:loop -if not "%1"=="" ( - SET Z=%1 - SET Z=!Z:$=%%! - SET Z=!Z:{=! - SET Z=!Z:}=%%! - SET ARGS=%ARGS%!Z:/=\! - shift - goto :loop -) -rem echo.%CD%^> %ARGS% -call %ARGS% -goto:eof -:_slash_convert_end - -goto:cp_end -:_cp -call:_slash_convert copy %* && goto:eof -:cp_end - -goto:cd_end -:_cd -call:_slash_convert cd %* && goto:eof -:cd_end - -goto:mkdir_end -:_mkdir -if "%1"=="-p" shift -SET Z=%1 -SET Z=!Z:$=%%! -SET Z=!Z:{=! -SET Z=!Z:}=%%! -SET ARG=!Z:/=\! -if not exist %ARG% mkdir %ARG% -goto:eof -:mkdir_end - -goto:echo_end -:_echo -echo.%* && goto:eof -:echo_end - -goto:export_end -:_export -setlocal -SET F1=%1 -SET "!F1:/=\!" -endlocal -goto:eof -:export_end - -goto:unzip_end -:_unzip -call:_slash_convert unzip %* && goto:eof -:unzip_end - -goto:qmake_end -:_qmake -call:_slash_convert qmake %* && goto:eof -:qmake_end - -goto:make_end -:_make -call:_slash_convert nmake %* && goto:eof -:make_end - -rem Null commands -:_# -:_#/bin/bash -:_#!/bin/bash -goto:eof diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/build-all.bat b/applications/Photoframe/build-all.bat deleted file mode 100755 index 7f67edb..0000000 --- a/applications/Photoframe/build-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-all.sh diff --git a/applications/Photoframe/build-all.sh b/applications/Photoframe/build-all.sh index 3fbaccd..ba190f4 100755 --- a/applications/Photoframe/build-all.sh +++ b/applications/Photoframe/build-all.sh @@ -5,11 +5,13 @@ # InvertedLogic 2009-2021 # -. build-libexif.sh +sh build-libexif.sh qmake make -. refresh_translations.sh +echo sh refresh-translations.sh +sh refresh-translations.sh +echo cp config/dpf.ini ./ cp config/dpf.ini ./ diff --git a/applications/Photoframe/build-libexif.bat b/applications/Photoframe/build-libexif.bat deleted file mode 100755 index 3835462..0000000 --- a/applications/Photoframe/build-libexif.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-libexif.sh diff --git a/applications/Photoframe/build-libexif.sh b/applications/Photoframe/build-libexif.sh index c832ac2..c0a322b 100755 --- a/applications/Photoframe/build-libexif.sh +++ b/applications/Photoframe/build-libexif.sh @@ -25,6 +25,7 @@ cp release/libexif*.dylib ../../bin cp release/libexif.a ../../lib cp release/exif.dll ../../release +cp release/exif.lib ../../lib cp release/liblibexif.a ../../lib cp release/libexif.dll ../../lib cp release/libexif.dll ../../release diff --git a/applications/Photoframe/clean.bat b/applications/Photoframe/clean.bat deleted file mode 100755 index d15a7d6..0000000 --- a/applications/Photoframe/clean.bat +++ /dev/null @@ -1,18 +0,0 @@ -@echo off -rem -rem Batch script to clean Photoframe on Windows -rem By John Ryland -rem InvertedLogic 2009 -rem - -rmdir /s /q libexif\libexif-0.6.17 -rmdir /s /q include -rmdir /s /q bin -rmdir /s /q lib -rmdir /s /q release -rmdir /s /q debug -del /q lib\*.* -del /q i18n\*.qm -del /q qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - -pause diff --git a/applications/Photoframe/clean.sh b/applications/Photoframe/clean.sh index be12bfa..a50bd23 100755 --- a/applications/Photoframe/clean.sh +++ b/applications/Photoframe/clean.sh @@ -1,6 +1,21 @@ #!/bin/bash +# +# Script to clean Photoframe +# By John Ryland +# InvertedLogic 2009 +# - -rm -rf libexif/libexif-0.6.17 include/libexif release debug lib/* i18n/*.qm qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - - +rm -rf libexif/libexif-0.6.17 +rm -rf include +rm -rf bin +rm -rf lib +rm -rf release +rm -rf debug +rm -f lib/*.* +rm -f i18n/*.qm +rm -f qdevelop-settings.db +rm -f Makefile +rm -f *.Debug +rm -f *.Release +rm -f dpf.ini +rm -f .qmake.* diff --git a/applications/Photoframe/dos.inc b/applications/Photoframe/dos.inc deleted file mode 100755 index 60b3639..0000000 --- a/applications/Photoframe/dos.inc +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -DEBUG=1 - -function debug() -{ - if [ "$DEBUG" == "1" ] - then - echo "$@" - fi -} - -function fix_args1() -{ - while [ $# -ne 0 ] - do - # echo -E -- "$1" | tr "\\" "~" | sed "s/ \/\([a-zA-Z0-9]*\)/ -\1/g" | tr "~" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -E -- "$1" | tr "\\\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -n " " - shift - done - # echo -E -- "$@" | tr "\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" -} - -function fix_args() -{ - ARGS=`fix_args1 ${@}` - ARGS=`eval echo -- $ARGS | sed "s/^-- //g"` - echo "$ARGS" -} - -function @echo() -{ - debug "Echo: @echo $@" -} - -function rem() -{ - debug "Comment: $@" -} - -function copy() -{ - echo '"Copy: '${@}'"' - debug "Copy: `which cp` `fix_args "$@"`" - `which cp` `fix_args "${@}"` -} - -function md() -{ - debug "Mkdir: `which mkdir` `fix_args $@`" - `which mkdir` `fix_args "$@"` -} - -function cd() -{ - debug "Chdir: cd `fix_args $@`" - builtin cd `fix_args "$@"` -} - -function set() -{ - debug "Set: export `fix_args $@`" - export `fix_args $@` -} - -function unzip() -{ - ARGS=`fix_args "$@"` - debug "Unzip: `which unzip` $ARGS" - `which unzip` $ARGS -} - -function cmd() -{ - debug "Cmd: `fix_args $@`" - if [ "$1" == "/C" ] - then - $2 - fi -} - -function rmdir() -{ - debug "Rmdir: rm -rf `fix_args $@`" -} - -function del() -{ - debug "Del: rm -f `fix_args $@`" -} - -function pause() -{ - debug "Pause: `fix_args $@`" - echo "Press Enter to continue..." - read -} - - diff --git a/applications/Photoframe/libexif/libexif.pro b/applications/Photoframe/libexif/libexif.pro index 39fa931..9086733 100755 --- a/applications/Photoframe/libexif/libexif.pro +++ b/applications/Photoframe/libexif/libexif.pro @@ -1,5 +1,6 @@ TEMPLATE = lib TARGET = exif +CONFIG += staticlib DEFINES += _CRT_SECURE_NO_WARNINGS M_PI=3.14 ssize_t=int SOURCES += libexif/exif-utils.c \ libexif/exif-byte-order.c \ diff --git a/applications/Photoframe/run-unix-script.bat b/applications/Photoframe/run-unix-script.bat deleted file mode 100644 index 13c638a..0000000 --- a/applications/Photoframe/run-unix-script.bat +++ /dev/null @@ -1,84 +0,0 @@ -@echo off - -rem Process the file given on the command line -setlocal enabledelayedexpansion -for /f "tokens=1,*" %%a in ('type %1') do ( -set cmd=%%a -set line=%%b -call :_!cmd! !line! -) - -goto:_slash_convert_end -:_slash_convert -SET ARGS= -:loop -if not "%1"=="" ( - SET Z=%1 - SET Z=!Z:$=%%! - SET Z=!Z:{=! - SET Z=!Z:}=%%! - SET ARGS=%ARGS%!Z:/=\! - shift - goto :loop -) -rem echo.%CD%^> %ARGS% -call %ARGS% -goto:eof -:_slash_convert_end - -goto:cp_end -:_cp -call:_slash_convert copy %* && goto:eof -:cp_end - -goto:cd_end -:_cd -call:_slash_convert cd %* && goto:eof -:cd_end - -goto:mkdir_end -:_mkdir -if "%1"=="-p" shift -SET Z=%1 -SET Z=!Z:$=%%! -SET Z=!Z:{=! -SET Z=!Z:}=%%! -SET ARG=!Z:/=\! -if not exist %ARG% mkdir %ARG% -goto:eof -:mkdir_end - -goto:echo_end -:_echo -echo.%* && goto:eof -:echo_end - -goto:export_end -:_export -setlocal -SET F1=%1 -SET "!F1:/=\!" -endlocal -goto:eof -:export_end - -goto:unzip_end -:_unzip -call:_slash_convert unzip %* && goto:eof -:unzip_end - -goto:qmake_end -:_qmake -call:_slash_convert qmake %* && goto:eof -:qmake_end - -goto:make_end -:_make -call:_slash_convert nmake %* && goto:eof -:make_end - -rem Null commands -:_# -:_#/bin/bash -:_#!/bin/bash -goto:eof diff --git a/applications/Photoframe/run.cmd b/applications/Photoframe/run.cmd new file mode 100644 index 0000000..a6f2ec6 --- /dev/null +++ b/applications/Photoframe/run.cmd @@ -0,0 +1,6 @@ +#!/bin/bash + +export DYLD_LIBRARY_PATH=$PWD/Photoframe.app/Contents/MacOS:$PATH +./Photoframe.app/Contents/MacOS/Photoframe + + diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/build-all.bat b/applications/Photoframe/build-all.bat deleted file mode 100755 index 7f67edb..0000000 --- a/applications/Photoframe/build-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-all.sh diff --git a/applications/Photoframe/build-all.sh b/applications/Photoframe/build-all.sh index 3fbaccd..ba190f4 100755 --- a/applications/Photoframe/build-all.sh +++ b/applications/Photoframe/build-all.sh @@ -5,11 +5,13 @@ # InvertedLogic 2009-2021 # -. build-libexif.sh +sh build-libexif.sh qmake make -. refresh_translations.sh +echo sh refresh-translations.sh +sh refresh-translations.sh +echo cp config/dpf.ini ./ cp config/dpf.ini ./ diff --git a/applications/Photoframe/build-libexif.bat b/applications/Photoframe/build-libexif.bat deleted file mode 100755 index 3835462..0000000 --- a/applications/Photoframe/build-libexif.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-libexif.sh diff --git a/applications/Photoframe/build-libexif.sh b/applications/Photoframe/build-libexif.sh index c832ac2..c0a322b 100755 --- a/applications/Photoframe/build-libexif.sh +++ b/applications/Photoframe/build-libexif.sh @@ -25,6 +25,7 @@ cp release/libexif*.dylib ../../bin cp release/libexif.a ../../lib cp release/exif.dll ../../release +cp release/exif.lib ../../lib cp release/liblibexif.a ../../lib cp release/libexif.dll ../../lib cp release/libexif.dll ../../release diff --git a/applications/Photoframe/clean.bat b/applications/Photoframe/clean.bat deleted file mode 100755 index d15a7d6..0000000 --- a/applications/Photoframe/clean.bat +++ /dev/null @@ -1,18 +0,0 @@ -@echo off -rem -rem Batch script to clean Photoframe on Windows -rem By John Ryland -rem InvertedLogic 2009 -rem - -rmdir /s /q libexif\libexif-0.6.17 -rmdir /s /q include -rmdir /s /q bin -rmdir /s /q lib -rmdir /s /q release -rmdir /s /q debug -del /q lib\*.* -del /q i18n\*.qm -del /q qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - -pause diff --git a/applications/Photoframe/clean.sh b/applications/Photoframe/clean.sh index be12bfa..a50bd23 100755 --- a/applications/Photoframe/clean.sh +++ b/applications/Photoframe/clean.sh @@ -1,6 +1,21 @@ #!/bin/bash +# +# Script to clean Photoframe +# By John Ryland +# InvertedLogic 2009 +# - -rm -rf libexif/libexif-0.6.17 include/libexif release debug lib/* i18n/*.qm qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - - +rm -rf libexif/libexif-0.6.17 +rm -rf include +rm -rf bin +rm -rf lib +rm -rf release +rm -rf debug +rm -f lib/*.* +rm -f i18n/*.qm +rm -f qdevelop-settings.db +rm -f Makefile +rm -f *.Debug +rm -f *.Release +rm -f dpf.ini +rm -f .qmake.* diff --git a/applications/Photoframe/dos.inc b/applications/Photoframe/dos.inc deleted file mode 100755 index 60b3639..0000000 --- a/applications/Photoframe/dos.inc +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -DEBUG=1 - -function debug() -{ - if [ "$DEBUG" == "1" ] - then - echo "$@" - fi -} - -function fix_args1() -{ - while [ $# -ne 0 ] - do - # echo -E -- "$1" | tr "\\" "~" | sed "s/ \/\([a-zA-Z0-9]*\)/ -\1/g" | tr "~" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -E -- "$1" | tr "\\\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -n " " - shift - done - # echo -E -- "$@" | tr "\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" -} - -function fix_args() -{ - ARGS=`fix_args1 ${@}` - ARGS=`eval echo -- $ARGS | sed "s/^-- //g"` - echo "$ARGS" -} - -function @echo() -{ - debug "Echo: @echo $@" -} - -function rem() -{ - debug "Comment: $@" -} - -function copy() -{ - echo '"Copy: '${@}'"' - debug "Copy: `which cp` `fix_args "$@"`" - `which cp` `fix_args "${@}"` -} - -function md() -{ - debug "Mkdir: `which mkdir` `fix_args $@`" - `which mkdir` `fix_args "$@"` -} - -function cd() -{ - debug "Chdir: cd `fix_args $@`" - builtin cd `fix_args "$@"` -} - -function set() -{ - debug "Set: export `fix_args $@`" - export `fix_args $@` -} - -function unzip() -{ - ARGS=`fix_args "$@"` - debug "Unzip: `which unzip` $ARGS" - `which unzip` $ARGS -} - -function cmd() -{ - debug "Cmd: `fix_args $@`" - if [ "$1" == "/C" ] - then - $2 - fi -} - -function rmdir() -{ - debug "Rmdir: rm -rf `fix_args $@`" -} - -function del() -{ - debug "Del: rm -f `fix_args $@`" -} - -function pause() -{ - debug "Pause: `fix_args $@`" - echo "Press Enter to continue..." - read -} - - diff --git a/applications/Photoframe/libexif/libexif.pro b/applications/Photoframe/libexif/libexif.pro index 39fa931..9086733 100755 --- a/applications/Photoframe/libexif/libexif.pro +++ b/applications/Photoframe/libexif/libexif.pro @@ -1,5 +1,6 @@ TEMPLATE = lib TARGET = exif +CONFIG += staticlib DEFINES += _CRT_SECURE_NO_WARNINGS M_PI=3.14 ssize_t=int SOURCES += libexif/exif-utils.c \ libexif/exif-byte-order.c \ diff --git a/applications/Photoframe/run-unix-script.bat b/applications/Photoframe/run-unix-script.bat deleted file mode 100644 index 13c638a..0000000 --- a/applications/Photoframe/run-unix-script.bat +++ /dev/null @@ -1,84 +0,0 @@ -@echo off - -rem Process the file given on the command line -setlocal enabledelayedexpansion -for /f "tokens=1,*" %%a in ('type %1') do ( -set cmd=%%a -set line=%%b -call :_!cmd! !line! -) - -goto:_slash_convert_end -:_slash_convert -SET ARGS= -:loop -if not "%1"=="" ( - SET Z=%1 - SET Z=!Z:$=%%! - SET Z=!Z:{=! - SET Z=!Z:}=%%! - SET ARGS=%ARGS%!Z:/=\! - shift - goto :loop -) -rem echo.%CD%^> %ARGS% -call %ARGS% -goto:eof -:_slash_convert_end - -goto:cp_end -:_cp -call:_slash_convert copy %* && goto:eof -:cp_end - -goto:cd_end -:_cd -call:_slash_convert cd %* && goto:eof -:cd_end - -goto:mkdir_end -:_mkdir -if "%1"=="-p" shift -SET Z=%1 -SET Z=!Z:$=%%! -SET Z=!Z:{=! -SET Z=!Z:}=%%! -SET ARG=!Z:/=\! -if not exist %ARG% mkdir %ARG% -goto:eof -:mkdir_end - -goto:echo_end -:_echo -echo.%* && goto:eof -:echo_end - -goto:export_end -:_export -setlocal -SET F1=%1 -SET "!F1:/=\!" -endlocal -goto:eof -:export_end - -goto:unzip_end -:_unzip -call:_slash_convert unzip %* && goto:eof -:unzip_end - -goto:qmake_end -:_qmake -call:_slash_convert qmake %* && goto:eof -:qmake_end - -goto:make_end -:_make -call:_slash_convert nmake %* && goto:eof -:make_end - -rem Null commands -:_# -:_#/bin/bash -:_#!/bin/bash -goto:eof diff --git a/applications/Photoframe/run.cmd b/applications/Photoframe/run.cmd new file mode 100644 index 0000000..a6f2ec6 --- /dev/null +++ b/applications/Photoframe/run.cmd @@ -0,0 +1,6 @@ +#!/bin/bash + +export DYLD_LIBRARY_PATH=$PWD/Photoframe.app/Contents/MacOS:$PATH +./Photoframe.app/Contents/MacOS/Photoframe + + diff --git a/applications/Photoframe/run.sh b/applications/Photoframe/run.sh index a6f2ec6..0dff87a 100755 --- a/applications/Photoframe/run.sh +++ b/applications/Photoframe/run.sh @@ -1,6 +1,4 @@ #!/bin/bash -export DYLD_LIBRARY_PATH=$PWD/Photoframe.app/Contents/MacOS:$PATH -./Photoframe.app/Contents/MacOS/Photoframe - - +export LD_LIBRARY_PATH=$PWD/bin:$LD_LIBRARY_PATH +./bin/Photoframe diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/build-all.bat b/applications/Photoframe/build-all.bat deleted file mode 100755 index 7f67edb..0000000 --- a/applications/Photoframe/build-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-all.sh diff --git a/applications/Photoframe/build-all.sh b/applications/Photoframe/build-all.sh index 3fbaccd..ba190f4 100755 --- a/applications/Photoframe/build-all.sh +++ b/applications/Photoframe/build-all.sh @@ -5,11 +5,13 @@ # InvertedLogic 2009-2021 # -. build-libexif.sh +sh build-libexif.sh qmake make -. refresh_translations.sh +echo sh refresh-translations.sh +sh refresh-translations.sh +echo cp config/dpf.ini ./ cp config/dpf.ini ./ diff --git a/applications/Photoframe/build-libexif.bat b/applications/Photoframe/build-libexif.bat deleted file mode 100755 index 3835462..0000000 --- a/applications/Photoframe/build-libexif.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-libexif.sh diff --git a/applications/Photoframe/build-libexif.sh b/applications/Photoframe/build-libexif.sh index c832ac2..c0a322b 100755 --- a/applications/Photoframe/build-libexif.sh +++ b/applications/Photoframe/build-libexif.sh @@ -25,6 +25,7 @@ cp release/libexif*.dylib ../../bin cp release/libexif.a ../../lib cp release/exif.dll ../../release +cp release/exif.lib ../../lib cp release/liblibexif.a ../../lib cp release/libexif.dll ../../lib cp release/libexif.dll ../../release diff --git a/applications/Photoframe/clean.bat b/applications/Photoframe/clean.bat deleted file mode 100755 index d15a7d6..0000000 --- a/applications/Photoframe/clean.bat +++ /dev/null @@ -1,18 +0,0 @@ -@echo off -rem -rem Batch script to clean Photoframe on Windows -rem By John Ryland -rem InvertedLogic 2009 -rem - -rmdir /s /q libexif\libexif-0.6.17 -rmdir /s /q include -rmdir /s /q bin -rmdir /s /q lib -rmdir /s /q release -rmdir /s /q debug -del /q lib\*.* -del /q i18n\*.qm -del /q qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - -pause diff --git a/applications/Photoframe/clean.sh b/applications/Photoframe/clean.sh index be12bfa..a50bd23 100755 --- a/applications/Photoframe/clean.sh +++ b/applications/Photoframe/clean.sh @@ -1,6 +1,21 @@ #!/bin/bash +# +# Script to clean Photoframe +# By John Ryland +# InvertedLogic 2009 +# - -rm -rf libexif/libexif-0.6.17 include/libexif release debug lib/* i18n/*.qm qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - - +rm -rf libexif/libexif-0.6.17 +rm -rf include +rm -rf bin +rm -rf lib +rm -rf release +rm -rf debug +rm -f lib/*.* +rm -f i18n/*.qm +rm -f qdevelop-settings.db +rm -f Makefile +rm -f *.Debug +rm -f *.Release +rm -f dpf.ini +rm -f .qmake.* diff --git a/applications/Photoframe/dos.inc b/applications/Photoframe/dos.inc deleted file mode 100755 index 60b3639..0000000 --- a/applications/Photoframe/dos.inc +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -DEBUG=1 - -function debug() -{ - if [ "$DEBUG" == "1" ] - then - echo "$@" - fi -} - -function fix_args1() -{ - while [ $# -ne 0 ] - do - # echo -E -- "$1" | tr "\\" "~" | sed "s/ \/\([a-zA-Z0-9]*\)/ -\1/g" | tr "~" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -E -- "$1" | tr "\\\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -n " " - shift - done - # echo -E -- "$@" | tr "\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" -} - -function fix_args() -{ - ARGS=`fix_args1 ${@}` - ARGS=`eval echo -- $ARGS | sed "s/^-- //g"` - echo "$ARGS" -} - -function @echo() -{ - debug "Echo: @echo $@" -} - -function rem() -{ - debug "Comment: $@" -} - -function copy() -{ - echo '"Copy: '${@}'"' - debug "Copy: `which cp` `fix_args "$@"`" - `which cp` `fix_args "${@}"` -} - -function md() -{ - debug "Mkdir: `which mkdir` `fix_args $@`" - `which mkdir` `fix_args "$@"` -} - -function cd() -{ - debug "Chdir: cd `fix_args $@`" - builtin cd `fix_args "$@"` -} - -function set() -{ - debug "Set: export `fix_args $@`" - export `fix_args $@` -} - -function unzip() -{ - ARGS=`fix_args "$@"` - debug "Unzip: `which unzip` $ARGS" - `which unzip` $ARGS -} - -function cmd() -{ - debug "Cmd: `fix_args $@`" - if [ "$1" == "/C" ] - then - $2 - fi -} - -function rmdir() -{ - debug "Rmdir: rm -rf `fix_args $@`" -} - -function del() -{ - debug "Del: rm -f `fix_args $@`" -} - -function pause() -{ - debug "Pause: `fix_args $@`" - echo "Press Enter to continue..." - read -} - - diff --git a/applications/Photoframe/libexif/libexif.pro b/applications/Photoframe/libexif/libexif.pro index 39fa931..9086733 100755 --- a/applications/Photoframe/libexif/libexif.pro +++ b/applications/Photoframe/libexif/libexif.pro @@ -1,5 +1,6 @@ TEMPLATE = lib TARGET = exif +CONFIG += staticlib DEFINES += _CRT_SECURE_NO_WARNINGS M_PI=3.14 ssize_t=int SOURCES += libexif/exif-utils.c \ libexif/exif-byte-order.c \ diff --git a/applications/Photoframe/run-unix-script.bat b/applications/Photoframe/run-unix-script.bat deleted file mode 100644 index 13c638a..0000000 --- a/applications/Photoframe/run-unix-script.bat +++ /dev/null @@ -1,84 +0,0 @@ -@echo off - -rem Process the file given on the command line -setlocal enabledelayedexpansion -for /f "tokens=1,*" %%a in ('type %1') do ( -set cmd=%%a -set line=%%b -call :_!cmd! !line! -) - -goto:_slash_convert_end -:_slash_convert -SET ARGS= -:loop -if not "%1"=="" ( - SET Z=%1 - SET Z=!Z:$=%%! - SET Z=!Z:{=! - SET Z=!Z:}=%%! - SET ARGS=%ARGS%!Z:/=\! - shift - goto :loop -) -rem echo.%CD%^> %ARGS% -call %ARGS% -goto:eof -:_slash_convert_end - -goto:cp_end -:_cp -call:_slash_convert copy %* && goto:eof -:cp_end - -goto:cd_end -:_cd -call:_slash_convert cd %* && goto:eof -:cd_end - -goto:mkdir_end -:_mkdir -if "%1"=="-p" shift -SET Z=%1 -SET Z=!Z:$=%%! -SET Z=!Z:{=! -SET Z=!Z:}=%%! -SET ARG=!Z:/=\! -if not exist %ARG% mkdir %ARG% -goto:eof -:mkdir_end - -goto:echo_end -:_echo -echo.%* && goto:eof -:echo_end - -goto:export_end -:_export -setlocal -SET F1=%1 -SET "!F1:/=\!" -endlocal -goto:eof -:export_end - -goto:unzip_end -:_unzip -call:_slash_convert unzip %* && goto:eof -:unzip_end - -goto:qmake_end -:_qmake -call:_slash_convert qmake %* && goto:eof -:qmake_end - -goto:make_end -:_make -call:_slash_convert nmake %* && goto:eof -:make_end - -rem Null commands -:_# -:_#/bin/bash -:_#!/bin/bash -goto:eof diff --git a/applications/Photoframe/run.cmd b/applications/Photoframe/run.cmd new file mode 100644 index 0000000..a6f2ec6 --- /dev/null +++ b/applications/Photoframe/run.cmd @@ -0,0 +1,6 @@ +#!/bin/bash + +export DYLD_LIBRARY_PATH=$PWD/Photoframe.app/Contents/MacOS:$PATH +./Photoframe.app/Contents/MacOS/Photoframe + + diff --git a/applications/Photoframe/run.sh b/applications/Photoframe/run.sh index a6f2ec6..0dff87a 100755 --- a/applications/Photoframe/run.sh +++ b/applications/Photoframe/run.sh @@ -1,6 +1,4 @@ #!/bin/bash -export DYLD_LIBRARY_PATH=$PWD/Photoframe.app/Contents/MacOS:$PATH -./Photoframe.app/Contents/MacOS/Photoframe - - +export LD_LIBRARY_PATH=$PWD/bin:$LD_LIBRARY_PATH +./bin/Photoframe diff --git a/applications/Photoframe/sh.bat b/applications/Photoframe/sh.bat new file mode 100644 index 0000000..0b4c4a9 --- /dev/null +++ b/applications/Photoframe/sh.bat @@ -0,0 +1,106 @@ +@echo off + +rem Process the file given on the command line +setlocal enabledelayedexpansion +for /f "tokens=1,*" %%a in ('type %1') do ( +set cmd=%%a +set line=%%b +call :_!cmd! !line! +) + +goto:_slash_convert_end +:_slash_convert +SET ARGS= +:loop +if not "%1"=="" ( + SET Z=%1 + SET Z=!Z:$=%%! + SET Z=!Z:{=! + SET Z=!Z:}=%%! + SET ARGS=%ARGS%!Z:/=\! + shift + goto :loop +) +rem echo.%CD%^> %ARGS% +call %ARGS% +goto:eof +:_slash_convert_end + +goto:cp_end +:_cp +call:_slash_convert copy %* && goto:eof +:cp_end + +goto:cd_end +:_cd +call:_slash_convert cd %* && goto:eof +:cd_end + +goto:sh_end +:_sh +call:_slash_convert sh.bat %* && goto:eof +:sh_end + +goto:mkdir_end +:_mkdir +if "%1"=="-p" shift +SET Z=%1 +SET Z=!Z:$=%%! +SET Z=!Z:{=! +SET Z=!Z:}=%%! +SET ARG=!Z:/=\! +if not exist %ARG% mkdir %ARG% +goto:eof +:mkdir_end + +goto:rm_end +:_rm +setlocal +if "%1"=="-r" SET SARG=/S && shift +if "%1"=="-f" SET FARG=/F && shift +if "%1"=="-rf" SET SARG=/S && SET FARG=/F && shift +if not "%1"=="" ( +SET Z=%1 +SET Z=!Z:$=%%! +SET Z=!Z:{=! +SET Z=!Z:}=%%! +SET ARG=!Z:/=\! +) +rem echo del /Q %SARG% %FARG% %ARG% +if exist %1\ rmdir /Q %SARG% %ARG% +if exist %1 del /Q %SARG% %FARG% %ARG% +endlocal +goto:eof +:rm_end + +goto:echo_end +:_echo +echo.%* && goto:eof +:echo_end + +goto:export_end +:_export +SET F1=%* +rem echo SET !F1:/=\! +SET !F1:/=\! +goto:eof +:export_end + +goto:make_end +:_make +call:_slash_convert %MAKE% %* && goto:eof +:make_end + +goto:generic_end +:_unzip +:_qmake +:_lupdate +:_lrelease +call:_slash_convert %cmd% %* && goto:eof +:generic_end + +rem Null commands +:_# +:_#/bin/bash +:_#!/bin/bash +rem goto:eof diff --git a/applications/Photoframe/Photoframe.pro b/applications/Photoframe/Photoframe.pro index 323211d..6578556 100755 --- a/applications/Photoframe/Photoframe.pro +++ b/applications/Photoframe/Photoframe.pro @@ -1,3 +1,4 @@ +QT += widgets network multimedia TEMPLATE = app LIBS += -Llib -lexif SOURCES += src/main.cpp \ @@ -32,6 +33,5 @@ src/intro.h \ src/stage.h CONFIG += release -QT += network TRANSLATIONS += i18n/DPF_English.ts i18n/DPF_Japanese.ts i18n/DPF_Korean.ts i18n/DPF_Chinese.ts INCLUDEPATH = include diff --git a/applications/Photoframe/README.txt b/applications/Photoframe/README.txt index ff6b60d..c6a56cc 100755 --- a/applications/Photoframe/README.txt +++ b/applications/Photoframe/README.txt @@ -2,6 +2,25 @@ Building on Windows ------------------- + +New instructions: + +The UNIX shell scripts are able to be run from a DOS cmd prompt by +running them with the sh.bat script. For example: + +sh build-all.sh + +This will use the sh.bat script to interpret and translate the unix +commands in to equivalent windows DOS commands. The shell scripts are +therefore obviously restricted to the subset of support commands that +can be translated to. Environment variables must be surrounded with +braces, eg "${VAR}". Common commands like cp, echo, mkdir, cd are +supported and will translate unix slashes to DOS slashes for all the +arguments. Also the make command is translated to %MAKE%, so it can +be set up to build with VisualStudio by setting MAKE to nmake. + + + First install Qt + MingW compiler Add both Qt and MingW bin directories to your PATH Verify they work by opening a command prompt and diff --git a/applications/Photoframe/_env.bat b/applications/Photoframe/_env.bat index ad50a47..3d34e7d 100644 --- a/applications/Photoframe/_env.bat +++ b/applications/Photoframe/_env.bat @@ -1,9 +1,12 @@ @echo off +rem +rem Script for setting up dev environment variables on Windows +rem Copyright (C) 2021, John Ryland +rem call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" set QTDIR=C:\Users\John\Documents\Code\Qt-5.13.2\5.13.2\msvc2017_64 set PATH=%QTDIR%\bin;%PATH% +set MAKE=nmake cmd - -pause diff --git a/applications/Photoframe/_env.cmd b/applications/Photoframe/_env.cmd new file mode 100644 index 0000000..7031295 --- /dev/null +++ b/applications/Photoframe/_env.cmd @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script for setting up dev environment variables on macOS +# Copyright (C) 2021, John Ryland +# + +export QTDIR=/usr/local/Trolltech/Qt-4.5.0 +export PATH=$QTDIR/bin:$PATH +export MAKE=make + +bash diff --git a/applications/Photoframe/_env.sh b/applications/Photoframe/_env.sh index 39699de..bdcdb09 100644 --- a/applications/Photoframe/_env.sh +++ b/applications/Photoframe/_env.sh @@ -1,6 +1,11 @@ -@echo off +#!/bin/bash +# +# Script for setting up dev environment variables on Linux +# Copyright (C) 2021, John Ryland +# export QTDIR=/usr/local/Trolltech/Qt-4.5.0 export PATH=$QTDIR/bin:$PATH +export MAKE=make bash diff --git a/applications/Photoframe/build-all.bat b/applications/Photoframe/build-all.bat deleted file mode 100755 index 7f67edb..0000000 --- a/applications/Photoframe/build-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-all.sh diff --git a/applications/Photoframe/build-all.sh b/applications/Photoframe/build-all.sh index 3fbaccd..ba190f4 100755 --- a/applications/Photoframe/build-all.sh +++ b/applications/Photoframe/build-all.sh @@ -5,11 +5,13 @@ # InvertedLogic 2009-2021 # -. build-libexif.sh +sh build-libexif.sh qmake make -. refresh_translations.sh +echo sh refresh-translations.sh +sh refresh-translations.sh +echo cp config/dpf.ini ./ cp config/dpf.ini ./ diff --git a/applications/Photoframe/build-libexif.bat b/applications/Photoframe/build-libexif.bat deleted file mode 100755 index 3835462..0000000 --- a/applications/Photoframe/build-libexif.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -run-unix-script.bat build-libexif.sh diff --git a/applications/Photoframe/build-libexif.sh b/applications/Photoframe/build-libexif.sh index c832ac2..c0a322b 100755 --- a/applications/Photoframe/build-libexif.sh +++ b/applications/Photoframe/build-libexif.sh @@ -25,6 +25,7 @@ cp release/libexif*.dylib ../../bin cp release/libexif.a ../../lib cp release/exif.dll ../../release +cp release/exif.lib ../../lib cp release/liblibexif.a ../../lib cp release/libexif.dll ../../lib cp release/libexif.dll ../../release diff --git a/applications/Photoframe/clean.bat b/applications/Photoframe/clean.bat deleted file mode 100755 index d15a7d6..0000000 --- a/applications/Photoframe/clean.bat +++ /dev/null @@ -1,18 +0,0 @@ -@echo off -rem -rem Batch script to clean Photoframe on Windows -rem By John Ryland -rem InvertedLogic 2009 -rem - -rmdir /s /q libexif\libexif-0.6.17 -rmdir /s /q include -rmdir /s /q bin -rmdir /s /q lib -rmdir /s /q release -rmdir /s /q debug -del /q lib\*.* -del /q i18n\*.qm -del /q qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - -pause diff --git a/applications/Photoframe/clean.sh b/applications/Photoframe/clean.sh index be12bfa..a50bd23 100755 --- a/applications/Photoframe/clean.sh +++ b/applications/Photoframe/clean.sh @@ -1,6 +1,21 @@ #!/bin/bash +# +# Script to clean Photoframe +# By John Ryland +# InvertedLogic 2009 +# - -rm -rf libexif/libexif-0.6.17 include/libexif release debug lib/* i18n/*.qm qdevelop-settings.db Makefile *.Debug *.Release dpf.ini - - +rm -rf libexif/libexif-0.6.17 +rm -rf include +rm -rf bin +rm -rf lib +rm -rf release +rm -rf debug +rm -f lib/*.* +rm -f i18n/*.qm +rm -f qdevelop-settings.db +rm -f Makefile +rm -f *.Debug +rm -f *.Release +rm -f dpf.ini +rm -f .qmake.* diff --git a/applications/Photoframe/dos.inc b/applications/Photoframe/dos.inc deleted file mode 100755 index 60b3639..0000000 --- a/applications/Photoframe/dos.inc +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -DEBUG=1 - -function debug() -{ - if [ "$DEBUG" == "1" ] - then - echo "$@" - fi -} - -function fix_args1() -{ - while [ $# -ne 0 ] - do - # echo -E -- "$1" | tr "\\" "~" | sed "s/ \/\([a-zA-Z0-9]*\)/ -\1/g" | tr "~" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -E -- "$1" | tr "\\\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" | tr -d "\n" - echo -n " " - shift - done - # echo -E -- "$@" | tr "\\" "/" | sed "s/^-- //g" | sed "s/%\([a-zA-Z0-9]*\)%/$\{\1\}/g" -} - -function fix_args() -{ - ARGS=`fix_args1 ${@}` - ARGS=`eval echo -- $ARGS | sed "s/^-- //g"` - echo "$ARGS" -} - -function @echo() -{ - debug "Echo: @echo $@" -} - -function rem() -{ - debug "Comment: $@" -} - -function copy() -{ - echo '"Copy: '${@}'"' - debug "Copy: `which cp` `fix_args "$@"`" - `which cp` `fix_args "${@}"` -} - -function md() -{ - debug "Mkdir: `which mkdir` `fix_args $@`" - `which mkdir` `fix_args "$@"` -} - -function cd() -{ - debug "Chdir: cd `fix_args $@`" - builtin cd `fix_args "$@"` -} - -function set() -{ - debug "Set: export `fix_args $@`" - export `fix_args $@` -} - -function unzip() -{ - ARGS=`fix_args "$@"` - debug "Unzip: `which unzip` $ARGS" - `which unzip` $ARGS -} - -function cmd() -{ - debug "Cmd: `fix_args $@`" - if [ "$1" == "/C" ] - then - $2 - fi -} - -function rmdir() -{ - debug "Rmdir: rm -rf `fix_args $@`" -} - -function del() -{ - debug "Del: rm -f `fix_args $@`" -} - -function pause() -{ - debug "Pause: `fix_args $@`" - echo "Press Enter to continue..." - read -} - - diff --git a/applications/Photoframe/libexif/libexif.pro b/applications/Photoframe/libexif/libexif.pro index 39fa931..9086733 100755 --- a/applications/Photoframe/libexif/libexif.pro +++ b/applications/Photoframe/libexif/libexif.pro @@ -1,5 +1,6 @@ TEMPLATE = lib TARGET = exif +CONFIG += staticlib DEFINES += _CRT_SECURE_NO_WARNINGS M_PI=3.14 ssize_t=int SOURCES += libexif/exif-utils.c \ libexif/exif-byte-order.c \ diff --git a/applications/Photoframe/run-unix-script.bat b/applications/Photoframe/run-unix-script.bat deleted file mode 100644 index 13c638a..0000000 --- a/applications/Photoframe/run-unix-script.bat +++ /dev/null @@ -1,84 +0,0 @@ -@echo off - -rem Process the file given on the command line -setlocal enabledelayedexpansion -for /f "tokens=1,*" %%a in ('type %1') do ( -set cmd=%%a -set line=%%b -call :_!cmd! !line! -) - -goto:_slash_convert_end -:_slash_convert -SET ARGS= -:loop -if not "%1"=="" ( - SET Z=%1 - SET Z=!Z:$=%%! - SET Z=!Z:{=! - SET Z=!Z:}=%%! - SET ARGS=%ARGS%!Z:/=\! - shift - goto :loop -) -rem echo.%CD%^> %ARGS% -call %ARGS% -goto:eof -:_slash_convert_end - -goto:cp_end -:_cp -call:_slash_convert copy %* && goto:eof -:cp_end - -goto:cd_end -:_cd -call:_slash_convert cd %* && goto:eof -:cd_end - -goto:mkdir_end -:_mkdir -if "%1"=="-p" shift -SET Z=%1 -SET Z=!Z:$=%%! -SET Z=!Z:{=! -SET Z=!Z:}=%%! -SET ARG=!Z:/=\! -if not exist %ARG% mkdir %ARG% -goto:eof -:mkdir_end - -goto:echo_end -:_echo -echo.%* && goto:eof -:echo_end - -goto:export_end -:_export -setlocal -SET F1=%1 -SET "!F1:/=\!" -endlocal -goto:eof -:export_end - -goto:unzip_end -:_unzip -call:_slash_convert unzip %* && goto:eof -:unzip_end - -goto:qmake_end -:_qmake -call:_slash_convert qmake %* && goto:eof -:qmake_end - -goto:make_end -:_make -call:_slash_convert nmake %* && goto:eof -:make_end - -rem Null commands -:_# -:_#/bin/bash -:_#!/bin/bash -goto:eof diff --git a/applications/Photoframe/run.cmd b/applications/Photoframe/run.cmd new file mode 100644 index 0000000..a6f2ec6 --- /dev/null +++ b/applications/Photoframe/run.cmd @@ -0,0 +1,6 @@ +#!/bin/bash + +export DYLD_LIBRARY_PATH=$PWD/Photoframe.app/Contents/MacOS:$PATH +./Photoframe.app/Contents/MacOS/Photoframe + + diff --git a/applications/Photoframe/run.sh b/applications/Photoframe/run.sh index a6f2ec6..0dff87a 100755 --- a/applications/Photoframe/run.sh +++ b/applications/Photoframe/run.sh @@ -1,6 +1,4 @@ #!/bin/bash -export DYLD_LIBRARY_PATH=$PWD/Photoframe.app/Contents/MacOS:$PATH -./Photoframe.app/Contents/MacOS/Photoframe - - +export LD_LIBRARY_PATH=$PWD/bin:$LD_LIBRARY_PATH +./bin/Photoframe diff --git a/applications/Photoframe/sh.bat b/applications/Photoframe/sh.bat new file mode 100644 index 0000000..0b4c4a9 --- /dev/null +++ b/applications/Photoframe/sh.bat @@ -0,0 +1,106 @@ +@echo off + +rem Process the file given on the command line +setlocal enabledelayedexpansion +for /f "tokens=1,*" %%a in ('type %1') do ( +set cmd=%%a +set line=%%b +call :_!cmd! !line! +) + +goto:_slash_convert_end +:_slash_convert +SET ARGS= +:loop +if not "%1"=="" ( + SET Z=%1 + SET Z=!Z:$=%%! + SET Z=!Z:{=! + SET Z=!Z:}=%%! + SET ARGS=%ARGS%!Z:/=\! + shift + goto :loop +) +rem echo.%CD%^> %ARGS% +call %ARGS% +goto:eof +:_slash_convert_end + +goto:cp_end +:_cp +call:_slash_convert copy %* && goto:eof +:cp_end + +goto:cd_end +:_cd +call:_slash_convert cd %* && goto:eof +:cd_end + +goto:sh_end +:_sh +call:_slash_convert sh.bat %* && goto:eof +:sh_end + +goto:mkdir_end +:_mkdir +if "%1"=="-p" shift +SET Z=%1 +SET Z=!Z:$=%%! +SET Z=!Z:{=! +SET Z=!Z:}=%%! +SET ARG=!Z:/=\! +if not exist %ARG% mkdir %ARG% +goto:eof +:mkdir_end + +goto:rm_end +:_rm +setlocal +if "%1"=="-r" SET SARG=/S && shift +if "%1"=="-f" SET FARG=/F && shift +if "%1"=="-rf" SET SARG=/S && SET FARG=/F && shift +if not "%1"=="" ( +SET Z=%1 +SET Z=!Z:$=%%! +SET Z=!Z:{=! +SET Z=!Z:}=%%! +SET ARG=!Z:/=\! +) +rem echo del /Q %SARG% %FARG% %ARG% +if exist %1\ rmdir /Q %SARG% %ARG% +if exist %1 del /Q %SARG% %FARG% %ARG% +endlocal +goto:eof +:rm_end + +goto:echo_end +:_echo +echo.%* && goto:eof +:echo_end + +goto:export_end +:_export +SET F1=%* +rem echo SET !F1:/=\! +SET !F1:/=\! +goto:eof +:export_end + +goto:make_end +:_make +call:_slash_convert %MAKE% %* && goto:eof +:make_end + +goto:generic_end +:_unzip +:_qmake +:_lupdate +:_lrelease +call:_slash_convert %cmd% %* && goto:eof +:generic_end + +rem Null commands +:_# +:_#/bin/bash +:_#!/bin/bash +rem goto:eof diff --git a/applications/Photoframe/src/iconview.cpp b/applications/Photoframe/src/iconview.cpp index 2c78195..1f61c76 100755 --- a/applications/Photoframe/src/iconview.cpp +++ b/applications/Photoframe/src/iconview.cpp @@ -103,6 +103,8 @@ QPixmap folder = QPixmap("icons/b/folder.png"); QString cmd = "smbclient -N -L \\\\" + machine + " -g"; qDebug() << cmd; + +#ifndef _WIN32 FILE *fd = popen(cmd.toLatin1().data(), "r"); char *okay = (char*)1; while ( okay ) { @@ -123,6 +125,8 @@ } } pclose(fd); +#endif // _WIN32 + for (int i = 0; i < (int)entryList.count(); i++) { QString label = entryList[i]; QString filename = "photos/Network/" + machine + "/" + label; @@ -160,6 +164,8 @@ machines << QString("."); entryList << QString("."); + +#ifndef _WIN32 FILE *fd = popen("smbtree -b -N -S", "r"); char *okay = (char*)1; while ( okay ) { @@ -177,6 +183,7 @@ } } pclose(fd); +#endif // _WIN32 QPixmap folder = QPixmap("icons/b/folder.png"); for (int i = 0; i < (int)machines.count(); i++) { @@ -537,6 +544,8 @@ QString computer = dirname; QString shareName = entryList[curItemX+curItemY*5+offset]; char *okay = strstr(dirname, "/"); + +#ifndef _WIN32 if (!okay) { // It's a share name QString tmp = "photos/Network/" + computer; qDebug() << "makeing dir " << tmp; @@ -551,6 +560,8 @@ // XXX need to undo //QString cmd = "umount " + tmp; } +#endif // _WIN32 + } QString filename = "photos/" + directory + "/" + entryList[curItemX+curItemY*5+offset]; if (QFileInfo(filename).isDir()) {