Skip to content

Commit

Permalink
Merge branch 'release/v1.0.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilBeaver committed Jun 1, 2016
2 parents 6b04e5a + a397941 commit 2c80af2
Show file tree
Hide file tree
Showing 104 changed files with 5,001 additions and 2,558 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,8 @@ src/ScriptEngine.Snegopat/Snegopat_i.c
/src/packages/DotNetZip.1.9.3/lib/net20
/src/ipch/*.ipch
src/ipch/
src/Installer/obj/
src/.vs/
src/1Script.VC.opendb
src/*.VC.opendb
src/*.VC.db
34 changes: 22 additions & 12 deletions BuildAll.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<DistPath>$(MSBuildProjectDirectory)\dist\</DistPath>
<BinFolder>$(OutputPathForBuild)\bin\</BinFolder>
<LibFolder>$(OutputPathForBuild)\lib\</LibFolder>
<DocFolder>$(OutputPathForBuild)\doc\</DocFolder>
<ExamplesFolder>$(OutputPathForBuild)\examples\</ExamplesFolder>
<Solution>$(MSBuildProjectDirectory)\src\1Script.sln</Solution>
<InstallerStandartPath>"$(InnoSetupPath)\iscc.exe"</InstallerStandartPath>
Expand Down Expand Up @@ -96,12 +97,6 @@

<MSBuild Projects="$(Solution)" Properties="Configuration=$(Configuration);OutputPath=$(OutputPathForBuild)" />

<CreateItem Include="$(OutputPathForBuild)\*.pdb;$(OutputPathForBuild)\*.XML">
<Output TaskParameter="Include" ItemName="RemoveUnnessesaryFiles" />
</CreateItem>

<Delete Files="@(RemoveUnnessesaryFiles)" />

<!--TODO Why Snheopat.Engine build into source dir -->

<ItemGroup>
Expand All @@ -114,7 +109,10 @@

<Target Name="PreparePackage">

<CreateItem Include="$(OutputPathForBuild)\StandaloneRunner.exe">
<!--Сборка документации-->
<CallTarget Targets="GenerateDocs" Condition="Exists($(OneScriptDocumenter))"/>

<CreateItem Include="$(OutputPathForBuild)\*.pdb;$(OutputPathForBuild)\*.XML;$(OutputPathForBuild)\StandaloneRunner.exe">
<Output TaskParameter="Include" ItemName="RemoveUnnessesaryFiles" />
</CreateItem>

Expand All @@ -130,8 +128,8 @@
<Copy SourceFiles="@(LibraryFiles)" DestinationFolder="$(LibFolder)\%(RecursiveDir)"/>
<Copy SourceFiles="@(ExampleFiles)" DestinationFolder="$(ExamplesFolder)\%(RecursiveDir)"/>

<!-- Генерация скрипта запуска для opm -->
<Exec WorkingDirectory="$(BinFolder)" Command="&quot;$(BinFolder)\oscript.exe&quot; &quot;$(LibFolder)\opm\src\opm.os&quot; app &quot;$(LibFolder)\opm\src\opm.os&quot;"/>
<!-- Копирование скрипта запуска для opm -->
<Copy SourceFiles="$(MSBuildProjectDirectory)\install\opm.bat" DestinationFolder="$(BinFolder)"/>

</Target>

Expand All @@ -141,21 +139,33 @@

</Target>

<Target Name="CreateSignedInstall" DependsOnTargets="CreateInstall">
<Target Name="GenerateDocs">

<Exec Command="$(OneScriptDocumenter) $(TMP)\tempdoc.xml &quot;$(OutputPathForBuild)\ScriptEngine.dll&quot; &quot;$(OutputPathForBuild)\ScriptEngine.HostedScript.dll&quot; &quot;$(OutputPathForBuild)\oscript.exe&quot;"/>
<Exec Command="$(OneScriptDocumenter) html $(TMP)\tempdoc.xml &quot;$(DocFolder)\&quot;"/>

</Target>

<Target Name="CreateSignedInstall" DependsOnTargets="CreateMSI;CreateInstall">
<ItemGroup>
<FileToSign Include="$(DistPath)\*.msi" />
<FileToSign Include="$(DistPath)\*.exe" />
</ItemGroup>

<PropertyGroup>
<CertPass>"$(CertPassword)"</CertPass>
<CertFile>"$(CertPath)"</CertFile>
</PropertyGroup>
<Exec Command="&quot;$(SignTool)&quot; sign /f $(CertFile) /p $(CertPass) /t http://timestamp.verisign.com/scripts/timstamp.dll /d &quot;OneScript Engine&quot; /du http://oscript.io &quot;@(FileToSign)&quot;"/>

<!--Exec Command="echo $(CertPass) > crtpassword.txt"/-->
<Exec Command="&quot;$(SignTool)&quot; sign /f $(CertFile) /p $(CertPass) /t http://timestamp.verisign.com/scripts/timstamp.dll /d &quot;OneScript Engine&quot; /du http://oscript.io @(FileToSign,' ')"/>

</Target>

<Target Name="CreateMSI">
<!--TODO Add Wix cretation MSI-->
<Message Text="$(OutputPathForBuild)"/>
<MSBuild Projects="$(MSBuildProjectDirectory)\src\Installer\Installer.wixproj"
Properties="Configuration=$(Configuration);OutputPath=$(DistPath);OutputPathForBuild=$(OutputPathForBuild);Version=$(Major).$(Minor).$(Build)" />
</Target>

<Target Name="CreateNuget">
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# README #

### Зачем нужен этот репозиторий? ###
### Проект является независимой кросс-платформенной реализацией виртуальной машины, исполняющей скрипты на языке 1С:Предприятие.

* Данное приложение является исполняющей средой для скриптов на языке 1С:Предприятие.
* Позволяет писать скрипты на языке 1С без наличия самой платформы.
* Подробнее см. [WIKI проекта](/EvilBeaver/1script/wiki/Home/)
При этом библиотеки системы 1С:Предприятие не используются и не требуется установка системы 1С:Предприятие на целевой машине.

### Как установить и собрать? ###
Иными словами, это возможность писать программы на языке 1С без использования платформы 1С:Предприятие.

* Установите Visual Studio 2010-2013
* Откройте файл 1Script.sln
* Выполните сборку проекта
## Название и произношение

### Как поучаствовать в проекте? ###
Проект носит название OneScript, может быть сокращен при написании до названия 1Script.

* Клонируйте репозиторий
* Меняйте что хотите
* Присылайте pull-request
OneScript позволяет создавать и выполнять текстовые сценарии, написанные на языке, знакомом любому специалисту по системе 1С:Предприятие. Применение знакомого языка для скриптовой автоматизации позволяет значительно повысить продуктивность специалиста за счет более простой автоматизации ручных операций.

### С кем я говорю? ###
## Сайт проекта

* http://habrahabr.ru/users/evilbeaver/
Основная информация о проекте, релизы и техдокументация расположены на официальном сайте

http://oscript.io

## Библиотека полезных скриптов

В поставку OneScript уже входит набор наиболее часто используемых пакетов. Эти пакеты разрабатываются в едином репозитарии на github и доступны для всем желающим.
41 changes: 0 additions & 41 deletions install/build.cmd

This file was deleted.

8 changes: 8 additions & 0 deletions install/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Usage:
# ./build.sh to build
# ./build.sh /t:Clean to cleanup
# ./build.sh /p:Platform="x86" to build for x86

cd `dirname $0`
xbuild /p:Platform="Any CPU" /p:Configuration="Release" $@ ../src/1Script_Mono.sln

31 changes: 31 additions & 0 deletions install/builders/deb/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM ubuntu:latest


MAINTAINER [email protected]

# чтобы запустить тесты
RUN locale-gen --lang ru_RU.UTF-8
ENV LANG ru_RU.UTF-8

# Add mono repository
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
echo "deb http://download.mono-project.com/repo/debian wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list

RUN apt-get update && apt-get install -y \
# runtime dependencies
mono-runtime \
libmono-system-core4.0-cil \
libmono-system4.0-cil \
libmono-corlib4.0-cil \
libmono-i18n4.0-all \
# deb-package tools
dpkg\
debconf\
debhelper\
lintian\
md5deep\
fakeroot

ADD ./build.sh /root/
ENTRYPOINT /root/build.sh

39 changes: 39 additions & 0 deletions install/builders/deb/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/sh

SRCPATH=/media
BINPATH=${SRCPATH}/bin/
DEBBUILDROOT=${SRCPATH}/bin/
BUILDERROOT=${SRCPATH}/deb/

VERSION=$(cat ${BINPATH}VERSION)
PAKNAME=onescript-engine
DSTPATH=${DEBBUILDROOT}${PAKNAME}

mkdir $DSTPATH
mkdir -p $DSTPATH/DEBIAN
mkdir -p $DSTPATH/usr/bin
mkdir -p $DSTPATH/usr/share/oscript/lib
mkdir -p $DSTPATH/usr/share/oscript/bin
mkdir -p $DSTPATH/etc

cp ${BUILDERROOT}settings/dirs $DSTPATH/DEBIAN/
cat ${BUILDERROOT}settings/control | sed -r "s/VERSION/$VERSION/g" > $DSTPATH/DEBIAN/control
cp ${BINPATH}*.exe $DSTPATH/usr/share/oscript/bin
cp ${BINPATH}*.dll $DSTPATH/usr/share/oscript/bin
cp ${BUILDERROOT}oscript $DSTPATH/usr/bin
cp ${BUILDERROOT}oscript-cgi $DSTPATH/usr/bin
cp ${BUILDERROOT}oscript-opm $DSTPATH/usr/bin
cp -r ${SRCPATH}/lib/* $DSTPATH/usr/share/oscript/lib
cp ${BINPATH}/oscript.cfg $DSTPATH/etc

ln -s /usr/bin/oscript-opm $DSTPATH/usr/bin/opm

# TODO: Убрать это!
cp ${BINPATH}/oscript.cfg $DSTPATH/usr/share/oscript/bin

fakeroot dpkg-deb --build $DSTPATH

rm -rf $DSTPATH
chmod 777 $DSTPATH.deb
dpkg-name -o $DSTPATH.deb

3 changes: 3 additions & 0 deletions install/builders/deb/oscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
mono /usr/share/oscript/bin/oscript.exe $@

8 changes: 8 additions & 0 deletions install/builders/deb/oscript-cgi
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

if [ -z "$SCRIPT_FILENAME" ]; then
export SCRIPT_FILENAME=$1
fi

mono /usr/share/oscript/bin/oscript.exe -cgi $@

4 changes: 4 additions & 0 deletions install/builders/deb/oscript-opm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
OSPATH=/usr/share/oscript
mono $OSPATH/bin/oscript.exe $OSPATH/lib/opm/src/opm.os $@

13 changes: 13 additions & 0 deletions install/builders/deb/settings/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Package: onescript-engine
Version: VERSION
Provides: onescript
Maintainer: Sergey Batanov <[email protected]>
Architecture: all
Section: interpreters
Description: 1Script execution engine.
Cross-platform scripting engine
for DevOps who use 1C:Enterprise Platform (http://1c-dn.com/1c_enterprise)
Depends: mono-runtime, libmono-system-core4.0-cil, libmono-system4.0-cil,
libmono-corlib4.0-cil, libmono-i18n4.0-all
Recommends: mono-complete
Origin: https://bitbucket.org/EvilBeaver/1script/
5 changes: 5 additions & 0 deletions install/builders/deb/settings/dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/usr/bin
/etc
/usr/share/oscript/bin
/usr/share/oscript/lib

3 changes: 3 additions & 0 deletions install/builders/deb/settings/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
README.md
LICENSE

1 change: 1 addition & 0 deletions install/builders/msi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# WiX wili be here
32 changes: 32 additions & 0 deletions install/builders/rpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM fedora
MAINTAINER Chmouel Boudjnah <[email protected]>


# Install various packages to get compile environment
RUN dnf update -y && dnf -y group install 'Development Tools'

# Install git command to access GitHub repository
RUN dnf -y install sudo git rpmdevtools rpm-build yum-utils dnf-plugins-core dnf-plugins-extras

RUN sed -i.bak -n -e '/^Defaults.*requiretty/ { s/^/# /;};/^%wheel.*ALL$/ { s/^/# / ;} ;/^#.*wheel.*NOPASSWD/ { s/^#[ ]*//;};p' /etc/sudoers

# This is an optimisation for caching, since using the auto generated one will
# make docker always run the builddep steps since new file
ADD oscript.spec /tmp/
RUN dnf builddep -y --spec /tmp/oscript.spec

ADD start.sh /start.sh

RUN useradd -s /bin/bash -G adm,wheel,systemd-journal -m rpm

WORKDIR /home/rpm
CMD /start.sh
VOLUME /media
ENV VERSION ""
ENV RELEASE ""


#ADD .build/rpm/ /home/rpm/rpmbuild/
RUN chown -R rpm: /home/rpm

USER rpm
53 changes: 53 additions & 0 deletions install/builders/rpm/oscript.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
%global debug_package %{nil}
%define _version 1.0.13

Name: onescript-engine
Version: %{_version}
Release: 1%{?dist}
Summary: 1Script execution engine.

License: MPL 2.0
URL: https://github.com/EvilBeaver/OneScript
Source0: OneScript-%{version}.tar.gz
BuildArch: noarch
BuildRequires: wget
Requires: mono-core

%define _empty_manifest_terminate_build 0
%define _subdir OneScript-%{version}

%description
1Script execution engine.
Cross-platform scripting engine
for DevOps who use 1C:Enterprise Platform (http://1c-dn.com/1c_enterprise)

%prep
pwd
%setup -c %{source0}

%build
echo "build"
pwd

%install
%{__rm} -rf %{buildroot}
pushd %{_subdir}
mkdir -p %{buildroot}%{_datadir}/oscript/
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_sysconfdir}
install -p oscript -m 755 %{buildroot}%{_bindir}/oscript
rm oscript
%{__cp} -fpr ./ %{buildroot}%{_datadir}/oscript/
popd

%files
%defattr(-,root,root)
%{_bindir}/*
%{_datadir}/oscript/*
%doc



%changelog
* Sat Apr 23 2016 [email protected]
-
Loading

0 comments on commit 2c80af2

Please sign in to comment.